diff --git a/.jsdoc.js b/.jsdoc.js index bd7d2676..f4f11343 100644 --- a/.jsdoc.js +++ b/.jsdoc.js @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -40,7 +40,7 @@ module.exports = { includePattern: '\\.js$' }, templates: { - copyright: 'Copyright 2020 Google LLC', + copyright: 'Copyright 2021 Google LLC', includeDate: false, sourceFiles: false, systemName: '@google-cloud/dialogflow-cx', diff --git a/protos/google/cloud/dialogflow/cx/v3/experiment.proto b/protos/google/cloud/dialogflow/cx/v3/experiment.proto new file mode 100644 index 00000000..92f48189 --- /dev/null +++ b/protos/google/cloud/dialogflow/cx/v3/experiment.proto @@ -0,0 +1,415 @@ +// 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.cx.v3; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3"; +option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3;cx"; +option java_multiple_files = true; +option java_outer_classname = "ExperimentProto"; +option java_package = "com.google.cloud.dialogflow.cx.v3"; +option objc_class_prefix = "DF"; + +// Service for managing [Experiments][google.cloud.dialogflow.cx.v3.Experiment]. +service Experiments { + 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 experiments in the specified [Environment][google.cloud.dialogflow.cx.v3.Environment]. + rpc ListExperiments(ListExperimentsRequest) returns (ListExperimentsResponse) { + option (google.api.http) = { + get: "/v3/{parent=projects/*/locations/*/agents/*/environments/*}/experiments" + }; + option (google.api.method_signature) = "parent"; + } + + // Retrieves the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. + rpc GetExperiment(GetExperimentRequest) returns (Experiment) { + option (google.api.http) = { + get: "/v3/{name=projects/*/locations/*/agents/*/environments/*/experiments/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates an [Experiment][google.cloud.dialogflow.cx.v3.Experiment] in the specified [Environment][google.cloud.dialogflow.cx.v3.Environment]. + rpc CreateExperiment(CreateExperimentRequest) returns (Experiment) { + option (google.api.http) = { + post: "/v3/{parent=projects/*/locations/*/agents/*/environments/*}/experiments" + body: "experiment" + }; + option (google.api.method_signature) = "parent,experiment"; + } + + // Updates the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. + rpc UpdateExperiment(UpdateExperimentRequest) returns (Experiment) { + option (google.api.http) = { + patch: "/v3/{experiment.name=projects/*/locations/*/agents/*/environments/*/experiments/*}" + body: "experiment" + }; + option (google.api.method_signature) = "experiment,update_mask"; + } + + // Deletes the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. + rpc DeleteExperiment(DeleteExperimentRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v3/{name=projects/*/locations/*/agents/*/environments/*/experiments/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Starts the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. This rpc only changes the state of + // experiment from PENDING to RUNNING. + rpc StartExperiment(StartExperimentRequest) returns (Experiment) { + option (google.api.http) = { + post: "/v3/{name=projects/*/locations/*/agents/*/environments/*/experiments/*}:start" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + + // Stops the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. This rpc only changes the state of + // experiment from RUNNING to DONE. + rpc StopExperiment(StopExperimentRequest) returns (Experiment) { + option (google.api.http) = { + post: "/v3/{name=projects/*/locations/*/agents/*/environments/*/experiments/*}:stop" + body: "*" + }; + option (google.api.method_signature) = "name"; + } +} + +// Represents an experiment in an environment. +// Next ID: 13 +message Experiment { + option (google.api.resource) = { + type: "dialogflow.googleapis.com/Experiment" + pattern: "projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/experiments/{experiment}" + }; + + // Definition of the experiment. + // Next ID: 3 + message Definition { + // The condition defines which subset of sessions are selected for + // this experiment. If not specified, all sessions are eligible. E.g. + // "query_input.language_code=en" See the [conditions + // reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition). + string condition = 1; + + // The variants of the experiment. We currently only support single variant + // experiment. + oneof variants { + // The flow versions as the variants of this experiment. + VersionVariants version_variants = 2; + } + } + + // The inference result which includes an objective metric to optimize and the + // confidence interval. + message Result { + // A confidence interval is a range of possible values for the experiment + // objective you are trying to measure. + message ConfidenceInterval { + // The confidence level used to construct the interval, i.e. there is X% + // chance that the true value is within this interval. + double confidence_level = 1; + + // The percent change between an experiment metric's value and the value + // for its control. + double ratio = 2; + + // Lower bound of the interval. + double lower_bound = 3; + + // Upper bound of the interval. + double upper_bound = 4; + } + + // Metric and corresponding confidence intervals. + message Metric { + // The type of the metric. + MetricType type = 1; + + // The actual value of the metric. + oneof value { + // Ratio value of a metric. + double ratio = 2; + } + + // The probability that the treatment is better than all other treatments + // in the experiment + ConfidenceInterval confidence_interval = 3; + } + + // Version variant and associated metrics. + message VersionMetrics { + // The name of the flow [Version][google.cloud.dialogflow.cx.v3.Version]. + // Format: `projects//locations//agents//flows//versions/`. + string version = 1 [(google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Version" + }]; + + // The metrics and corresponding confidence intervals in the inference + // result. + repeated Metric metrics = 2; + + // Number of sessions that were allocated to this version. + int32 session_count = 3; + } + + // Types of metric for Dialogflow experiment. + enum MetricType { + // Metric unspecified. + METRIC_UNSPECIFIED = 0; + + // Percentage of contained sessions without user calling back in 24 hours. + CONTAINED_SESSION_NO_CALLBACK_RATE = 1; + + // Percentage of sessions that were handed to a human agent. + LIVE_AGENT_HANDOFF_RATE = 2; + + // Percentage of sessions with the same user calling back. + CALLBACK_SESSION_RATE = 3; + + // Percentage of sessions where user hung up. + ABANDONED_SESSION_RATE = 4; + + // Percentage of sessions reached Dialogflow 'END_PAGE' or + // 'END_SESSION'. + SESSION_END_RATE = 5; + } + + // Version variants and metrics. + repeated VersionMetrics version_metrics = 1; + + // The last time the experiment's stats data was updated. Will have default + // value if stats have never been computed for this experiment. + google.protobuf.Timestamp last_update_time = 2; + } + + // The state of the experiment. + enum State { + // State unspecified. + STATE_UNSPECIFIED = 0; + + // The experiment is created but not started yet. + DRAFT = 1; + + // The experiment is running. + RUNNING = 2; + + // The experiment is done. + DONE = 3; + } + + // The name of the experiment. + // Format: projects//locations//agents//environments//experiments/.. + string name = 1; + + // Required. The human-readable name of the experiment (unique in an environment). Limit + // of 64 characters. + string display_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // The human-readable description of the experiment. + string description = 3; + + // The current state of the experiment. + // Transition triggered by Expriments.StartExperiment: PENDING->RUNNING. + // Transition triggered by Expriments.CancelExperiment: PENDING->CANCELLED or + // RUNNING->CANCELLED. + State state = 4; + + // The definition of the experiment. + Definition definition = 5; + + // Inference result of the experiment. + Result result = 6; + + // Creation time of this experiment. + google.protobuf.Timestamp create_time = 7; + + // Start time of this experiment. + google.protobuf.Timestamp start_time = 8; + + // End time of this experiment. + google.protobuf.Timestamp end_time = 9; + + // Last update time of this experiment. + google.protobuf.Timestamp last_update_time = 10; + + // Maximum number of days to run the experiment. + google.protobuf.Duration experiment_length = 11; + + // The history of updates to the experiment variants. + repeated VariantsHistory variants_history = 12; +} + +// A list of flow version variants. +message VersionVariants { + // A single flow version with specified traffic allocation. + message Variant { + // The name of the flow version. + // Format: `projects//locations//agents//flows//versions/`. + string version = 1; + + // Percentage of the traffic which should be routed to this + // version of flow. Traffic allocation for a single flow must sum up to 1.0. + float traffic_allocation = 2; + + // Whether the variant is for the control group. + bool is_control_group = 3; + } + + // A list of flow version variants. + repeated Variant variants = 1; +} + +// The history of variants update. +message VariantsHistory { + // The variants updated. We currently only support single variant + // experiment. + oneof variants { + // The flow versions as the variants. + VersionVariants version_variants = 1; + } + + // Update time of the variants. + google.protobuf.Timestamp update_time = 2; +} + +// The request message for [Experiments.ListExperiments][google.cloud.dialogflow.cx.v3.Experiments.ListExperiments]. +message ListExperimentsRequest { + // Required. The [Environment][google.cloud.dialogflow.cx.v3.Environment] to list all environments for. + // Format: `projects//locations//agents//environments/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Experiment" + } + ]; + + // The maximum number of items to return in a single page. By default 20 and + // at most 100. + int32 page_size = 2; + + // The next_page_token value returned from a previous list request. + string page_token = 3; +} + +// The response message for [Experiments.ListExperiments][google.cloud.dialogflow.cx.v3.Experiments.ListExperiments]. +message ListExperimentsResponse { + // The list of experiments. There will be a maximum number of items + // returned based on the page_size field in the request. The list may in some + // cases be empty or contain fewer entries than page_size even if this isn't + // the last page. + repeated Experiment experiments = 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; +} + +// The request message for [Experiments.GetExperiment][google.cloud.dialogflow.cx.v3.Experiments.GetExperiment]. +message GetExperimentRequest { + // Required. The name of the [Environment][google.cloud.dialogflow.cx.v3.Environment]. + // Format: `projects//locations//agents//environments//experiments/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Experiment" + } + ]; +} + +// The request message for [Experiments.CreateExperiment][google.cloud.dialogflow.cx.v3.Experiments.CreateExperiment]. +message CreateExperimentRequest { + // Required. The [Agent][google.cloud.dialogflow.cx.v3.Agent] to create an [Environment][google.cloud.dialogflow.cx.v3.Environment] for. + // Format: `projects//locations//agents//environments/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Experiment" + } + ]; + + // Required. The experiment to create. + Experiment experiment = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// The request message for [Experiments.UpdateExperiment][google.cloud.dialogflow.cx.v3.Experiments.UpdateExperiment]. +message UpdateExperimentRequest { + // Required. The experiment to update. + Experiment experiment = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The mask to control which fields get updated. + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// The request message for [Experiments.DeleteExperiment][google.cloud.dialogflow.cx.v3.Experiments.DeleteExperiment]. +message DeleteExperimentRequest { + // Required. The name of the [Environment][google.cloud.dialogflow.cx.v3.Environment] to delete. + // Format: `projects//locations//agents//environments//experiments/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Experiment" + } + ]; +} + +// The request message for [Experiments.StartExperiment][google.cloud.dialogflow.cx.v3.Experiments.StartExperiment]. +message StartExperimentRequest { + // Required. Resource name of the experiment to start. + // Format: `projects//locations//agents//environments//experiments/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Experiment" + } + ]; +} + +// The request message for [Experiments.StopExperiment][google.cloud.dialogflow.cx.v3.Experiments.StopExperiment]. +message StopExperimentRequest { + // Required. Resource name of the experiment to stop. + // Format: `projects//locations//agents//environments//experiments/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Experiment" + } + ]; +} diff --git a/protos/google/cloud/dialogflow/cx/v3/session.proto b/protos/google/cloud/dialogflow/cx/v3/session.proto index f2e8968b..55de80b9 100644 --- a/protos/google/cloud/dialogflow/cx/v3/session.proto +++ b/protos/google/cloud/dialogflow/cx/v3/session.proto @@ -57,6 +57,10 @@ service Sessions { // as a result. This method is not idempotent, because it may cause session // entity types to be updated, which in turn might affect results of future // queries. + // + // Note: Always use agent versions for production traffic. + // See [Versions and + // environments](https://cloud.google.com/dialogflow/cx/docs/concept/version). rpc DetectIntent(DetectIntentRequest) returns (DetectIntentResponse) { option (google.api.http) = { post: "/v3/{session=projects/*/locations/*/agents/*/sessions/*}:detectIntent" @@ -71,6 +75,10 @@ service Sessions { // Processes a natural language query in audio format in a streaming fashion // and returns structured, actionable data as a result. This method is only // available via the gRPC API (not REST). + // + // Note: Always use agent versions for production traffic. + // See [Versions and + // environments](https://cloud.google.com/dialogflow/cx/docs/concept/version). rpc StreamingDetectIntent(stream StreamingDetectIntentRequest) returns (stream StreamingDetectIntentResponse) { } @@ -116,6 +124,10 @@ message DetectIntentRequest { // // For more information, see the [sessions // guide](https://cloud.google.com/dialogflow/cx/docs/concept/session). + // + // Note: Always use agent versions for production traffic. + // See [Versions and + // environments](https://cloud.google.com/dialogflow/cx/docs/concept/version). string session = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -201,6 +213,10 @@ message StreamingDetectIntentRequest { // // For more information, see the [sessions // guide](https://cloud.google.com/dialogflow/cx/docs/concept/session). + // + // Note: Always use agent versions for production traffic. + // See [Versions and + // environments](https://cloud.google.com/dialogflow/cx/docs/concept/version). string session = 1 [(google.api.resource_reference) = { type: "dialogflow.googleapis.com/Session" }]; @@ -364,7 +380,8 @@ message QueryParameters { // - MapKey value: parameter name // - MapValue type: // - If parameter's entity type is a composite entity: map - // - Else: string or number, depending on parameter value type + // - Else: depending on parameter value type, could be one of string, + // number, boolean, null, list or map // - MapValue value: // - If parameter's entity type is a composite entity: // map from composite entity property names to property values @@ -374,6 +391,16 @@ message QueryParameters { // Configures whether sentiment analysis should be performed. If not // provided, sentiment analysis is not performed. bool analyze_query_text_sentiment = 8; + + // This field can be used to pass HTTP headers for a webhook + // call. These headers will be sent to webhook along with the headers that + // have been configured through Dialogflow web console. The headers defined + // within this field will overwrite the headers configured through Dialogflow + // console if there is a conflict. Header names are case-insensitive. + // Google's specified headers are not allowed. Including: "Host", + // "Content-Length", "Connection", "From", "User-Agent", "Accept-Encoding", + // "If-Modified-Since", "If-None-Match", "X-Forwarded-For", etc. + map webhook_headers = 10; } // Represents the query input. It can contain one of: @@ -449,7 +476,8 @@ message QueryResult { // - MapKey value: parameter name // - MapValue type: // - If parameter's entity type is a composite entity: map - // - Else: string or number, depending on parameter value type + // - Else: depending on parameter value type, could be one of string, + // number, boolean, null, list or map // - MapValue value: // - If parameter's entity type is a composite entity: // map from composite entity property names to property values @@ -600,7 +628,8 @@ message Match { // - MapKey value: parameter name // - MapValue type: // - If parameter's entity type is a composite entity: map - // - Else: string or number, depending on parameter value type + // - Else: depending on parameter value type, could be one of string, + // number, boolean, null, list or map // - MapValue value: // - If parameter's entity type is a composite entity: // map from composite entity property names to property values diff --git a/protos/google/cloud/dialogflow/cx/v3beta1/agent.proto b/protos/google/cloud/dialogflow/cx/v3beta1/agent.proto index d61e307e..ba80999f 100644 --- a/protos/google/cloud/dialogflow/cx/v3beta1/agent.proto +++ b/protos/google/cloud/dialogflow/cx/v3beta1/agent.proto @@ -122,9 +122,13 @@ message SpeechToTextSettings { // in your app, product, or service to determine user intent and respond to the // user in a natural way. // -// After you create an agent, you can add [Intents][google.cloud.dialogflow.cx.v3beta1.Intent], -// [Entity Types][google.cloud.dialogflow.cx.v3beta1.EntityType], [Flows][google.cloud.dialogflow.cx.v3beta1.Flow], [Fulfillments][google.cloud.dialogflow.cx.v3beta1.Fulfillment], -// [Webhooks][google.cloud.dialogflow.cx.v3beta1.Webhook], and so on to manage the conversation flows.. +// After you create an agent, you can add +// [Intents][google.cloud.dialogflow.cx.v3beta1.Intent], [Entity +// Types][google.cloud.dialogflow.cx.v3beta1.EntityType], +// [Flows][google.cloud.dialogflow.cx.v3beta1.Flow], +// [Fulfillments][google.cloud.dialogflow.cx.v3beta1.Fulfillment], +// [Webhooks][google.cloud.dialogflow.cx.v3beta1.Webhook], and so on to manage +// the conversation flows.. message Agent { option (google.api.resource) = { type: "dialogflow.googleapis.com/Agent" @@ -132,7 +136,10 @@ message Agent { }; // The unique identifier of the agent. - // Required for the [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.UpdateAgent] method. [Agents.CreateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.CreateAgent] + // Required for the + // [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.UpdateAgent] + // method. + // [Agents.CreateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.CreateAgent] // populates the name automatically. // Format: `projects//locations//agents/`. string name = 1; @@ -144,7 +151,9 @@ message Agent { // See [Language // Support](https://cloud.google.com/dialogflow/docs/reference/language) // for a list of the currently supported language codes. - // This field cannot be set by the [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.UpdateAgent] method. + // This field cannot be set by the + // [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.UpdateAgent] + // method. string default_language_code = 3 [(google.api.field_behavior) = IMMUTABLE]; // Required. The time zone of the agent from the [time zone @@ -165,16 +174,13 @@ message Agent { // Speech recognition related settings. SpeechToTextSettings speech_to_text_settings = 13; - // Immutable. Name of the start flow in this agent. A start flow will be automatically - // created when the agent is created, and can only be deleted by deleting the - // agent. - // Format: `projects//locations//agents//flows/`. + // Immutable. Name of the start flow in this agent. A start flow will be + // automatically created when the agent is created, and can only be deleted by + // deleting the agent. Format: `projects//locations//agents//flows/`. string start_flow = 16 [ (google.api.field_behavior) = IMMUTABLE, - (google.api.resource_reference) = { - type: "dialogflow.googleapis.com/Flow" - } + (google.api.resource_reference) = { type: "dialogflow.googleapis.com/Flow" } ]; // Indicates if stackdriver logging is enabled for the agent. @@ -185,7 +191,8 @@ message Agent { bool enable_spell_correction = 20; } -// The request message for [Agents.ListAgents][google.cloud.dialogflow.cx.v3beta1.Agents.ListAgents]. +// The request message for +// [Agents.ListAgents][google.cloud.dialogflow.cx.v3beta1.Agents.ListAgents]. message ListAgentsRequest { // Required. The location to list all agents for. // Format: `projects//locations/`. @@ -204,7 +211,8 @@ message ListAgentsRequest { string page_token = 3; } -// The response message for [Agents.ListAgents][google.cloud.dialogflow.cx.v3beta1.Agents.ListAgents]. +// The response message for +// [Agents.ListAgents][google.cloud.dialogflow.cx.v3beta1.Agents.ListAgents]. message ListAgentsResponse { // The list of agents. There will be a maximum number of items returned based // on the page_size field in the request. @@ -215,7 +223,8 @@ message ListAgentsResponse { string next_page_token = 2; } -// The request message for [Agents.GetAgent][google.cloud.dialogflow.cx.v3beta1.Agents.GetAgent]. +// The request message for +// [Agents.GetAgent][google.cloud.dialogflow.cx.v3beta1.Agents.GetAgent]. message GetAgentRequest { // Required. The name of the agent. // Format: `projects//locations//agents/`. @@ -227,7 +236,8 @@ message GetAgentRequest { ]; } -// The request message for [Agents.CreateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.CreateAgent]. +// The request message for +// [Agents.CreateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.CreateAgent]. message CreateAgentRequest { // Required. The location to create a agent for. // Format: `projects//locations/`. @@ -242,7 +252,8 @@ message CreateAgentRequest { Agent agent = 2 [(google.api.field_behavior) = REQUIRED]; } -// The request message for [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.UpdateAgent]. +// The request message for +// [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.UpdateAgent]. message UpdateAgentRequest { // Required. The agent to update. Agent agent = 1 [(google.api.field_behavior) = REQUIRED]; @@ -252,7 +263,8 @@ message UpdateAgentRequest { google.protobuf.FieldMask update_mask = 2; } -// The request message for [Agents.DeleteAgent][google.cloud.dialogflow.cx.v3beta1.Agents.DeleteAgent]. +// The request message for +// [Agents.DeleteAgent][google.cloud.dialogflow.cx.v3beta1.Agents.DeleteAgent]. message DeleteAgentRequest { // Required. The name of the agent to delete. // Format: `projects//locations//agents/`. @@ -264,7 +276,8 @@ message DeleteAgentRequest { ]; } -// The request message for [Agents.ExportAgent][google.cloud.dialogflow.cx.v3beta1.Agents.ExportAgent]. +// The request message for +// [Agents.ExportAgent][google.cloud.dialogflow.cx.v3beta1.Agents.ExportAgent]. message ExportAgentRequest { // Required. The name of the agent to export. // Format: `projects//locations//agents/`. @@ -275,19 +288,21 @@ message ExportAgentRequest { } ]; - // Optional. The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI to - // export the agent to. The format of this URI must be - // `gs:///`. - // If left unspecified, the serialized agent is returned inline. + // Optional. The [Google Cloud + // Storage](https://cloud.google.com/storage/docs/) URI to export the agent + // to. The format of this URI must be `gs:///`. If + // left unspecified, the serialized agent is returned inline. string agent_uri = 2 [(google.api.field_behavior) = OPTIONAL]; } -// The response message for [Agents.ExportAgent][google.cloud.dialogflow.cx.v3beta1.Agents.ExportAgent]. +// The response message for +// [Agents.ExportAgent][google.cloud.dialogflow.cx.v3beta1.Agents.ExportAgent]. message ExportAgentResponse { // The exported agent. oneof agent { // The URI to a file containing the exported agent. This field is populated - // only if `agent_uri` is specified in [ExportAgentRequest][google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest]. + // only if `agent_uri` is specified in + // [ExportAgentRequest][google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest]. string agent_uri = 1; // Uncompressed raw byte content for agent. @@ -295,7 +310,8 @@ message ExportAgentResponse { } } -// The request message for [Agents.RestoreAgent][google.cloud.dialogflow.cx.v3beta1.Agents.RestoreAgent]. +// The request message for +// [Agents.RestoreAgent][google.cloud.dialogflow.cx.v3beta1.Agents.RestoreAgent]. message RestoreAgentRequest { // Required. The name of the agent to restore into. // Format: `projects//locations//agents/`. diff --git a/protos/google/cloud/dialogflow/cx/v3beta1/audio_config.proto b/protos/google/cloud/dialogflow/cx/v3beta1/audio_config.proto index e28a50da..c0043a52 100644 --- a/protos/google/cloud/dialogflow/cx/v3beta1/audio_config.proto +++ b/protos/google/cloud/dialogflow/cx/v3beta1/audio_config.proto @@ -29,31 +29,6 @@ option java_outer_classname = "AudioConfigProto"; option java_package = "com.google.cloud.dialogflow.cx.v3beta1"; option objc_class_prefix = "DF"; -// Information for a word recognized by the speech recognizer. -message SpeechWordInfo { - // The word this info is for. - string word = 3; - - // Time offset relative to the beginning of the audio that corresponds to the - // start of the spoken word. This is an experimental feature and the accuracy - // of the time offset can vary. - google.protobuf.Duration start_offset = 1; - - // Time offset relative to the beginning of the audio that corresponds to the - // end of the spoken word. This is an experimental feature and the accuracy of - // the time offset can vary. - google.protobuf.Duration end_offset = 2; - - // The Speech confidence between 0.0 and 1.0 for this word. A higher number - // indicates an estimated greater likelihood that the recognized word is - // correct. The default of 0.0 is a sentinel value indicating that confidence - // was not set. - // - // This field is not guaranteed to be fully stable over time for the same - // audio input. Users should also not rely on it to always be provided. - float confidence = 4; -} - // Audio encoding of the audio content sent in the conversational query request. // Refer to the // [Cloud Speech API @@ -103,6 +78,31 @@ enum AudioEncoding { AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE = 7; } +// Information for a word recognized by the speech recognizer. +message SpeechWordInfo { + // The word this info is for. + string word = 3; + + // Time offset relative to the beginning of the audio that corresponds to the + // start of the spoken word. This is an experimental feature and the accuracy + // of the time offset can vary. + google.protobuf.Duration start_offset = 1; + + // Time offset relative to the beginning of the audio that corresponds to the + // end of the spoken word. This is an experimental feature and the accuracy of + // the time offset can vary. + google.protobuf.Duration end_offset = 2; + + // The Speech confidence between 0.0 and 1.0 for this word. A higher number + // indicates an estimated greater likelihood that the recognized word is + // correct. The default of 0.0 is a sentinel value indicating that confidence + // was not set. + // + // This field is not guaranteed to be fully stable over time for the same + // audio input. Users should also not rely on it to always be provided. + float confidence = 4; +} + // Instructs the speech recognizer on how to process the audio content. message InputAudioConfig { // Required. Audio encoding of the audio content to process. diff --git a/protos/google/cloud/dialogflow/cx/v3beta1/experiment.proto b/protos/google/cloud/dialogflow/cx/v3beta1/experiment.proto new file mode 100644 index 00000000..491ce217 --- /dev/null +++ b/protos/google/cloud/dialogflow/cx/v3beta1/experiment.proto @@ -0,0 +1,415 @@ +// 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.cx.v3beta1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3Beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1;cx"; +option java_multiple_files = true; +option java_outer_classname = "ExperimentProto"; +option java_package = "com.google.cloud.dialogflow.cx.v3beta1"; +option objc_class_prefix = "DF"; + +// Service for managing [Experiments][google.cloud.dialogflow.cx.v3beta1.Experiment]. +service Experiments { + 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 experiments in the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. + rpc ListExperiments(ListExperimentsRequest) returns (ListExperimentsResponse) { + option (google.api.http) = { + get: "/v3beta1/{parent=projects/*/locations/*/agents/*/environments/*}/experiments" + }; + option (google.api.method_signature) = "parent"; + } + + // Retrieves the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. + rpc GetExperiment(GetExperimentRequest) returns (Experiment) { + option (google.api.http) = { + get: "/v3beta1/{name=projects/*/locations/*/agents/*/environments/*/experiments/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates an [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment] in the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. + rpc CreateExperiment(CreateExperimentRequest) returns (Experiment) { + option (google.api.http) = { + post: "/v3beta1/{parent=projects/*/locations/*/agents/*/environments/*}/experiments" + body: "experiment" + }; + option (google.api.method_signature) = "parent,experiment"; + } + + // Updates the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. + rpc UpdateExperiment(UpdateExperimentRequest) returns (Experiment) { + option (google.api.http) = { + patch: "/v3beta1/{experiment.name=projects/*/locations/*/agents/*/environments/*/experiments/*}" + body: "experiment" + }; + option (google.api.method_signature) = "experiment,update_mask"; + } + + // Deletes the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. + rpc DeleteExperiment(DeleteExperimentRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v3beta1/{name=projects/*/locations/*/agents/*/environments/*/experiments/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Starts the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. This rpc only changes the state of + // experiment from PENDING to RUNNING. + rpc StartExperiment(StartExperimentRequest) returns (Experiment) { + option (google.api.http) = { + post: "/v3beta1/{name=projects/*/locations/*/agents/*/environments/*/experiments/*}:start" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + + // Stops the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. This rpc only changes the state of + // experiment from RUNNING to DONE. + rpc StopExperiment(StopExperimentRequest) returns (Experiment) { + option (google.api.http) = { + post: "/v3beta1/{name=projects/*/locations/*/agents/*/environments/*/experiments/*}:stop" + body: "*" + }; + option (google.api.method_signature) = "name"; + } +} + +// Represents an experiment in an environment. +// Next ID: 13 +message Experiment { + option (google.api.resource) = { + type: "dialogflow.googleapis.com/Experiment" + pattern: "projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/experiments/{experiment}" + }; + + // Definition of the experiment. + // Next ID: 3 + message Definition { + // The condition defines which subset of sessions are selected for + // this experiment. If not specified, all sessions are eligible. E.g. + // "query_input.language_code=en" See the [conditions + // reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition). + string condition = 1; + + // The variants of the experiment. We currently only support single variant + // experiment. + oneof variants { + // The flow versions as the variants of this experiment. + VersionVariants version_variants = 2; + } + } + + // The inference result which includes an objective metric to optimize and the + // confidence interval. + message Result { + // A confidence interval is a range of possible values for the experiment + // objective you are trying to measure. + message ConfidenceInterval { + // The confidence level used to construct the interval, i.e. there is X% + // chance that the true value is within this interval. + double confidence_level = 1; + + // The percent change between an experiment metric's value and the value + // for its control. + double ratio = 2; + + // Lower bound of the interval. + double lower_bound = 3; + + // Upper bound of the interval. + double upper_bound = 4; + } + + // Metric and corresponding confidence intervals. + message Metric { + // The type of the metric. + MetricType type = 1; + + // The actual value of the metric. + oneof value { + // Ratio value of a metric. + double ratio = 2; + } + + // The probability that the treatment is better than all other treatments + // in the experiment + ConfidenceInterval confidence_interval = 3; + } + + // Version variant and associated metrics. + message VersionMetrics { + // The name of the flow [Version][google.cloud.dialogflow.cx.v3beta1.Version]. + // Format: `projects//locations//agents//flows//versions/`. + string version = 1 [(google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Version" + }]; + + // The metrics and corresponding confidence intervals in the inference + // result. + repeated Metric metrics = 2; + + // Number of sessions that were allocated to this version. + int32 session_count = 3; + } + + // Types of metric for Dialogflow experiment. + enum MetricType { + // Metric unspecified. + METRIC_UNSPECIFIED = 0; + + // Percentage of contained sessions without user calling back in 24 hours. + CONTAINED_SESSION_NO_CALLBACK_RATE = 1; + + // Percentage of sessions that were handed to a human agent. + LIVE_AGENT_HANDOFF_RATE = 2; + + // Percentage of sessions with the same user calling back. + CALLBACK_SESSION_RATE = 3; + + // Percentage of sessions where user hung up. + ABANDONED_SESSION_RATE = 4; + + // Percentage of sessions reached Dialogflow 'END_PAGE' or + // 'END_SESSION'. + SESSION_END_RATE = 5; + } + + // Version variants and metrics. + repeated VersionMetrics version_metrics = 1; + + // The last time the experiment's stats data was updated. Will have default + // value if stats have never been computed for this experiment. + google.protobuf.Timestamp last_update_time = 2; + } + + // The state of the experiment. + enum State { + // State unspecified. + STATE_UNSPECIFIED = 0; + + // The experiment is created but not started yet. + DRAFT = 1; + + // The experiment is running. + RUNNING = 2; + + // The experiment is done. + DONE = 3; + } + + // The name of the experiment. + // Format: projects//locations//agents//environments//experiments/.. + string name = 1; + + // Required. The human-readable name of the experiment (unique in an environment). Limit + // of 64 characters. + string display_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // The human-readable description of the experiment. + string description = 3; + + // The current state of the experiment. + // Transition triggered by Expriments.StartExperiment: PENDING->RUNNING. + // Transition triggered by Expriments.CancelExperiment: PENDING->CANCELLED or + // RUNNING->CANCELLED. + State state = 4; + + // The definition of the experiment. + Definition definition = 5; + + // Inference result of the experiment. + Result result = 6; + + // Creation time of this experiment. + google.protobuf.Timestamp create_time = 7; + + // Start time of this experiment. + google.protobuf.Timestamp start_time = 8; + + // End time of this experiment. + google.protobuf.Timestamp end_time = 9; + + // Last update time of this experiment. + google.protobuf.Timestamp last_update_time = 10; + + // Maximum number of days to run the experiment. + google.protobuf.Duration experiment_length = 11; + + // The history of updates to the experiment variants. + repeated VariantsHistory variants_history = 12; +} + +// A list of flow version variants. +message VersionVariants { + // A single flow version with specified traffic allocation. + message Variant { + // The name of the flow version. + // Format: `projects//locations//agents//flows//versions/`. + string version = 1; + + // Percentage of the traffic which should be routed to this + // version of flow. Traffic allocation for a single flow must sum up to 1.0. + float traffic_allocation = 2; + + // Whether the variant is for the control group. + bool is_control_group = 3; + } + + // A list of flow version variants. + repeated Variant variants = 1; +} + +// The history of variants update. +message VariantsHistory { + // The variants updated. We currently only support single variant + // experiment. + oneof variants { + // The flow versions as the variants. + VersionVariants version_variants = 1; + } + + // Update time of the variants. + google.protobuf.Timestamp update_time = 2; +} + +// The request message for [Experiments.ListExperiments][google.cloud.dialogflow.cx.v3beta1.Experiments.ListExperiments]. +message ListExperimentsRequest { + // Required. The [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to list all environments for. + // Format: `projects//locations//agents//environments/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Experiment" + } + ]; + + // The maximum number of items to return in a single page. By default 20 and + // at most 100. + int32 page_size = 2; + + // The next_page_token value returned from a previous list request. + string page_token = 3; +} + +// The response message for [Experiments.ListExperiments][google.cloud.dialogflow.cx.v3beta1.Experiments.ListExperiments]. +message ListExperimentsResponse { + // The list of experiments. There will be a maximum number of items + // returned based on the page_size field in the request. The list may in some + // cases be empty or contain fewer entries than page_size even if this isn't + // the last page. + repeated Experiment experiments = 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; +} + +// The request message for [Experiments.GetExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.GetExperiment]. +message GetExperimentRequest { + // Required. The name of the [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. + // Format: `projects//locations//agents//environments//experiments/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Experiment" + } + ]; +} + +// The request message for [Experiments.CreateExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.CreateExperiment]. +message CreateExperimentRequest { + // Required. The [Agent][google.cloud.dialogflow.cx.v3beta1.Agent] to create an [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] for. + // Format: `projects//locations//agents//environments/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Experiment" + } + ]; + + // Required. The experiment to create. + Experiment experiment = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// The request message for [Experiments.UpdateExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.UpdateExperiment]. +message UpdateExperimentRequest { + // Required. The experiment to update. + Experiment experiment = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The mask to control which fields get updated. + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// The request message for [Experiments.DeleteExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.DeleteExperiment]. +message DeleteExperimentRequest { + // Required. The name of the [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to delete. + // Format: `projects//locations//agents//environments//experiments/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Experiment" + } + ]; +} + +// The request message for [Experiments.StartExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.StartExperiment]. +message StartExperimentRequest { + // Required. Resource name of the experiment to start. + // Format: `projects//locations//agents//environments//experiments/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Experiment" + } + ]; +} + +// The request message for [Experiments.StopExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.StopExperiment]. +message StopExperimentRequest { + // Required. Resource name of the experiment to stop. + // Format: `projects//locations//agents//environments//experiments/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Experiment" + } + ]; +} diff --git a/protos/google/cloud/dialogflow/cx/v3beta1/response_message.proto b/protos/google/cloud/dialogflow/cx/v3beta1/response_message.proto index 431cc66f..7a9f9650 100644 --- a/protos/google/cloud/dialogflow/cx/v3beta1/response_message.proto +++ b/protos/google/cloud/dialogflow/cx/v3beta1/response_message.proto @@ -113,18 +113,6 @@ message ResponseMessage { bool allow_playback_interruption = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; } - // Specifies an audio clip to be played by the client as part of the response. - message PlayAudio { - // Required. URI of the audio clip. Dialogflow does not impose any validation on this - // value. It is specific to the client that reads it. - string audio_uri = 1 [(google.api.field_behavior) = REQUIRED]; - - // Output only. Whether the playback of this message can be interrupted by the end - // user's speech and the client can then starts the next Dialogflow - // request. - bool allow_playback_interruption = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - } - // Represents an audio message that is composed of both segments // synthesized from the Dialogflow agent prompts and ones hosted externally // at the specified URIs. @@ -163,6 +151,18 @@ message ResponseMessage { } + // Specifies an audio clip to be played by the client as part of the response. + message PlayAudio { + // Required. URI of the audio clip. Dialogflow does not impose any validation on this + // value. It is specific to the client that reads it. + string audio_uri = 1 [(google.api.field_behavior) = REQUIRED]; + + // Output only. Whether the playback of this message can be interrupted by the end + // user's speech and the client can then starts the next Dialogflow + // request. + bool allow_playback_interruption = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + // Required. The rich response message. oneof message { // Returns a text response. diff --git a/protos/google/cloud/dialogflow/cx/v3beta1/session.proto b/protos/google/cloud/dialogflow/cx/v3beta1/session.proto index 8b404081..5e8f07aa 100644 --- a/protos/google/cloud/dialogflow/cx/v3beta1/session.proto +++ b/protos/google/cloud/dialogflow/cx/v3beta1/session.proto @@ -380,7 +380,8 @@ message QueryParameters { // - MapKey value: parameter name // - MapValue type: // - If parameter's entity type is a composite entity: map - // - Else: string or number, depending on parameter value type + // - Else: depending on parameter value type, could be one of string, + // number, boolean, null, list or map // - MapValue value: // - If parameter's entity type is a composite entity: // map from composite entity property names to property values @@ -475,7 +476,8 @@ message QueryResult { // - MapKey value: parameter name // - MapValue type: // - If parameter's entity type is a composite entity: map - // - Else: string or number, depending on parameter value type + // - Else: depending on parameter value type, could be one of string, + // number, boolean, null, list or map // - MapValue value: // - If parameter's entity type is a composite entity: // map from composite entity property names to property values @@ -626,7 +628,8 @@ message Match { // - MapKey value: parameter name // - MapValue type: // - If parameter's entity type is a composite entity: map - // - Else: string or number, depending on parameter value type + // - Else: depending on parameter value type, could be one of string, + // number, boolean, null, list or map // - MapValue value: // - If parameter's entity type is a composite entity: // map from composite entity property names to property values diff --git a/protos/protos.d.ts b/protos/protos.d.ts index 528b44fb..7ad5ddf2 100644 --- a/protos/protos.d.ts +++ b/protos/protos.d.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -7964,11 +7964,11 @@ export namespace google { public toJSON(): { [k: string]: any }; } - /** Represents an Intents */ - class Intents extends $protobuf.rpc.Service { + /** Represents an Experiments */ + class Experiments extends $protobuf.rpc.Service { /** - * Constructs a new Intents service. + * Constructs a new Experiments service. * @param rpcImpl RPC implementation * @param [requestDelimited=false] Whether requests are length-delimited * @param [responseDelimited=false] Whether responses are length-delimited @@ -7976,5884 +7976,6153 @@ export namespace google { constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); /** - * Creates new Intents service using the specified rpc implementation. + * Creates new Experiments service using the specified rpc implementation. * @param rpcImpl RPC implementation * @param [requestDelimited=false] Whether requests are length-delimited * @param [responseDelimited=false] Whether responses are length-delimited * @returns RPC service. Useful where requests and/or responses are streamed. */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Intents; + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Experiments; /** - * Calls ListIntents. - * @param request ListIntentsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListIntentsResponse + * Calls ListExperiments. + * @param request ListExperimentsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListExperimentsResponse */ - public listIntents(request: google.cloud.dialogflow.cx.v3.IListIntentsRequest, callback: google.cloud.dialogflow.cx.v3.Intents.ListIntentsCallback): void; + public listExperiments(request: google.cloud.dialogflow.cx.v3.IListExperimentsRequest, callback: google.cloud.dialogflow.cx.v3.Experiments.ListExperimentsCallback): void; /** - * Calls ListIntents. - * @param request ListIntentsRequest message or plain object + * Calls ListExperiments. + * @param request ListExperimentsRequest message or plain object * @returns Promise */ - public listIntents(request: google.cloud.dialogflow.cx.v3.IListIntentsRequest): Promise; + public listExperiments(request: google.cloud.dialogflow.cx.v3.IListExperimentsRequest): Promise; /** - * Calls GetIntent. - * @param request GetIntentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Intent + * Calls GetExperiment. + * @param request GetExperimentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Experiment */ - public getIntent(request: google.cloud.dialogflow.cx.v3.IGetIntentRequest, callback: google.cloud.dialogflow.cx.v3.Intents.GetIntentCallback): void; + public getExperiment(request: google.cloud.dialogflow.cx.v3.IGetExperimentRequest, callback: google.cloud.dialogflow.cx.v3.Experiments.GetExperimentCallback): void; /** - * Calls GetIntent. - * @param request GetIntentRequest message or plain object + * Calls GetExperiment. + * @param request GetExperimentRequest message or plain object * @returns Promise */ - public getIntent(request: google.cloud.dialogflow.cx.v3.IGetIntentRequest): Promise; + public getExperiment(request: google.cloud.dialogflow.cx.v3.IGetExperimentRequest): Promise; /** - * Calls CreateIntent. - * @param request CreateIntentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Intent + * Calls CreateExperiment. + * @param request CreateExperimentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Experiment */ - public createIntent(request: google.cloud.dialogflow.cx.v3.ICreateIntentRequest, callback: google.cloud.dialogflow.cx.v3.Intents.CreateIntentCallback): void; + public createExperiment(request: google.cloud.dialogflow.cx.v3.ICreateExperimentRequest, callback: google.cloud.dialogflow.cx.v3.Experiments.CreateExperimentCallback): void; /** - * Calls CreateIntent. - * @param request CreateIntentRequest message or plain object + * Calls CreateExperiment. + * @param request CreateExperimentRequest message or plain object * @returns Promise */ - public createIntent(request: google.cloud.dialogflow.cx.v3.ICreateIntentRequest): Promise; + public createExperiment(request: google.cloud.dialogflow.cx.v3.ICreateExperimentRequest): Promise; /** - * Calls UpdateIntent. - * @param request UpdateIntentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Intent + * Calls UpdateExperiment. + * @param request UpdateExperimentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Experiment */ - public updateIntent(request: google.cloud.dialogflow.cx.v3.IUpdateIntentRequest, callback: google.cloud.dialogflow.cx.v3.Intents.UpdateIntentCallback): void; + public updateExperiment(request: google.cloud.dialogflow.cx.v3.IUpdateExperimentRequest, callback: google.cloud.dialogflow.cx.v3.Experiments.UpdateExperimentCallback): void; /** - * Calls UpdateIntent. - * @param request UpdateIntentRequest message or plain object + * Calls UpdateExperiment. + * @param request UpdateExperimentRequest message or plain object * @returns Promise */ - public updateIntent(request: google.cloud.dialogflow.cx.v3.IUpdateIntentRequest): Promise; + public updateExperiment(request: google.cloud.dialogflow.cx.v3.IUpdateExperimentRequest): Promise; /** - * Calls DeleteIntent. - * @param request DeleteIntentRequest message or plain object + * Calls DeleteExperiment. + * @param request DeleteExperimentRequest message or plain object * @param callback Node-style callback called with the error, if any, and Empty */ - public deleteIntent(request: google.cloud.dialogflow.cx.v3.IDeleteIntentRequest, callback: google.cloud.dialogflow.cx.v3.Intents.DeleteIntentCallback): void; + public deleteExperiment(request: google.cloud.dialogflow.cx.v3.IDeleteExperimentRequest, callback: google.cloud.dialogflow.cx.v3.Experiments.DeleteExperimentCallback): void; /** - * Calls DeleteIntent. - * @param request DeleteIntentRequest message or plain object + * Calls DeleteExperiment. + * @param request DeleteExperimentRequest message or plain object * @returns Promise */ - public deleteIntent(request: google.cloud.dialogflow.cx.v3.IDeleteIntentRequest): Promise; + public deleteExperiment(request: google.cloud.dialogflow.cx.v3.IDeleteExperimentRequest): Promise; + + /** + * Calls StartExperiment. + * @param request StartExperimentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Experiment + */ + public startExperiment(request: google.cloud.dialogflow.cx.v3.IStartExperimentRequest, callback: google.cloud.dialogflow.cx.v3.Experiments.StartExperimentCallback): void; + + /** + * Calls StartExperiment. + * @param request StartExperimentRequest message or plain object + * @returns Promise + */ + public startExperiment(request: google.cloud.dialogflow.cx.v3.IStartExperimentRequest): Promise; + + /** + * Calls StopExperiment. + * @param request StopExperimentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Experiment + */ + public stopExperiment(request: google.cloud.dialogflow.cx.v3.IStopExperimentRequest, callback: google.cloud.dialogflow.cx.v3.Experiments.StopExperimentCallback): void; + + /** + * Calls StopExperiment. + * @param request StopExperimentRequest message or plain object + * @returns Promise + */ + public stopExperiment(request: google.cloud.dialogflow.cx.v3.IStopExperimentRequest): Promise; } - namespace Intents { + namespace Experiments { /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Intents#listIntents}. + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Experiments#listExperiments}. * @param error Error, if any - * @param [response] ListIntentsResponse + * @param [response] ListExperimentsResponse */ - type ListIntentsCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.ListIntentsResponse) => void; + type ListExperimentsCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.ListExperimentsResponse) => void; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Intents#getIntent}. + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Experiments#getExperiment}. * @param error Error, if any - * @param [response] Intent + * @param [response] Experiment */ - type GetIntentCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.Intent) => void; + type GetExperimentCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.Experiment) => void; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Intents#createIntent}. + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Experiments#createExperiment}. * @param error Error, if any - * @param [response] Intent + * @param [response] Experiment */ - type CreateIntentCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.Intent) => void; + type CreateExperimentCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.Experiment) => void; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Intents#updateIntent}. + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Experiments#updateExperiment}. * @param error Error, if any - * @param [response] Intent + * @param [response] Experiment */ - type UpdateIntentCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.Intent) => void; + type UpdateExperimentCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.Experiment) => void; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Intents#deleteIntent}. + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Experiments#deleteExperiment}. * @param error Error, if any * @param [response] Empty */ - type DeleteIntentCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + type DeleteExperimentCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Experiments#startExperiment}. + * @param error Error, if any + * @param [response] Experiment + */ + type StartExperimentCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.Experiment) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Experiments#stopExperiment}. + * @param error Error, if any + * @param [response] Experiment + */ + type StopExperimentCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.Experiment) => void; } - /** Properties of an Intent. */ - interface IIntent { + /** Properties of an Experiment. */ + interface IExperiment { - /** Intent name */ + /** Experiment name */ name?: (string|null); - /** Intent displayName */ + /** Experiment displayName */ displayName?: (string|null); - /** Intent trainingPhrases */ - trainingPhrases?: (google.cloud.dialogflow.cx.v3.Intent.ITrainingPhrase[]|null); + /** Experiment description */ + description?: (string|null); - /** Intent parameters */ - parameters?: (google.cloud.dialogflow.cx.v3.Intent.IParameter[]|null); + /** Experiment state */ + state?: (google.cloud.dialogflow.cx.v3.Experiment.State|keyof typeof google.cloud.dialogflow.cx.v3.Experiment.State|null); - /** Intent priority */ - priority?: (number|null); + /** Experiment definition */ + definition?: (google.cloud.dialogflow.cx.v3.Experiment.IDefinition|null); - /** Intent isFallback */ - isFallback?: (boolean|null); + /** Experiment result */ + result?: (google.cloud.dialogflow.cx.v3.Experiment.IResult|null); - /** Intent labels */ - labels?: ({ [k: string]: string }|null); + /** Experiment createTime */ + createTime?: (google.protobuf.ITimestamp|null); - /** Intent description */ - description?: (string|null); + /** Experiment startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** Experiment endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** Experiment lastUpdateTime */ + lastUpdateTime?: (google.protobuf.ITimestamp|null); + + /** Experiment experimentLength */ + experimentLength?: (google.protobuf.IDuration|null); + + /** Experiment variantsHistory */ + variantsHistory?: (google.cloud.dialogflow.cx.v3.IVariantsHistory[]|null); } - /** Represents an Intent. */ - class Intent implements IIntent { + /** Represents an Experiment. */ + class Experiment implements IExperiment { /** - * Constructs a new Intent. + * Constructs a new Experiment. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IIntent); + constructor(properties?: google.cloud.dialogflow.cx.v3.IExperiment); - /** Intent name. */ + /** Experiment name. */ public name: string; - /** Intent displayName. */ + /** Experiment displayName. */ public displayName: string; - /** Intent trainingPhrases. */ - public trainingPhrases: google.cloud.dialogflow.cx.v3.Intent.ITrainingPhrase[]; + /** Experiment description. */ + public description: string; - /** Intent parameters. */ - public parameters: google.cloud.dialogflow.cx.v3.Intent.IParameter[]; + /** Experiment state. */ + public state: (google.cloud.dialogflow.cx.v3.Experiment.State|keyof typeof google.cloud.dialogflow.cx.v3.Experiment.State); - /** Intent priority. */ - public priority: number; + /** Experiment definition. */ + public definition?: (google.cloud.dialogflow.cx.v3.Experiment.IDefinition|null); - /** Intent isFallback. */ - public isFallback: boolean; + /** Experiment result. */ + public result?: (google.cloud.dialogflow.cx.v3.Experiment.IResult|null); - /** Intent labels. */ - public labels: { [k: string]: string }; + /** Experiment createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); - /** Intent description. */ - public description: string; + /** Experiment startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** Experiment endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** Experiment lastUpdateTime. */ + public lastUpdateTime?: (google.protobuf.ITimestamp|null); + + /** Experiment experimentLength. */ + public experimentLength?: (google.protobuf.IDuration|null); + + /** Experiment variantsHistory. */ + public variantsHistory: google.cloud.dialogflow.cx.v3.IVariantsHistory[]; /** - * Creates a new Intent instance using the specified properties. + * Creates a new Experiment instance using the specified properties. * @param [properties] Properties to set - * @returns Intent instance + * @returns Experiment instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IIntent): google.cloud.dialogflow.cx.v3.Intent; + public static create(properties?: google.cloud.dialogflow.cx.v3.IExperiment): google.cloud.dialogflow.cx.v3.Experiment; /** - * Encodes the specified Intent message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Intent.verify|verify} messages. - * @param message Intent message or plain object to encode + * Encodes the specified Experiment message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Experiment.verify|verify} messages. + * @param message Experiment message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IIntent, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IExperiment, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Intent message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Intent.verify|verify} messages. - * @param message Intent message or plain object to encode + * Encodes the specified Experiment message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Experiment.verify|verify} messages. + * @param message Experiment message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IIntent, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IExperiment, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Intent message from the specified reader or buffer. + * Decodes an Experiment message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Intent + * @returns Experiment * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.Intent; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.Experiment; /** - * Decodes an Intent message from the specified reader or buffer, length delimited. + * Decodes an Experiment message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Intent + * @returns Experiment * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.Intent; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.Experiment; /** - * Verifies an Intent message. + * Verifies an Experiment message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an Intent message from a plain object. Also converts values to their respective internal types. + * Creates an Experiment message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Intent + * @returns Experiment */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Intent; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Experiment; /** - * Creates a plain object from an Intent message. Also converts values to other types if specified. - * @param message Intent + * Creates a plain object from an Experiment message. Also converts values to other types if specified. + * @param message Experiment * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.Intent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.Experiment, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Intent to JSON. + * Converts this Experiment to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace Intent { - - /** Properties of a TrainingPhrase. */ - interface ITrainingPhrase { + namespace Experiment { - /** TrainingPhrase id */ - id?: (string|null); + /** Properties of a Definition. */ + interface IDefinition { - /** TrainingPhrase parts */ - parts?: (google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.IPart[]|null); + /** Definition condition */ + condition?: (string|null); - /** TrainingPhrase repeatCount */ - repeatCount?: (number|null); + /** Definition versionVariants */ + versionVariants?: (google.cloud.dialogflow.cx.v3.IVersionVariants|null); } - /** Represents a TrainingPhrase. */ - class TrainingPhrase implements ITrainingPhrase { + /** Represents a Definition. */ + class Definition implements IDefinition { /** - * Constructs a new TrainingPhrase. + * Constructs a new Definition. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.Intent.ITrainingPhrase); + constructor(properties?: google.cloud.dialogflow.cx.v3.Experiment.IDefinition); - /** TrainingPhrase id. */ - public id: string; + /** Definition condition. */ + public condition: string; - /** TrainingPhrase parts. */ - public parts: google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.IPart[]; + /** Definition versionVariants. */ + public versionVariants?: (google.cloud.dialogflow.cx.v3.IVersionVariants|null); - /** TrainingPhrase repeatCount. */ - public repeatCount: number; + /** Definition variants. */ + public variants?: "versionVariants"; /** - * Creates a new TrainingPhrase instance using the specified properties. + * Creates a new Definition instance using the specified properties. * @param [properties] Properties to set - * @returns TrainingPhrase instance + * @returns Definition instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.Intent.ITrainingPhrase): google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase; + public static create(properties?: google.cloud.dialogflow.cx.v3.Experiment.IDefinition): google.cloud.dialogflow.cx.v3.Experiment.Definition; /** - * Encodes the specified TrainingPhrase message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.verify|verify} messages. - * @param message TrainingPhrase message or plain object to encode + * Encodes the specified Definition message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Experiment.Definition.verify|verify} messages. + * @param message Definition message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.Intent.ITrainingPhrase, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.Experiment.IDefinition, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TrainingPhrase message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.verify|verify} messages. - * @param message TrainingPhrase message or plain object to encode + * Encodes the specified Definition message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Experiment.Definition.verify|verify} messages. + * @param message Definition message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.Intent.ITrainingPhrase, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.Experiment.IDefinition, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TrainingPhrase message from the specified reader or buffer. + * Decodes a Definition message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TrainingPhrase + * @returns Definition * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.Experiment.Definition; /** - * Decodes a TrainingPhrase message from the specified reader or buffer, length delimited. + * Decodes a Definition message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TrainingPhrase + * @returns Definition * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.Experiment.Definition; /** - * Verifies a TrainingPhrase message. + * Verifies a Definition message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a TrainingPhrase message from a plain object. Also converts values to their respective internal types. + * Creates a Definition message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TrainingPhrase + * @returns Definition */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Experiment.Definition; /** - * Creates a plain object from a TrainingPhrase message. Also converts values to other types if specified. - * @param message TrainingPhrase + * Creates a plain object from a Definition message. Also converts values to other types if specified. + * @param message Definition * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.Experiment.Definition, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TrainingPhrase to JSON. + * Converts this Definition to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace TrainingPhrase { + /** Properties of a Result. */ + interface IResult { - /** Properties of a Part. */ - interface IPart { + /** Result versionMetrics */ + versionMetrics?: (google.cloud.dialogflow.cx.v3.Experiment.Result.IVersionMetrics[]|null); - /** Part text */ - text?: (string|null); + /** Result lastUpdateTime */ + lastUpdateTime?: (google.protobuf.ITimestamp|null); + } - /** Part parameterId */ - parameterId?: (string|null); + /** Represents a Result. */ + class Result implements IResult { + + /** + * Constructs a new Result. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.Experiment.IResult); + + /** Result versionMetrics. */ + public versionMetrics: google.cloud.dialogflow.cx.v3.Experiment.Result.IVersionMetrics[]; + + /** Result lastUpdateTime. */ + public lastUpdateTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new Result instance using the specified properties. + * @param [properties] Properties to set + * @returns Result instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.Experiment.IResult): google.cloud.dialogflow.cx.v3.Experiment.Result; + + /** + * Encodes the specified Result message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Experiment.Result.verify|verify} messages. + * @param message Result message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.Experiment.IResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Result message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Experiment.Result.verify|verify} messages. + * @param message Result message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.Experiment.IResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Result message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Result + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.Experiment.Result; + + /** + * Decodes a Result message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Result + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.Experiment.Result; + + /** + * Verifies a Result message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Result message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Result + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Experiment.Result; + + /** + * Creates a plain object from a Result message. Also converts values to other types if specified. + * @param message Result + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.Experiment.Result, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Result to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Result { + + /** Properties of a ConfidenceInterval. */ + interface IConfidenceInterval { + + /** ConfidenceInterval confidenceLevel */ + confidenceLevel?: (number|null); + + /** ConfidenceInterval ratio */ + ratio?: (number|null); + + /** ConfidenceInterval lowerBound */ + lowerBound?: (number|null); + + /** ConfidenceInterval upperBound */ + upperBound?: (number|null); } - /** Represents a Part. */ - class Part implements IPart { + /** Represents a ConfidenceInterval. */ + class ConfidenceInterval implements IConfidenceInterval { /** - * Constructs a new Part. + * Constructs a new ConfidenceInterval. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.IPart); + constructor(properties?: google.cloud.dialogflow.cx.v3.Experiment.Result.IConfidenceInterval); - /** Part text. */ - public text: string; + /** ConfidenceInterval confidenceLevel. */ + public confidenceLevel: number; - /** Part parameterId. */ - public parameterId: string; + /** ConfidenceInterval ratio. */ + public ratio: number; + + /** ConfidenceInterval lowerBound. */ + public lowerBound: number; + + /** ConfidenceInterval upperBound. */ + public upperBound: number; /** - * Creates a new Part instance using the specified properties. + * Creates a new ConfidenceInterval instance using the specified properties. * @param [properties] Properties to set - * @returns Part instance + * @returns ConfidenceInterval instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.IPart): google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part; + public static create(properties?: google.cloud.dialogflow.cx.v3.Experiment.Result.IConfidenceInterval): google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval; /** - * Encodes the specified Part message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part.verify|verify} messages. - * @param message Part message or plain object to encode + * Encodes the specified ConfidenceInterval message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval.verify|verify} messages. + * @param message ConfidenceInterval message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.IPart, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.Experiment.Result.IConfidenceInterval, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Part message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part.verify|verify} messages. - * @param message Part message or plain object to encode + * Encodes the specified ConfidenceInterval message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval.verify|verify} messages. + * @param message ConfidenceInterval message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.IPart, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.Experiment.Result.IConfidenceInterval, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Part message from the specified reader or buffer. + * Decodes a ConfidenceInterval message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Part + * @returns ConfidenceInterval * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval; /** - * Decodes a Part message from the specified reader or buffer, length delimited. + * Decodes a ConfidenceInterval message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Part + * @returns ConfidenceInterval * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval; /** - * Verifies a Part message. + * Verifies a ConfidenceInterval message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Part message from a plain object. Also converts values to their respective internal types. + * Creates a ConfidenceInterval message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Part + * @returns ConfidenceInterval */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval; /** - * Creates a plain object from a Part message. Also converts values to other types if specified. - * @param message Part + * Creates a plain object from a ConfidenceInterval message. Also converts values to other types if specified. + * @param message ConfidenceInterval * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Part to JSON. + * Converts this ConfidenceInterval to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - } - /** Properties of a Parameter. */ - interface IParameter { + /** Properties of a Metric. */ + interface IMetric { - /** Parameter id */ - id?: (string|null); + /** Metric type */ + type?: (google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType|keyof typeof google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType|null); - /** Parameter entityType */ - entityType?: (string|null); + /** Metric ratio */ + ratio?: (number|null); - /** Parameter isList */ - isList?: (boolean|null); + /** Metric confidenceInterval */ + confidenceInterval?: (google.cloud.dialogflow.cx.v3.Experiment.Result.IConfidenceInterval|null); + } - /** Parameter redact */ - redact?: (boolean|null); - } + /** Represents a Metric. */ + class Metric implements IMetric { - /** Represents a Parameter. */ - class Parameter implements IParameter { + /** + * Constructs a new Metric. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.Experiment.Result.IMetric); - /** - * Constructs a new Parameter. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3.Intent.IParameter); + /** Metric type. */ + public type: (google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType|keyof typeof google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType); - /** Parameter id. */ - public id: string; + /** Metric ratio. */ + public ratio: number; - /** Parameter entityType. */ - public entityType: string; + /** Metric confidenceInterval. */ + public confidenceInterval?: (google.cloud.dialogflow.cx.v3.Experiment.Result.IConfidenceInterval|null); - /** Parameter isList. */ - public isList: boolean; + /** Metric value. */ + public value?: "ratio"; - /** Parameter redact. */ - public redact: boolean; + /** + * Creates a new Metric instance using the specified properties. + * @param [properties] Properties to set + * @returns Metric instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.Experiment.Result.IMetric): google.cloud.dialogflow.cx.v3.Experiment.Result.Metric; - /** - * Creates a new Parameter instance using the specified properties. - * @param [properties] Properties to set - * @returns Parameter instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3.Intent.IParameter): google.cloud.dialogflow.cx.v3.Intent.Parameter; + /** + * Encodes the specified Metric message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Experiment.Result.Metric.verify|verify} messages. + * @param message Metric message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.Experiment.Result.IMetric, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified Parameter message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Intent.Parameter.verify|verify} messages. - * @param message Parameter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.cx.v3.Intent.IParameter, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified Metric message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Experiment.Result.Metric.verify|verify} messages. + * @param message Metric message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.Experiment.Result.IMetric, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified Parameter message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Intent.Parameter.verify|verify} messages. - * @param message Parameter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.Intent.IParameter, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a Metric message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Metric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.Experiment.Result.Metric; - /** - * Decodes a Parameter message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Parameter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.Intent.Parameter; + /** + * Decodes a Metric message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Metric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.Experiment.Result.Metric; - /** - * Decodes a Parameter message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Parameter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.Intent.Parameter; + /** + * Verifies a Metric message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Verifies a Parameter message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Creates a Metric message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Metric + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Experiment.Result.Metric; - /** - * Creates a Parameter message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Parameter - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Intent.Parameter; + /** + * Creates a plain object from a Metric message. Also converts values to other types if specified. + * @param message Metric + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.Experiment.Result.Metric, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a plain object from a Parameter message. Also converts values to other types if specified. - * @param message Parameter - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.cx.v3.Intent.Parameter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Converts this Metric to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Converts this Parameter to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } + /** Properties of a VersionMetrics. */ + interface IVersionMetrics { - /** Properties of a ListIntentsRequest. */ - interface IListIntentsRequest { + /** VersionMetrics version */ + version?: (string|null); - /** ListIntentsRequest parent */ - parent?: (string|null); + /** VersionMetrics metrics */ + metrics?: (google.cloud.dialogflow.cx.v3.Experiment.Result.IMetric[]|null); - /** ListIntentsRequest languageCode */ - languageCode?: (string|null); + /** VersionMetrics sessionCount */ + sessionCount?: (number|null); + } - /** ListIntentsRequest intentView */ - intentView?: (google.cloud.dialogflow.cx.v3.IntentView|keyof typeof google.cloud.dialogflow.cx.v3.IntentView|null); + /** Represents a VersionMetrics. */ + class VersionMetrics implements IVersionMetrics { - /** ListIntentsRequest pageSize */ - pageSize?: (number|null); + /** + * Constructs a new VersionMetrics. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.Experiment.Result.IVersionMetrics); - /** ListIntentsRequest pageToken */ - pageToken?: (string|null); - } + /** VersionMetrics version. */ + public version: string; - /** Represents a ListIntentsRequest. */ - class ListIntentsRequest implements IListIntentsRequest { + /** VersionMetrics metrics. */ + public metrics: google.cloud.dialogflow.cx.v3.Experiment.Result.IMetric[]; - /** - * Constructs a new ListIntentsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IListIntentsRequest); + /** VersionMetrics sessionCount. */ + public sessionCount: number; - /** ListIntentsRequest parent. */ - public parent: string; + /** + * Creates a new VersionMetrics instance using the specified properties. + * @param [properties] Properties to set + * @returns VersionMetrics instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.Experiment.Result.IVersionMetrics): google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics; - /** ListIntentsRequest languageCode. */ - public languageCode: string; + /** + * Encodes the specified VersionMetrics message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics.verify|verify} messages. + * @param message VersionMetrics message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.Experiment.Result.IVersionMetrics, writer?: $protobuf.Writer): $protobuf.Writer; - /** ListIntentsRequest intentView. */ - public intentView: (google.cloud.dialogflow.cx.v3.IntentView|keyof typeof google.cloud.dialogflow.cx.v3.IntentView); + /** + * Encodes the specified VersionMetrics message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics.verify|verify} messages. + * @param message VersionMetrics message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.Experiment.Result.IVersionMetrics, writer?: $protobuf.Writer): $protobuf.Writer; - /** ListIntentsRequest pageSize. */ - public pageSize: number; + /** + * Decodes a VersionMetrics message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VersionMetrics + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics; - /** ListIntentsRequest pageToken. */ - public pageToken: string; + /** + * Decodes a VersionMetrics message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VersionMetrics + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics; - /** - * Creates a new ListIntentsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListIntentsRequest instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IListIntentsRequest): google.cloud.dialogflow.cx.v3.ListIntentsRequest; + /** + * Verifies a VersionMetrics message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Encodes the specified ListIntentsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListIntentsRequest.verify|verify} messages. - * @param message ListIntentsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.cx.v3.IListIntentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a VersionMetrics message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VersionMetrics + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics; - /** - * Encodes the specified ListIntentsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListIntentsRequest.verify|verify} messages. - * @param message ListIntentsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListIntentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a plain object from a VersionMetrics message. Also converts values to other types if specified. + * @param message VersionMetrics + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Decodes a ListIntentsRequest message from the specified reader or buffer. + /** + * Converts this VersionMetrics to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** MetricType enum. */ + enum MetricType { + METRIC_UNSPECIFIED = 0, + CONTAINED_SESSION_NO_CALLBACK_RATE = 1, + LIVE_AGENT_HANDOFF_RATE = 2, + CALLBACK_SESSION_RATE = 3, + ABANDONED_SESSION_RATE = 4, + SESSION_END_RATE = 5 + } + } + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + DRAFT = 1, + RUNNING = 2, + DONE = 3 + } + } + + /** Properties of a VersionVariants. */ + interface IVersionVariants { + + /** VersionVariants variants */ + variants?: (google.cloud.dialogflow.cx.v3.VersionVariants.IVariant[]|null); + } + + /** Represents a VersionVariants. */ + class VersionVariants implements IVersionVariants { + + /** + * Constructs a new VersionVariants. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.IVersionVariants); + + /** VersionVariants variants. */ + public variants: google.cloud.dialogflow.cx.v3.VersionVariants.IVariant[]; + + /** + * Creates a new VersionVariants instance using the specified properties. + * @param [properties] Properties to set + * @returns VersionVariants instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.IVersionVariants): google.cloud.dialogflow.cx.v3.VersionVariants; + + /** + * Encodes the specified VersionVariants message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.VersionVariants.verify|verify} messages. + * @param message VersionVariants message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.IVersionVariants, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VersionVariants message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.VersionVariants.verify|verify} messages. + * @param message VersionVariants message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IVersionVariants, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VersionVariants message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListIntentsRequest + * @returns VersionVariants * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ListIntentsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.VersionVariants; /** - * Decodes a ListIntentsRequest message from the specified reader or buffer, length delimited. + * Decodes a VersionVariants message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListIntentsRequest + * @returns VersionVariants * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ListIntentsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.VersionVariants; /** - * Verifies a ListIntentsRequest message. + * Verifies a VersionVariants message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListIntentsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a VersionVariants message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListIntentsRequest + * @returns VersionVariants */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListIntentsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.VersionVariants; /** - * Creates a plain object from a ListIntentsRequest message. Also converts values to other types if specified. - * @param message ListIntentsRequest + * Creates a plain object from a VersionVariants message. Also converts values to other types if specified. + * @param message VersionVariants * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.ListIntentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.VersionVariants, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListIntentsRequest to JSON. + * Converts this VersionVariants to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListIntentsResponse. */ - interface IListIntentsResponse { + namespace VersionVariants { - /** ListIntentsResponse intents */ - intents?: (google.cloud.dialogflow.cx.v3.IIntent[]|null); + /** Properties of a Variant. */ + interface IVariant { - /** ListIntentsResponse nextPageToken */ - nextPageToken?: (string|null); + /** Variant version */ + version?: (string|null); + + /** Variant trafficAllocation */ + trafficAllocation?: (number|null); + + /** Variant isControlGroup */ + isControlGroup?: (boolean|null); + } + + /** Represents a Variant. */ + class Variant implements IVariant { + + /** + * Constructs a new Variant. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.VersionVariants.IVariant); + + /** Variant version. */ + public version: string; + + /** Variant trafficAllocation. */ + public trafficAllocation: number; + + /** Variant isControlGroup. */ + public isControlGroup: boolean; + + /** + * Creates a new Variant instance using the specified properties. + * @param [properties] Properties to set + * @returns Variant instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.VersionVariants.IVariant): google.cloud.dialogflow.cx.v3.VersionVariants.Variant; + + /** + * Encodes the specified Variant message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.VersionVariants.Variant.verify|verify} messages. + * @param message Variant message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.VersionVariants.IVariant, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Variant message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.VersionVariants.Variant.verify|verify} messages. + * @param message Variant message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.VersionVariants.IVariant, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Variant message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Variant + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.VersionVariants.Variant; + + /** + * Decodes a Variant message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Variant + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.VersionVariants.Variant; + + /** + * Verifies a Variant message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Variant message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Variant + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.VersionVariants.Variant; + + /** + * Creates a plain object from a Variant message. Also converts values to other types if specified. + * @param message Variant + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.VersionVariants.Variant, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Variant to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } } - /** Represents a ListIntentsResponse. */ - class ListIntentsResponse implements IListIntentsResponse { + /** Properties of a VariantsHistory. */ + interface IVariantsHistory { + + /** VariantsHistory versionVariants */ + versionVariants?: (google.cloud.dialogflow.cx.v3.IVersionVariants|null); + + /** VariantsHistory updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a VariantsHistory. */ + class VariantsHistory implements IVariantsHistory { /** - * Constructs a new ListIntentsResponse. + * Constructs a new VariantsHistory. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IListIntentsResponse); + constructor(properties?: google.cloud.dialogflow.cx.v3.IVariantsHistory); - /** ListIntentsResponse intents. */ - public intents: google.cloud.dialogflow.cx.v3.IIntent[]; + /** VariantsHistory versionVariants. */ + public versionVariants?: (google.cloud.dialogflow.cx.v3.IVersionVariants|null); - /** ListIntentsResponse nextPageToken. */ - public nextPageToken: string; + /** VariantsHistory updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** VariantsHistory variants. */ + public variants?: "versionVariants"; /** - * Creates a new ListIntentsResponse instance using the specified properties. + * Creates a new VariantsHistory instance using the specified properties. * @param [properties] Properties to set - * @returns ListIntentsResponse instance + * @returns VariantsHistory instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IListIntentsResponse): google.cloud.dialogflow.cx.v3.ListIntentsResponse; + public static create(properties?: google.cloud.dialogflow.cx.v3.IVariantsHistory): google.cloud.dialogflow.cx.v3.VariantsHistory; /** - * Encodes the specified ListIntentsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListIntentsResponse.verify|verify} messages. - * @param message ListIntentsResponse message or plain object to encode + * Encodes the specified VariantsHistory message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.VariantsHistory.verify|verify} messages. + * @param message VariantsHistory message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IListIntentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IVariantsHistory, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListIntentsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListIntentsResponse.verify|verify} messages. - * @param message ListIntentsResponse message or plain object to encode + * Encodes the specified VariantsHistory message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.VariantsHistory.verify|verify} messages. + * @param message VariantsHistory message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListIntentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IVariantsHistory, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListIntentsResponse message from the specified reader or buffer. + * Decodes a VariantsHistory message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListIntentsResponse + * @returns VariantsHistory * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ListIntentsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.VariantsHistory; /** - * Decodes a ListIntentsResponse message from the specified reader or buffer, length delimited. + * Decodes a VariantsHistory message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListIntentsResponse + * @returns VariantsHistory * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ListIntentsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.VariantsHistory; /** - * Verifies a ListIntentsResponse message. + * Verifies a VariantsHistory message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListIntentsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a VariantsHistory message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListIntentsResponse + * @returns VariantsHistory */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListIntentsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.VariantsHistory; /** - * Creates a plain object from a ListIntentsResponse message. Also converts values to other types if specified. - * @param message ListIntentsResponse + * Creates a plain object from a VariantsHistory message. Also converts values to other types if specified. + * @param message VariantsHistory * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.ListIntentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.VariantsHistory, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListIntentsResponse to JSON. + * Converts this VariantsHistory to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetIntentRequest. */ - interface IGetIntentRequest { + /** Properties of a ListExperimentsRequest. */ + interface IListExperimentsRequest { - /** GetIntentRequest name */ - name?: (string|null); + /** ListExperimentsRequest parent */ + parent?: (string|null); - /** GetIntentRequest languageCode */ - languageCode?: (string|null); + /** ListExperimentsRequest pageSize */ + pageSize?: (number|null); + + /** ListExperimentsRequest pageToken */ + pageToken?: (string|null); } - /** Represents a GetIntentRequest. */ - class GetIntentRequest implements IGetIntentRequest { + /** Represents a ListExperimentsRequest. */ + class ListExperimentsRequest implements IListExperimentsRequest { /** - * Constructs a new GetIntentRequest. + * Constructs a new ListExperimentsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IGetIntentRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3.IListExperimentsRequest); - /** GetIntentRequest name. */ - public name: string; + /** ListExperimentsRequest parent. */ + public parent: string; - /** GetIntentRequest languageCode. */ - public languageCode: string; + /** ListExperimentsRequest pageSize. */ + public pageSize: number; + + /** ListExperimentsRequest pageToken. */ + public pageToken: string; /** - * Creates a new GetIntentRequest instance using the specified properties. + * Creates a new ListExperimentsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetIntentRequest instance + * @returns ListExperimentsRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IGetIntentRequest): google.cloud.dialogflow.cx.v3.GetIntentRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3.IListExperimentsRequest): google.cloud.dialogflow.cx.v3.ListExperimentsRequest; /** - * Encodes the specified GetIntentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetIntentRequest.verify|verify} messages. - * @param message GetIntentRequest message or plain object to encode + * Encodes the specified ListExperimentsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListExperimentsRequest.verify|verify} messages. + * @param message ListExperimentsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IGetIntentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IListExperimentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetIntentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetIntentRequest.verify|verify} messages. - * @param message GetIntentRequest message or plain object to encode + * Encodes the specified ListExperimentsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListExperimentsRequest.verify|verify} messages. + * @param message ListExperimentsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IGetIntentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListExperimentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetIntentRequest message from the specified reader or buffer. + * Decodes a ListExperimentsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetIntentRequest + * @returns ListExperimentsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.GetIntentRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ListExperimentsRequest; /** - * Decodes a GetIntentRequest message from the specified reader or buffer, length delimited. + * Decodes a ListExperimentsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetIntentRequest + * @returns ListExperimentsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.GetIntentRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ListExperimentsRequest; /** - * Verifies a GetIntentRequest message. + * Verifies a ListExperimentsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetIntentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListExperimentsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetIntentRequest + * @returns ListExperimentsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.GetIntentRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListExperimentsRequest; /** - * Creates a plain object from a GetIntentRequest message. Also converts values to other types if specified. - * @param message GetIntentRequest + * Creates a plain object from a ListExperimentsRequest message. Also converts values to other types if specified. + * @param message ListExperimentsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.GetIntentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.ListExperimentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetIntentRequest to JSON. + * Converts this ListExperimentsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CreateIntentRequest. */ - interface ICreateIntentRequest { - - /** CreateIntentRequest parent */ - parent?: (string|null); + /** Properties of a ListExperimentsResponse. */ + interface IListExperimentsResponse { - /** CreateIntentRequest intent */ - intent?: (google.cloud.dialogflow.cx.v3.IIntent|null); + /** ListExperimentsResponse experiments */ + experiments?: (google.cloud.dialogflow.cx.v3.IExperiment[]|null); - /** CreateIntentRequest languageCode */ - languageCode?: (string|null); + /** ListExperimentsResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a CreateIntentRequest. */ - class CreateIntentRequest implements ICreateIntentRequest { + /** Represents a ListExperimentsResponse. */ + class ListExperimentsResponse implements IListExperimentsResponse { /** - * Constructs a new CreateIntentRequest. + * Constructs a new ListExperimentsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.ICreateIntentRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3.IListExperimentsResponse); - /** CreateIntentRequest parent. */ - public parent: string; - - /** CreateIntentRequest intent. */ - public intent?: (google.cloud.dialogflow.cx.v3.IIntent|null); + /** ListExperimentsResponse experiments. */ + public experiments: google.cloud.dialogflow.cx.v3.IExperiment[]; - /** CreateIntentRequest languageCode. */ - public languageCode: string; + /** ListExperimentsResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new CreateIntentRequest instance using the specified properties. + * Creates a new ListExperimentsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns CreateIntentRequest instance + * @returns ListExperimentsResponse instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.ICreateIntentRequest): google.cloud.dialogflow.cx.v3.CreateIntentRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3.IListExperimentsResponse): google.cloud.dialogflow.cx.v3.ListExperimentsResponse; /** - * Encodes the specified CreateIntentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateIntentRequest.verify|verify} messages. - * @param message CreateIntentRequest message or plain object to encode + * Encodes the specified ListExperimentsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListExperimentsResponse.verify|verify} messages. + * @param message ListExperimentsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.ICreateIntentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IListExperimentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateIntentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateIntentRequest.verify|verify} messages. - * @param message CreateIntentRequest message or plain object to encode + * Encodes the specified ListExperimentsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListExperimentsResponse.verify|verify} messages. + * @param message ListExperimentsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ICreateIntentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListExperimentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateIntentRequest message from the specified reader or buffer. + * Decodes a ListExperimentsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateIntentRequest + * @returns ListExperimentsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.CreateIntentRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ListExperimentsResponse; /** - * Decodes a CreateIntentRequest message from the specified reader or buffer, length delimited. + * Decodes a ListExperimentsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateIntentRequest + * @returns ListExperimentsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.CreateIntentRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ListExperimentsResponse; /** - * Verifies a CreateIntentRequest message. + * Verifies a ListExperimentsResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CreateIntentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListExperimentsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateIntentRequest + * @returns ListExperimentsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.CreateIntentRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListExperimentsResponse; /** - * Creates a plain object from a CreateIntentRequest message. Also converts values to other types if specified. - * @param message CreateIntentRequest + * Creates a plain object from a ListExperimentsResponse message. Also converts values to other types if specified. + * @param message ListExperimentsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.CreateIntentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.ListExperimentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateIntentRequest to JSON. + * Converts this ListExperimentsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an UpdateIntentRequest. */ - interface IUpdateIntentRequest { - - /** UpdateIntentRequest intent */ - intent?: (google.cloud.dialogflow.cx.v3.IIntent|null); - - /** UpdateIntentRequest languageCode */ - languageCode?: (string|null); + /** Properties of a GetExperimentRequest. */ + interface IGetExperimentRequest { - /** UpdateIntentRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** GetExperimentRequest name */ + name?: (string|null); } - /** Represents an UpdateIntentRequest. */ - class UpdateIntentRequest implements IUpdateIntentRequest { + /** Represents a GetExperimentRequest. */ + class GetExperimentRequest implements IGetExperimentRequest { /** - * Constructs a new UpdateIntentRequest. + * Constructs a new GetExperimentRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IUpdateIntentRequest); - - /** UpdateIntentRequest intent. */ - public intent?: (google.cloud.dialogflow.cx.v3.IIntent|null); - - /** UpdateIntentRequest languageCode. */ - public languageCode: string; + constructor(properties?: google.cloud.dialogflow.cx.v3.IGetExperimentRequest); - /** UpdateIntentRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** GetExperimentRequest name. */ + public name: string; /** - * Creates a new UpdateIntentRequest instance using the specified properties. + * Creates a new GetExperimentRequest instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateIntentRequest instance + * @returns GetExperimentRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IUpdateIntentRequest): google.cloud.dialogflow.cx.v3.UpdateIntentRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3.IGetExperimentRequest): google.cloud.dialogflow.cx.v3.GetExperimentRequest; /** - * Encodes the specified UpdateIntentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateIntentRequest.verify|verify} messages. - * @param message UpdateIntentRequest message or plain object to encode + * Encodes the specified GetExperimentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetExperimentRequest.verify|verify} messages. + * @param message GetExperimentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IUpdateIntentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IGetExperimentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateIntentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateIntentRequest.verify|verify} messages. - * @param message UpdateIntentRequest message or plain object to encode + * Encodes the specified GetExperimentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetExperimentRequest.verify|verify} messages. + * @param message GetExperimentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IUpdateIntentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IGetExperimentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateIntentRequest message from the specified reader or buffer. + * Decodes a GetExperimentRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateIntentRequest + * @returns GetExperimentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.UpdateIntentRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.GetExperimentRequest; /** - * Decodes an UpdateIntentRequest message from the specified reader or buffer, length delimited. + * Decodes a GetExperimentRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateIntentRequest + * @returns GetExperimentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.UpdateIntentRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.GetExperimentRequest; /** - * Verifies an UpdateIntentRequest message. + * Verifies a GetExperimentRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an UpdateIntentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetExperimentRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateIntentRequest + * @returns GetExperimentRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.UpdateIntentRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.GetExperimentRequest; /** - * Creates a plain object from an UpdateIntentRequest message. Also converts values to other types if specified. - * @param message UpdateIntentRequest + * Creates a plain object from a GetExperimentRequest message. Also converts values to other types if specified. + * @param message GetExperimentRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.UpdateIntentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.GetExperimentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateIntentRequest to JSON. + * Converts this GetExperimentRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DeleteIntentRequest. */ - interface IDeleteIntentRequest { + /** Properties of a CreateExperimentRequest. */ + interface ICreateExperimentRequest { - /** DeleteIntentRequest name */ - name?: (string|null); + /** CreateExperimentRequest parent */ + parent?: (string|null); + + /** CreateExperimentRequest experiment */ + experiment?: (google.cloud.dialogflow.cx.v3.IExperiment|null); } - /** Represents a DeleteIntentRequest. */ - class DeleteIntentRequest implements IDeleteIntentRequest { + /** Represents a CreateExperimentRequest. */ + class CreateExperimentRequest implements ICreateExperimentRequest { /** - * Constructs a new DeleteIntentRequest. + * Constructs a new CreateExperimentRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IDeleteIntentRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3.ICreateExperimentRequest); - /** DeleteIntentRequest name. */ - public name: string; + /** CreateExperimentRequest parent. */ + public parent: string; + + /** CreateExperimentRequest experiment. */ + public experiment?: (google.cloud.dialogflow.cx.v3.IExperiment|null); /** - * Creates a new DeleteIntentRequest instance using the specified properties. + * Creates a new CreateExperimentRequest instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteIntentRequest instance + * @returns CreateExperimentRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IDeleteIntentRequest): google.cloud.dialogflow.cx.v3.DeleteIntentRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3.ICreateExperimentRequest): google.cloud.dialogflow.cx.v3.CreateExperimentRequest; /** - * Encodes the specified DeleteIntentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteIntentRequest.verify|verify} messages. - * @param message DeleteIntentRequest message or plain object to encode + * Encodes the specified CreateExperimentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateExperimentRequest.verify|verify} messages. + * @param message CreateExperimentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IDeleteIntentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.ICreateExperimentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteIntentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteIntentRequest.verify|verify} messages. - * @param message DeleteIntentRequest message or plain object to encode + * Encodes the specified CreateExperimentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateExperimentRequest.verify|verify} messages. + * @param message CreateExperimentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IDeleteIntentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ICreateExperimentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteIntentRequest message from the specified reader or buffer. + * Decodes a CreateExperimentRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteIntentRequest + * @returns CreateExperimentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.DeleteIntentRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.CreateExperimentRequest; /** - * Decodes a DeleteIntentRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateExperimentRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteIntentRequest + * @returns CreateExperimentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.DeleteIntentRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.CreateExperimentRequest; /** - * Verifies a DeleteIntentRequest message. + * Verifies a CreateExperimentRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DeleteIntentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateExperimentRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteIntentRequest + * @returns CreateExperimentRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.DeleteIntentRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.CreateExperimentRequest; /** - * Creates a plain object from a DeleteIntentRequest message. Also converts values to other types if specified. - * @param message DeleteIntentRequest + * Creates a plain object from a CreateExperimentRequest message. Also converts values to other types if specified. + * @param message CreateExperimentRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.DeleteIntentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.CreateExperimentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteIntentRequest to JSON. + * Converts this CreateExperimentRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** IntentView enum. */ - enum IntentView { - INTENT_VIEW_UNSPECIFIED = 0, - INTENT_VIEW_PARTIAL = 1, - INTENT_VIEW_FULL = 2 - } - - /** Represents a SecuritySettingsService */ - class SecuritySettingsService extends $protobuf.rpc.Service { - - /** - * Constructs a new SecuritySettingsService service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); - - /** - * Creates new SecuritySettingsService service using the specified rpc implementation. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - * @returns RPC service. Useful where requests and/or responses are streamed. - */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): SecuritySettingsService; + /** Properties of an UpdateExperimentRequest. */ + interface IUpdateExperimentRequest { - /** - * Calls CreateSecuritySettings. - * @param request CreateSecuritySettingsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and SecuritySettings - */ - public createSecuritySettings(request: google.cloud.dialogflow.cx.v3.ICreateSecuritySettingsRequest, callback: google.cloud.dialogflow.cx.v3.SecuritySettingsService.CreateSecuritySettingsCallback): void; + /** UpdateExperimentRequest experiment */ + experiment?: (google.cloud.dialogflow.cx.v3.IExperiment|null); - /** - * Calls CreateSecuritySettings. - * @param request CreateSecuritySettingsRequest message or plain object - * @returns Promise - */ - public createSecuritySettings(request: google.cloud.dialogflow.cx.v3.ICreateSecuritySettingsRequest): Promise; + /** UpdateExperimentRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } - /** - * Calls GetSecuritySettings. - * @param request GetSecuritySettingsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and SecuritySettings - */ - public getSecuritySettings(request: google.cloud.dialogflow.cx.v3.IGetSecuritySettingsRequest, callback: google.cloud.dialogflow.cx.v3.SecuritySettingsService.GetSecuritySettingsCallback): void; + /** Represents an UpdateExperimentRequest. */ + class UpdateExperimentRequest implements IUpdateExperimentRequest { /** - * Calls GetSecuritySettings. - * @param request GetSecuritySettingsRequest message or plain object - * @returns Promise + * Constructs a new UpdateExperimentRequest. + * @param [properties] Properties to set */ - public getSecuritySettings(request: google.cloud.dialogflow.cx.v3.IGetSecuritySettingsRequest): Promise; + constructor(properties?: google.cloud.dialogflow.cx.v3.IUpdateExperimentRequest); - /** - * Calls UpdateSecuritySettings. - * @param request UpdateSecuritySettingsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and SecuritySettings - */ - public updateSecuritySettings(request: google.cloud.dialogflow.cx.v3.IUpdateSecuritySettingsRequest, callback: google.cloud.dialogflow.cx.v3.SecuritySettingsService.UpdateSecuritySettingsCallback): void; + /** UpdateExperimentRequest experiment. */ + public experiment?: (google.cloud.dialogflow.cx.v3.IExperiment|null); - /** - * Calls UpdateSecuritySettings. - * @param request UpdateSecuritySettingsRequest message or plain object - * @returns Promise - */ - public updateSecuritySettings(request: google.cloud.dialogflow.cx.v3.IUpdateSecuritySettingsRequest): Promise; + /** UpdateExperimentRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); /** - * Calls ListSecuritySettings. - * @param request ListSecuritySettingsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListSecuritySettingsResponse + * Creates a new UpdateExperimentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateExperimentRequest instance */ - public listSecuritySettings(request: google.cloud.dialogflow.cx.v3.IListSecuritySettingsRequest, callback: google.cloud.dialogflow.cx.v3.SecuritySettingsService.ListSecuritySettingsCallback): void; + public static create(properties?: google.cloud.dialogflow.cx.v3.IUpdateExperimentRequest): google.cloud.dialogflow.cx.v3.UpdateExperimentRequest; /** - * Calls ListSecuritySettings. - * @param request ListSecuritySettingsRequest message or plain object - * @returns Promise + * Encodes the specified UpdateExperimentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateExperimentRequest.verify|verify} messages. + * @param message UpdateExperimentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public listSecuritySettings(request: google.cloud.dialogflow.cx.v3.IListSecuritySettingsRequest): Promise; + public static encode(message: google.cloud.dialogflow.cx.v3.IUpdateExperimentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls DeleteSecuritySettings. - * @param request DeleteSecuritySettingsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty + * Encodes the specified UpdateExperimentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateExperimentRequest.verify|verify} messages. + * @param message UpdateExperimentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public deleteSecuritySettings(request: google.cloud.dialogflow.cx.v3.IDeleteSecuritySettingsRequest, callback: google.cloud.dialogflow.cx.v3.SecuritySettingsService.DeleteSecuritySettingsCallback): void; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IUpdateExperimentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls DeleteSecuritySettings. - * @param request DeleteSecuritySettingsRequest message or plain object - * @returns Promise + * Decodes an UpdateExperimentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateExperimentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public deleteSecuritySettings(request: google.cloud.dialogflow.cx.v3.IDeleteSecuritySettingsRequest): Promise; - } - - namespace SecuritySettingsService { + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.UpdateExperimentRequest; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.SecuritySettingsService#createSecuritySettings}. - * @param error Error, if any - * @param [response] SecuritySettings + * Decodes an UpdateExperimentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateExperimentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type CreateSecuritySettingsCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.SecuritySettings) => void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.UpdateExperimentRequest; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.SecuritySettingsService#getSecuritySettings}. - * @param error Error, if any - * @param [response] SecuritySettings + * Verifies an UpdateExperimentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - type GetSecuritySettingsCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.SecuritySettings) => void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.SecuritySettingsService#updateSecuritySettings}. - * @param error Error, if any - * @param [response] SecuritySettings + * Creates an UpdateExperimentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateExperimentRequest */ - type UpdateSecuritySettingsCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.SecuritySettings) => void; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.UpdateExperimentRequest; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.SecuritySettingsService#listSecuritySettings}. - * @param error Error, if any - * @param [response] ListSecuritySettingsResponse + * Creates a plain object from an UpdateExperimentRequest message. Also converts values to other types if specified. + * @param message UpdateExperimentRequest + * @param [options] Conversion options + * @returns Plain object */ - type ListSecuritySettingsCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse) => void; + public static toObject(message: google.cloud.dialogflow.cx.v3.UpdateExperimentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.SecuritySettingsService#deleteSecuritySettings}. - * @param error Error, if any - * @param [response] Empty + * Converts this UpdateExperimentRequest to JSON. + * @returns JSON object */ - type DeleteSecuritySettingsCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + public toJSON(): { [k: string]: any }; } - /** Properties of a GetSecuritySettingsRequest. */ - interface IGetSecuritySettingsRequest { + /** Properties of a DeleteExperimentRequest. */ + interface IDeleteExperimentRequest { - /** GetSecuritySettingsRequest name */ + /** DeleteExperimentRequest name */ name?: (string|null); } - /** Represents a GetSecuritySettingsRequest. */ - class GetSecuritySettingsRequest implements IGetSecuritySettingsRequest { + /** Represents a DeleteExperimentRequest. */ + class DeleteExperimentRequest implements IDeleteExperimentRequest { /** - * Constructs a new GetSecuritySettingsRequest. + * Constructs a new DeleteExperimentRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IGetSecuritySettingsRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3.IDeleteExperimentRequest); - /** GetSecuritySettingsRequest name. */ + /** DeleteExperimentRequest name. */ public name: string; /** - * Creates a new GetSecuritySettingsRequest instance using the specified properties. + * Creates a new DeleteExperimentRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetSecuritySettingsRequest instance + * @returns DeleteExperimentRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IGetSecuritySettingsRequest): google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3.IDeleteExperimentRequest): google.cloud.dialogflow.cx.v3.DeleteExperimentRequest; /** - * Encodes the specified GetSecuritySettingsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest.verify|verify} messages. - * @param message GetSecuritySettingsRequest message or plain object to encode + * Encodes the specified DeleteExperimentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteExperimentRequest.verify|verify} messages. + * @param message DeleteExperimentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IGetSecuritySettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IDeleteExperimentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetSecuritySettingsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest.verify|verify} messages. - * @param message GetSecuritySettingsRequest message or plain object to encode + * Encodes the specified DeleteExperimentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteExperimentRequest.verify|verify} messages. + * @param message DeleteExperimentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IGetSecuritySettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IDeleteExperimentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetSecuritySettingsRequest message from the specified reader or buffer. + * Decodes a DeleteExperimentRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetSecuritySettingsRequest + * @returns DeleteExperimentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.DeleteExperimentRequest; /** - * Decodes a GetSecuritySettingsRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteExperimentRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetSecuritySettingsRequest + * @returns DeleteExperimentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.DeleteExperimentRequest; /** - * Verifies a GetSecuritySettingsRequest message. + * Verifies a DeleteExperimentRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetSecuritySettingsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteExperimentRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetSecuritySettingsRequest + * @returns DeleteExperimentRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.DeleteExperimentRequest; /** - * Creates a plain object from a GetSecuritySettingsRequest message. Also converts values to other types if specified. - * @param message GetSecuritySettingsRequest + * Creates a plain object from a DeleteExperimentRequest message. Also converts values to other types if specified. + * @param message DeleteExperimentRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.DeleteExperimentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetSecuritySettingsRequest to JSON. + * Converts this DeleteExperimentRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an UpdateSecuritySettingsRequest. */ - interface IUpdateSecuritySettingsRequest { - - /** UpdateSecuritySettingsRequest securitySettings */ - securitySettings?: (google.cloud.dialogflow.cx.v3.ISecuritySettings|null); + /** Properties of a StartExperimentRequest. */ + interface IStartExperimentRequest { - /** UpdateSecuritySettingsRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** StartExperimentRequest name */ + name?: (string|null); } - /** Represents an UpdateSecuritySettingsRequest. */ - class UpdateSecuritySettingsRequest implements IUpdateSecuritySettingsRequest { + /** Represents a StartExperimentRequest. */ + class StartExperimentRequest implements IStartExperimentRequest { /** - * Constructs a new UpdateSecuritySettingsRequest. + * Constructs a new StartExperimentRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IUpdateSecuritySettingsRequest); - - /** UpdateSecuritySettingsRequest securitySettings. */ - public securitySettings?: (google.cloud.dialogflow.cx.v3.ISecuritySettings|null); + constructor(properties?: google.cloud.dialogflow.cx.v3.IStartExperimentRequest); - /** UpdateSecuritySettingsRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** StartExperimentRequest name. */ + public name: string; /** - * Creates a new UpdateSecuritySettingsRequest instance using the specified properties. + * Creates a new StartExperimentRequest instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateSecuritySettingsRequest instance + * @returns StartExperimentRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IUpdateSecuritySettingsRequest): google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3.IStartExperimentRequest): google.cloud.dialogflow.cx.v3.StartExperimentRequest; /** - * Encodes the specified UpdateSecuritySettingsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest.verify|verify} messages. - * @param message UpdateSecuritySettingsRequest message or plain object to encode + * Encodes the specified StartExperimentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.StartExperimentRequest.verify|verify} messages. + * @param message StartExperimentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IUpdateSecuritySettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IStartExperimentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateSecuritySettingsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest.verify|verify} messages. - * @param message UpdateSecuritySettingsRequest message or plain object to encode + * Encodes the specified StartExperimentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.StartExperimentRequest.verify|verify} messages. + * @param message StartExperimentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IUpdateSecuritySettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IStartExperimentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateSecuritySettingsRequest message from the specified reader or buffer. + * Decodes a StartExperimentRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateSecuritySettingsRequest + * @returns StartExperimentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.StartExperimentRequest; /** - * Decodes an UpdateSecuritySettingsRequest message from the specified reader or buffer, length delimited. + * Decodes a StartExperimentRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateSecuritySettingsRequest + * @returns StartExperimentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.StartExperimentRequest; /** - * Verifies an UpdateSecuritySettingsRequest message. + * Verifies a StartExperimentRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an UpdateSecuritySettingsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a StartExperimentRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateSecuritySettingsRequest + * @returns StartExperimentRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.StartExperimentRequest; /** - * Creates a plain object from an UpdateSecuritySettingsRequest message. Also converts values to other types if specified. - * @param message UpdateSecuritySettingsRequest + * Creates a plain object from a StartExperimentRequest message. Also converts values to other types if specified. + * @param message StartExperimentRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.StartExperimentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateSecuritySettingsRequest to JSON. + * Converts this StartExperimentRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListSecuritySettingsRequest. */ - interface IListSecuritySettingsRequest { - - /** ListSecuritySettingsRequest parent */ - parent?: (string|null); - - /** ListSecuritySettingsRequest pageSize */ - pageSize?: (number|null); + /** Properties of a StopExperimentRequest. */ + interface IStopExperimentRequest { - /** ListSecuritySettingsRequest pageToken */ - pageToken?: (string|null); + /** StopExperimentRequest name */ + name?: (string|null); } - /** Represents a ListSecuritySettingsRequest. */ - class ListSecuritySettingsRequest implements IListSecuritySettingsRequest { + /** Represents a StopExperimentRequest. */ + class StopExperimentRequest implements IStopExperimentRequest { /** - * Constructs a new ListSecuritySettingsRequest. + * Constructs a new StopExperimentRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IListSecuritySettingsRequest); - - /** ListSecuritySettingsRequest parent. */ - public parent: string; + constructor(properties?: google.cloud.dialogflow.cx.v3.IStopExperimentRequest); - /** ListSecuritySettingsRequest pageSize. */ - public pageSize: number; - - /** ListSecuritySettingsRequest pageToken. */ - public pageToken: string; + /** StopExperimentRequest name. */ + public name: string; /** - * Creates a new ListSecuritySettingsRequest instance using the specified properties. + * Creates a new StopExperimentRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListSecuritySettingsRequest instance + * @returns StopExperimentRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IListSecuritySettingsRequest): google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3.IStopExperimentRequest): google.cloud.dialogflow.cx.v3.StopExperimentRequest; /** - * Encodes the specified ListSecuritySettingsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest.verify|verify} messages. - * @param message ListSecuritySettingsRequest message or plain object to encode + * Encodes the specified StopExperimentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.StopExperimentRequest.verify|verify} messages. + * @param message StopExperimentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IListSecuritySettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IStopExperimentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListSecuritySettingsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest.verify|verify} messages. - * @param message ListSecuritySettingsRequest message or plain object to encode + * Encodes the specified StopExperimentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.StopExperimentRequest.verify|verify} messages. + * @param message StopExperimentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListSecuritySettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IStopExperimentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListSecuritySettingsRequest message from the specified reader or buffer. + * Decodes a StopExperimentRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListSecuritySettingsRequest + * @returns StopExperimentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.StopExperimentRequest; /** - * Decodes a ListSecuritySettingsRequest message from the specified reader or buffer, length delimited. + * Decodes a StopExperimentRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListSecuritySettingsRequest + * @returns StopExperimentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.StopExperimentRequest; /** - * Verifies a ListSecuritySettingsRequest message. + * Verifies a StopExperimentRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListSecuritySettingsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a StopExperimentRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListSecuritySettingsRequest + * @returns StopExperimentRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.StopExperimentRequest; /** - * Creates a plain object from a ListSecuritySettingsRequest message. Also converts values to other types if specified. - * @param message ListSecuritySettingsRequest + * Creates a plain object from a StopExperimentRequest message. Also converts values to other types if specified. + * @param message StopExperimentRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.StopExperimentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListSecuritySettingsRequest to JSON. + * Converts this StopExperimentRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListSecuritySettingsResponse. */ - interface IListSecuritySettingsResponse { - - /** ListSecuritySettingsResponse securitySettings */ - securitySettings?: (google.cloud.dialogflow.cx.v3.ISecuritySettings[]|null); - - /** ListSecuritySettingsResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListSecuritySettingsResponse. */ - class ListSecuritySettingsResponse implements IListSecuritySettingsResponse { - - /** - * Constructs a new ListSecuritySettingsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IListSecuritySettingsResponse); - - /** ListSecuritySettingsResponse securitySettings. */ - public securitySettings: google.cloud.dialogflow.cx.v3.ISecuritySettings[]; - - /** ListSecuritySettingsResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListSecuritySettingsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListSecuritySettingsResponse instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IListSecuritySettingsResponse): google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse; - - /** - * Encodes the specified ListSecuritySettingsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse.verify|verify} messages. - * @param message ListSecuritySettingsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.cx.v3.IListSecuritySettingsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListSecuritySettingsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse.verify|verify} messages. - * @param message ListSecuritySettingsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListSecuritySettingsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListSecuritySettingsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListSecuritySettingsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse; - - /** - * Decodes a ListSecuritySettingsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListSecuritySettingsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse; - - /** - * Verifies a ListSecuritySettingsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListSecuritySettingsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListSecuritySettingsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse; + /** Represents an Intents */ + class Intents extends $protobuf.rpc.Service { /** - * Creates a plain object from a ListSecuritySettingsResponse message. Also converts values to other types if specified. - * @param message ListSecuritySettingsResponse - * @param [options] Conversion options - * @returns Plain object + * Constructs a new Intents service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited */ - public static toObject(message: google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); /** - * Converts this ListSecuritySettingsResponse to JSON. - * @returns JSON object + * Creates new Intents service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a CreateSecuritySettingsRequest. */ - interface ICreateSecuritySettingsRequest { - - /** CreateSecuritySettingsRequest parent */ - parent?: (string|null); - - /** CreateSecuritySettingsRequest securitySettings */ - securitySettings?: (google.cloud.dialogflow.cx.v3.ISecuritySettings|null); - } - - /** Represents a CreateSecuritySettingsRequest. */ - class CreateSecuritySettingsRequest implements ICreateSecuritySettingsRequest { + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Intents; /** - * Constructs a new CreateSecuritySettingsRequest. - * @param [properties] Properties to set + * Calls ListIntents. + * @param request ListIntentsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListIntentsResponse */ - constructor(properties?: google.cloud.dialogflow.cx.v3.ICreateSecuritySettingsRequest); - - /** CreateSecuritySettingsRequest parent. */ - public parent: string; - - /** CreateSecuritySettingsRequest securitySettings. */ - public securitySettings?: (google.cloud.dialogflow.cx.v3.ISecuritySettings|null); + public listIntents(request: google.cloud.dialogflow.cx.v3.IListIntentsRequest, callback: google.cloud.dialogflow.cx.v3.Intents.ListIntentsCallback): void; /** - * Creates a new CreateSecuritySettingsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateSecuritySettingsRequest instance + * Calls ListIntents. + * @param request ListIntentsRequest message or plain object + * @returns Promise */ - public static create(properties?: google.cloud.dialogflow.cx.v3.ICreateSecuritySettingsRequest): google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest; + public listIntents(request: google.cloud.dialogflow.cx.v3.IListIntentsRequest): Promise; /** - * Encodes the specified CreateSecuritySettingsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest.verify|verify} messages. - * @param message CreateSecuritySettingsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls GetIntent. + * @param request GetIntentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Intent */ - public static encode(message: google.cloud.dialogflow.cx.v3.ICreateSecuritySettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public getIntent(request: google.cloud.dialogflow.cx.v3.IGetIntentRequest, callback: google.cloud.dialogflow.cx.v3.Intents.GetIntentCallback): void; /** - * Encodes the specified CreateSecuritySettingsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest.verify|verify} messages. - * @param message CreateSecuritySettingsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls GetIntent. + * @param request GetIntentRequest message or plain object + * @returns Promise */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ICreateSecuritySettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public getIntent(request: google.cloud.dialogflow.cx.v3.IGetIntentRequest): Promise; /** - * Decodes a CreateSecuritySettingsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateSecuritySettingsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls CreateIntent. + * @param request CreateIntentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Intent */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest; + public createIntent(request: google.cloud.dialogflow.cx.v3.ICreateIntentRequest, callback: google.cloud.dialogflow.cx.v3.Intents.CreateIntentCallback): void; /** - * Decodes a CreateSecuritySettingsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateSecuritySettingsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls CreateIntent. + * @param request CreateIntentRequest message or plain object + * @returns Promise */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest; + public createIntent(request: google.cloud.dialogflow.cx.v3.ICreateIntentRequest): Promise; /** - * Verifies a CreateSecuritySettingsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls UpdateIntent. + * @param request UpdateIntentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Intent */ - public static verify(message: { [k: string]: any }): (string|null); + public updateIntent(request: google.cloud.dialogflow.cx.v3.IUpdateIntentRequest, callback: google.cloud.dialogflow.cx.v3.Intents.UpdateIntentCallback): void; /** - * Creates a CreateSecuritySettingsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateSecuritySettingsRequest + * Calls UpdateIntent. + * @param request UpdateIntentRequest message or plain object + * @returns Promise */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest; + public updateIntent(request: google.cloud.dialogflow.cx.v3.IUpdateIntentRequest): Promise; /** - * Creates a plain object from a CreateSecuritySettingsRequest message. Also converts values to other types if specified. - * @param message CreateSecuritySettingsRequest - * @param [options] Conversion options - * @returns Plain object + * Calls DeleteIntent. + * @param request DeleteIntentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty */ - public static toObject(message: google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public deleteIntent(request: google.cloud.dialogflow.cx.v3.IDeleteIntentRequest, callback: google.cloud.dialogflow.cx.v3.Intents.DeleteIntentCallback): void; /** - * Converts this CreateSecuritySettingsRequest to JSON. - * @returns JSON object + * Calls DeleteIntent. + * @param request DeleteIntentRequest message or plain object + * @returns Promise */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a DeleteSecuritySettingsRequest. */ - interface IDeleteSecuritySettingsRequest { - - /** DeleteSecuritySettingsRequest name */ - name?: (string|null); + public deleteIntent(request: google.cloud.dialogflow.cx.v3.IDeleteIntentRequest): Promise; } - /** Represents a DeleteSecuritySettingsRequest. */ - class DeleteSecuritySettingsRequest implements IDeleteSecuritySettingsRequest { - - /** - * Constructs a new DeleteSecuritySettingsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IDeleteSecuritySettingsRequest); - - /** DeleteSecuritySettingsRequest name. */ - public name: string; - - /** - * Creates a new DeleteSecuritySettingsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteSecuritySettingsRequest instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IDeleteSecuritySettingsRequest): google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest; - - /** - * Encodes the specified DeleteSecuritySettingsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest.verify|verify} messages. - * @param message DeleteSecuritySettingsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.cx.v3.IDeleteSecuritySettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteSecuritySettingsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest.verify|verify} messages. - * @param message DeleteSecuritySettingsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IDeleteSecuritySettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteSecuritySettingsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteSecuritySettingsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest; + namespace Intents { /** - * Decodes a DeleteSecuritySettingsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteSecuritySettingsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Intents#listIntents}. + * @param error Error, if any + * @param [response] ListIntentsResponse */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest; + type ListIntentsCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.ListIntentsResponse) => void; /** - * Verifies a DeleteSecuritySettingsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Intents#getIntent}. + * @param error Error, if any + * @param [response] Intent */ - public static verify(message: { [k: string]: any }): (string|null); + type GetIntentCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.Intent) => void; /** - * Creates a DeleteSecuritySettingsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteSecuritySettingsRequest + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Intents#createIntent}. + * @param error Error, if any + * @param [response] Intent */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest; + type CreateIntentCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.Intent) => void; /** - * Creates a plain object from a DeleteSecuritySettingsRequest message. Also converts values to other types if specified. - * @param message DeleteSecuritySettingsRequest - * @param [options] Conversion options - * @returns Plain object + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Intents#updateIntent}. + * @param error Error, if any + * @param [response] Intent */ - public static toObject(message: google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + type UpdateIntentCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.Intent) => void; /** - * Converts this DeleteSecuritySettingsRequest to JSON. - * @returns JSON object + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Intents#deleteIntent}. + * @param error Error, if any + * @param [response] Empty */ - public toJSON(): { [k: string]: any }; + type DeleteIntentCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; } - /** Properties of a SecuritySettings. */ - interface ISecuritySettings { + /** Properties of an Intent. */ + interface IIntent { - /** SecuritySettings name */ + /** Intent name */ name?: (string|null); - /** SecuritySettings displayName */ + /** Intent displayName */ displayName?: (string|null); - /** SecuritySettings redactionStrategy */ - redactionStrategy?: (google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionStrategy|keyof typeof google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionStrategy|null); + /** Intent trainingPhrases */ + trainingPhrases?: (google.cloud.dialogflow.cx.v3.Intent.ITrainingPhrase[]|null); - /** SecuritySettings redactionScope */ - redactionScope?: (google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionScope|keyof typeof google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionScope|null); + /** Intent parameters */ + parameters?: (google.cloud.dialogflow.cx.v3.Intent.IParameter[]|null); - /** SecuritySettings inspectTemplate */ - inspectTemplate?: (string|null); + /** Intent priority */ + priority?: (number|null); - /** SecuritySettings retentionWindowDays */ - retentionWindowDays?: (number|null); + /** Intent isFallback */ + isFallback?: (boolean|null); - /** SecuritySettings purgeDataTypes */ - purgeDataTypes?: (google.cloud.dialogflow.cx.v3.SecuritySettings.PurgeDataType[]|null); + /** Intent labels */ + labels?: ({ [k: string]: string }|null); + + /** Intent description */ + description?: (string|null); } - /** Represents a SecuritySettings. */ - class SecuritySettings implements ISecuritySettings { + /** Represents an Intent. */ + class Intent implements IIntent { /** - * Constructs a new SecuritySettings. + * Constructs a new Intent. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.ISecuritySettings); + constructor(properties?: google.cloud.dialogflow.cx.v3.IIntent); - /** SecuritySettings name. */ + /** Intent name. */ public name: string; - /** SecuritySettings displayName. */ + /** Intent displayName. */ public displayName: string; - /** SecuritySettings redactionStrategy. */ - public redactionStrategy: (google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionStrategy|keyof typeof google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionStrategy); + /** Intent trainingPhrases. */ + public trainingPhrases: google.cloud.dialogflow.cx.v3.Intent.ITrainingPhrase[]; - /** SecuritySettings redactionScope. */ - public redactionScope: (google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionScope|keyof typeof google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionScope); + /** Intent parameters. */ + public parameters: google.cloud.dialogflow.cx.v3.Intent.IParameter[]; - /** SecuritySettings inspectTemplate. */ - public inspectTemplate: string; + /** Intent priority. */ + public priority: number; - /** SecuritySettings retentionWindowDays. */ - public retentionWindowDays: number; + /** Intent isFallback. */ + public isFallback: boolean; - /** SecuritySettings purgeDataTypes. */ - public purgeDataTypes: google.cloud.dialogflow.cx.v3.SecuritySettings.PurgeDataType[]; + /** Intent labels. */ + public labels: { [k: string]: string }; - /** SecuritySettings dataRetention. */ - public dataRetention?: "retentionWindowDays"; + /** Intent description. */ + public description: string; /** - * Creates a new SecuritySettings instance using the specified properties. + * Creates a new Intent instance using the specified properties. * @param [properties] Properties to set - * @returns SecuritySettings instance + * @returns Intent instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.ISecuritySettings): google.cloud.dialogflow.cx.v3.SecuritySettings; + public static create(properties?: google.cloud.dialogflow.cx.v3.IIntent): google.cloud.dialogflow.cx.v3.Intent; /** - * Encodes the specified SecuritySettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SecuritySettings.verify|verify} messages. - * @param message SecuritySettings message or plain object to encode + * Encodes the specified Intent message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Intent.verify|verify} messages. + * @param message Intent message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.ISecuritySettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IIntent, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SecuritySettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SecuritySettings.verify|verify} messages. - * @param message SecuritySettings message or plain object to encode + * Encodes the specified Intent message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Intent.verify|verify} messages. + * @param message Intent message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ISecuritySettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IIntent, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SecuritySettings message from the specified reader or buffer. + * Decodes an Intent message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SecuritySettings + * @returns Intent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.SecuritySettings; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.Intent; /** - * Decodes a SecuritySettings message from the specified reader or buffer, length delimited. + * Decodes an Intent message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SecuritySettings + * @returns Intent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.SecuritySettings; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.Intent; /** - * Verifies a SecuritySettings message. + * Verifies an Intent message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a SecuritySettings message from a plain object. Also converts values to their respective internal types. + * Creates an Intent message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SecuritySettings + * @returns Intent */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.SecuritySettings; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Intent; /** - * Creates a plain object from a SecuritySettings message. Also converts values to other types if specified. - * @param message SecuritySettings + * Creates a plain object from an Intent message. Also converts values to other types if specified. + * @param message Intent * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.SecuritySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.Intent, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SecuritySettings to JSON. + * Converts this Intent to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace SecuritySettings { + namespace Intent { - /** RedactionStrategy enum. */ - enum RedactionStrategy { - REDACTION_STRATEGY_UNSPECIFIED = 0, - REDACT_WITH_SERVICE = 1 - } + /** Properties of a TrainingPhrase. */ + interface ITrainingPhrase { - /** RedactionScope enum. */ - enum RedactionScope { - REDACTION_SCOPE_UNSPECIFIED = 0, - REDACT_DISK_STORAGE = 2 - } + /** TrainingPhrase id */ + id?: (string|null); - /** PurgeDataType enum. */ - enum PurgeDataType { - PURGE_DATA_TYPE_UNSPECIFIED = 0, - DIALOGFLOW_HISTORY = 1 + /** TrainingPhrase parts */ + parts?: (google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.IPart[]|null); + + /** TrainingPhrase repeatCount */ + repeatCount?: (number|null); } - } - /** Represents a Sessions */ - class Sessions extends $protobuf.rpc.Service { + /** Represents a TrainingPhrase. */ + class TrainingPhrase implements ITrainingPhrase { - /** - * Constructs a new Sessions service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + /** + * Constructs a new TrainingPhrase. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.Intent.ITrainingPhrase); - /** - * Creates new Sessions service using the specified rpc implementation. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - * @returns RPC service. Useful where requests and/or responses are streamed. - */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Sessions; + /** TrainingPhrase id. */ + public id: string; - /** - * Calls DetectIntent. - * @param request DetectIntentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and DetectIntentResponse - */ - public detectIntent(request: google.cloud.dialogflow.cx.v3.IDetectIntentRequest, callback: google.cloud.dialogflow.cx.v3.Sessions.DetectIntentCallback): void; + /** TrainingPhrase parts. */ + public parts: google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.IPart[]; - /** - * Calls DetectIntent. - * @param request DetectIntentRequest message or plain object - * @returns Promise - */ - public detectIntent(request: google.cloud.dialogflow.cx.v3.IDetectIntentRequest): Promise; + /** TrainingPhrase repeatCount. */ + public repeatCount: number; - /** - * Calls StreamingDetectIntent. - * @param request StreamingDetectIntentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and StreamingDetectIntentResponse - */ - public streamingDetectIntent(request: google.cloud.dialogflow.cx.v3.IStreamingDetectIntentRequest, callback: google.cloud.dialogflow.cx.v3.Sessions.StreamingDetectIntentCallback): void; + /** + * Creates a new TrainingPhrase instance using the specified properties. + * @param [properties] Properties to set + * @returns TrainingPhrase instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.Intent.ITrainingPhrase): google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase; - /** - * Calls StreamingDetectIntent. - * @param request StreamingDetectIntentRequest message or plain object - * @returns Promise - */ - public streamingDetectIntent(request: google.cloud.dialogflow.cx.v3.IStreamingDetectIntentRequest): Promise; + /** + * Encodes the specified TrainingPhrase message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.verify|verify} messages. + * @param message TrainingPhrase message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.Intent.ITrainingPhrase, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Calls MatchIntent. - * @param request MatchIntentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and MatchIntentResponse - */ - public matchIntent(request: google.cloud.dialogflow.cx.v3.IMatchIntentRequest, callback: google.cloud.dialogflow.cx.v3.Sessions.MatchIntentCallback): void; + /** + * Encodes the specified TrainingPhrase message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.verify|verify} messages. + * @param message TrainingPhrase message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.Intent.ITrainingPhrase, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Calls MatchIntent. - * @param request MatchIntentRequest message or plain object - * @returns Promise - */ - public matchIntent(request: google.cloud.dialogflow.cx.v3.IMatchIntentRequest): Promise; + /** + * Decodes a TrainingPhrase message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TrainingPhrase + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase; - /** - * Calls FulfillIntent. - * @param request FulfillIntentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and FulfillIntentResponse - */ - public fulfillIntent(request: google.cloud.dialogflow.cx.v3.IFulfillIntentRequest, callback: google.cloud.dialogflow.cx.v3.Sessions.FulfillIntentCallback): void; + /** + * Decodes a TrainingPhrase message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TrainingPhrase + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase; - /** - * Calls FulfillIntent. - * @param request FulfillIntentRequest message or plain object - * @returns Promise - */ - public fulfillIntent(request: google.cloud.dialogflow.cx.v3.IFulfillIntentRequest): Promise; - } + /** + * Verifies a TrainingPhrase message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - namespace Sessions { + /** + * Creates a TrainingPhrase message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TrainingPhrase + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase; - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Sessions#detectIntent}. - * @param error Error, if any - * @param [response] DetectIntentResponse - */ - type DetectIntentCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.DetectIntentResponse) => void; + /** + * Creates a plain object from a TrainingPhrase message. Also converts values to other types if specified. + * @param message TrainingPhrase + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Sessions#streamingDetectIntent}. - * @param error Error, if any - * @param [response] StreamingDetectIntentResponse - */ - type StreamingDetectIntentCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse) => void; + /** + * Converts this TrainingPhrase to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Sessions#matchIntent}. - * @param error Error, if any - * @param [response] MatchIntentResponse - */ - type MatchIntentCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.MatchIntentResponse) => void; + namespace TrainingPhrase { - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Sessions#fulfillIntent}. - * @param error Error, if any - * @param [response] FulfillIntentResponse - */ - type FulfillIntentCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.FulfillIntentResponse) => void; + /** Properties of a Part. */ + interface IPart { + + /** Part text */ + text?: (string|null); + + /** Part parameterId */ + parameterId?: (string|null); + } + + /** Represents a Part. */ + class Part implements IPart { + + /** + * Constructs a new Part. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.IPart); + + /** Part text. */ + public text: string; + + /** Part parameterId. */ + public parameterId: string; + + /** + * Creates a new Part instance using the specified properties. + * @param [properties] Properties to set + * @returns Part instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.IPart): google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part; + + /** + * Encodes the specified Part message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part.verify|verify} messages. + * @param message Part message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.IPart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Part message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part.verify|verify} messages. + * @param message Part message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.IPart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Part message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Part + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part; + + /** + * Decodes a Part message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Part + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part; + + /** + * Verifies a Part message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Part message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Part + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part; + + /** + * Creates a plain object from a Part message. Also converts values to other types if specified. + * @param message Part + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Part to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a Parameter. */ + interface IParameter { + + /** Parameter id */ + id?: (string|null); + + /** Parameter entityType */ + entityType?: (string|null); + + /** Parameter isList */ + isList?: (boolean|null); + + /** Parameter redact */ + redact?: (boolean|null); + } + + /** Represents a Parameter. */ + class Parameter implements IParameter { + + /** + * Constructs a new Parameter. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.Intent.IParameter); + + /** Parameter id. */ + public id: string; + + /** Parameter entityType. */ + public entityType: string; + + /** Parameter isList. */ + public isList: boolean; + + /** Parameter redact. */ + public redact: boolean; + + /** + * Creates a new Parameter instance using the specified properties. + * @param [properties] Properties to set + * @returns Parameter instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.Intent.IParameter): google.cloud.dialogflow.cx.v3.Intent.Parameter; + + /** + * Encodes the specified Parameter message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Intent.Parameter.verify|verify} messages. + * @param message Parameter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.Intent.IParameter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Parameter message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Intent.Parameter.verify|verify} messages. + * @param message Parameter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.Intent.IParameter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Parameter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Parameter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.Intent.Parameter; + + /** + * Decodes a Parameter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Parameter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.Intent.Parameter; + + /** + * Verifies a Parameter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Parameter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Parameter + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Intent.Parameter; + + /** + * Creates a plain object from a Parameter message. Also converts values to other types if specified. + * @param message Parameter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.Intent.Parameter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Parameter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } } - /** Properties of a DetectIntentRequest. */ - interface IDetectIntentRequest { + /** Properties of a ListIntentsRequest. */ + interface IListIntentsRequest { - /** DetectIntentRequest session */ - session?: (string|null); + /** ListIntentsRequest parent */ + parent?: (string|null); - /** DetectIntentRequest queryParams */ - queryParams?: (google.cloud.dialogflow.cx.v3.IQueryParameters|null); + /** ListIntentsRequest languageCode */ + languageCode?: (string|null); - /** DetectIntentRequest queryInput */ - queryInput?: (google.cloud.dialogflow.cx.v3.IQueryInput|null); + /** ListIntentsRequest intentView */ + intentView?: (google.cloud.dialogflow.cx.v3.IntentView|keyof typeof google.cloud.dialogflow.cx.v3.IntentView|null); - /** DetectIntentRequest outputAudioConfig */ - outputAudioConfig?: (google.cloud.dialogflow.cx.v3.IOutputAudioConfig|null); + /** ListIntentsRequest pageSize */ + pageSize?: (number|null); + + /** ListIntentsRequest pageToken */ + pageToken?: (string|null); } - /** Represents a DetectIntentRequest. */ - class DetectIntentRequest implements IDetectIntentRequest { + /** Represents a ListIntentsRequest. */ + class ListIntentsRequest implements IListIntentsRequest { /** - * Constructs a new DetectIntentRequest. + * Constructs a new ListIntentsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IDetectIntentRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3.IListIntentsRequest); - /** DetectIntentRequest session. */ - public session: string; + /** ListIntentsRequest parent. */ + public parent: string; - /** DetectIntentRequest queryParams. */ - public queryParams?: (google.cloud.dialogflow.cx.v3.IQueryParameters|null); + /** ListIntentsRequest languageCode. */ + public languageCode: string; - /** DetectIntentRequest queryInput. */ - public queryInput?: (google.cloud.dialogflow.cx.v3.IQueryInput|null); + /** ListIntentsRequest intentView. */ + public intentView: (google.cloud.dialogflow.cx.v3.IntentView|keyof typeof google.cloud.dialogflow.cx.v3.IntentView); - /** DetectIntentRequest outputAudioConfig. */ - public outputAudioConfig?: (google.cloud.dialogflow.cx.v3.IOutputAudioConfig|null); + /** ListIntentsRequest pageSize. */ + public pageSize: number; + + /** ListIntentsRequest pageToken. */ + public pageToken: string; /** - * Creates a new DetectIntentRequest instance using the specified properties. + * Creates a new ListIntentsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns DetectIntentRequest instance + * @returns ListIntentsRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IDetectIntentRequest): google.cloud.dialogflow.cx.v3.DetectIntentRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3.IListIntentsRequest): google.cloud.dialogflow.cx.v3.ListIntentsRequest; /** - * Encodes the specified DetectIntentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DetectIntentRequest.verify|verify} messages. - * @param message DetectIntentRequest message or plain object to encode + * Encodes the specified ListIntentsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListIntentsRequest.verify|verify} messages. + * @param message ListIntentsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IDetectIntentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IListIntentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DetectIntentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DetectIntentRequest.verify|verify} messages. - * @param message DetectIntentRequest message or plain object to encode + * Encodes the specified ListIntentsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListIntentsRequest.verify|verify} messages. + * @param message ListIntentsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IDetectIntentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListIntentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DetectIntentRequest message from the specified reader or buffer. + * Decodes a ListIntentsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DetectIntentRequest + * @returns ListIntentsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.DetectIntentRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ListIntentsRequest; /** - * Decodes a DetectIntentRequest message from the specified reader or buffer, length delimited. + * Decodes a ListIntentsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DetectIntentRequest + * @returns ListIntentsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.DetectIntentRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ListIntentsRequest; /** - * Verifies a DetectIntentRequest message. + * Verifies a ListIntentsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DetectIntentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListIntentsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DetectIntentRequest + * @returns ListIntentsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.DetectIntentRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListIntentsRequest; /** - * Creates a plain object from a DetectIntentRequest message. Also converts values to other types if specified. - * @param message DetectIntentRequest + * Creates a plain object from a ListIntentsRequest message. Also converts values to other types if specified. + * @param message ListIntentsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.DetectIntentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.ListIntentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DetectIntentRequest to JSON. + * Converts this ListIntentsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DetectIntentResponse. */ - interface IDetectIntentResponse { - - /** DetectIntentResponse responseId */ - responseId?: (string|null); - - /** DetectIntentResponse queryResult */ - queryResult?: (google.cloud.dialogflow.cx.v3.IQueryResult|null); + /** Properties of a ListIntentsResponse. */ + interface IListIntentsResponse { - /** DetectIntentResponse outputAudio */ - outputAudio?: (Uint8Array|string|null); + /** ListIntentsResponse intents */ + intents?: (google.cloud.dialogflow.cx.v3.IIntent[]|null); - /** DetectIntentResponse outputAudioConfig */ - outputAudioConfig?: (google.cloud.dialogflow.cx.v3.IOutputAudioConfig|null); + /** ListIntentsResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a DetectIntentResponse. */ - class DetectIntentResponse implements IDetectIntentResponse { + /** Represents a ListIntentsResponse. */ + class ListIntentsResponse implements IListIntentsResponse { /** - * Constructs a new DetectIntentResponse. + * Constructs a new ListIntentsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IDetectIntentResponse); - - /** DetectIntentResponse responseId. */ - public responseId: string; - - /** DetectIntentResponse queryResult. */ - public queryResult?: (google.cloud.dialogflow.cx.v3.IQueryResult|null); + constructor(properties?: google.cloud.dialogflow.cx.v3.IListIntentsResponse); - /** DetectIntentResponse outputAudio. */ - public outputAudio: (Uint8Array|string); + /** ListIntentsResponse intents. */ + public intents: google.cloud.dialogflow.cx.v3.IIntent[]; - /** DetectIntentResponse outputAudioConfig. */ - public outputAudioConfig?: (google.cloud.dialogflow.cx.v3.IOutputAudioConfig|null); + /** ListIntentsResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new DetectIntentResponse instance using the specified properties. + * Creates a new ListIntentsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns DetectIntentResponse instance + * @returns ListIntentsResponse instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IDetectIntentResponse): google.cloud.dialogflow.cx.v3.DetectIntentResponse; + public static create(properties?: google.cloud.dialogflow.cx.v3.IListIntentsResponse): google.cloud.dialogflow.cx.v3.ListIntentsResponse; /** - * Encodes the specified DetectIntentResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DetectIntentResponse.verify|verify} messages. - * @param message DetectIntentResponse message or plain object to encode + * Encodes the specified ListIntentsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListIntentsResponse.verify|verify} messages. + * @param message ListIntentsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IDetectIntentResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IListIntentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DetectIntentResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DetectIntentResponse.verify|verify} messages. - * @param message DetectIntentResponse message or plain object to encode + * Encodes the specified ListIntentsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListIntentsResponse.verify|verify} messages. + * @param message ListIntentsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IDetectIntentResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListIntentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DetectIntentResponse message from the specified reader or buffer. + * Decodes a ListIntentsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DetectIntentResponse + * @returns ListIntentsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.DetectIntentResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ListIntentsResponse; /** - * Decodes a DetectIntentResponse message from the specified reader or buffer, length delimited. + * Decodes a ListIntentsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DetectIntentResponse + * @returns ListIntentsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.DetectIntentResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ListIntentsResponse; /** - * Verifies a DetectIntentResponse message. + * Verifies a ListIntentsResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DetectIntentResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListIntentsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DetectIntentResponse + * @returns ListIntentsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.DetectIntentResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListIntentsResponse; /** - * Creates a plain object from a DetectIntentResponse message. Also converts values to other types if specified. - * @param message DetectIntentResponse + * Creates a plain object from a ListIntentsResponse message. Also converts values to other types if specified. + * @param message ListIntentsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.DetectIntentResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.ListIntentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DetectIntentResponse to JSON. + * Converts this ListIntentsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a StreamingDetectIntentRequest. */ - interface IStreamingDetectIntentRequest { - - /** StreamingDetectIntentRequest session */ - session?: (string|null); - - /** StreamingDetectIntentRequest queryParams */ - queryParams?: (google.cloud.dialogflow.cx.v3.IQueryParameters|null); + /** Properties of a GetIntentRequest. */ + interface IGetIntentRequest { - /** StreamingDetectIntentRequest queryInput */ - queryInput?: (google.cloud.dialogflow.cx.v3.IQueryInput|null); + /** GetIntentRequest name */ + name?: (string|null); - /** StreamingDetectIntentRequest outputAudioConfig */ - outputAudioConfig?: (google.cloud.dialogflow.cx.v3.IOutputAudioConfig|null); + /** GetIntentRequest languageCode */ + languageCode?: (string|null); } - /** Represents a StreamingDetectIntentRequest. */ - class StreamingDetectIntentRequest implements IStreamingDetectIntentRequest { + /** Represents a GetIntentRequest. */ + class GetIntentRequest implements IGetIntentRequest { /** - * Constructs a new StreamingDetectIntentRequest. + * Constructs a new GetIntentRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IStreamingDetectIntentRequest); - - /** StreamingDetectIntentRequest session. */ - public session: string; - - /** StreamingDetectIntentRequest queryParams. */ - public queryParams?: (google.cloud.dialogflow.cx.v3.IQueryParameters|null); + constructor(properties?: google.cloud.dialogflow.cx.v3.IGetIntentRequest); - /** StreamingDetectIntentRequest queryInput. */ - public queryInput?: (google.cloud.dialogflow.cx.v3.IQueryInput|null); + /** GetIntentRequest name. */ + public name: string; - /** StreamingDetectIntentRequest outputAudioConfig. */ - public outputAudioConfig?: (google.cloud.dialogflow.cx.v3.IOutputAudioConfig|null); + /** GetIntentRequest languageCode. */ + public languageCode: string; /** - * Creates a new StreamingDetectIntentRequest instance using the specified properties. + * Creates a new GetIntentRequest instance using the specified properties. * @param [properties] Properties to set - * @returns StreamingDetectIntentRequest instance + * @returns GetIntentRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IStreamingDetectIntentRequest): google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3.IGetIntentRequest): google.cloud.dialogflow.cx.v3.GetIntentRequest; /** - * Encodes the specified StreamingDetectIntentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest.verify|verify} messages. - * @param message StreamingDetectIntentRequest message or plain object to encode + * Encodes the specified GetIntentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetIntentRequest.verify|verify} messages. + * @param message GetIntentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IStreamingDetectIntentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IGetIntentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified StreamingDetectIntentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest.verify|verify} messages. - * @param message StreamingDetectIntentRequest message or plain object to encode + * Encodes the specified GetIntentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetIntentRequest.verify|verify} messages. + * @param message GetIntentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IStreamingDetectIntentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IGetIntentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a StreamingDetectIntentRequest message from the specified reader or buffer. + * Decodes a GetIntentRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns StreamingDetectIntentRequest + * @returns GetIntentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.GetIntentRequest; /** - * Decodes a StreamingDetectIntentRequest message from the specified reader or buffer, length delimited. + * Decodes a GetIntentRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns StreamingDetectIntentRequest + * @returns GetIntentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.GetIntentRequest; /** - * Verifies a StreamingDetectIntentRequest message. + * Verifies a GetIntentRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a StreamingDetectIntentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetIntentRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns StreamingDetectIntentRequest + * @returns GetIntentRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.GetIntentRequest; /** - * Creates a plain object from a StreamingDetectIntentRequest message. Also converts values to other types if specified. - * @param message StreamingDetectIntentRequest + * Creates a plain object from a GetIntentRequest message. Also converts values to other types if specified. + * @param message GetIntentRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.GetIntentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this StreamingDetectIntentRequest to JSON. + * Converts this GetIntentRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a StreamingDetectIntentResponse. */ - interface IStreamingDetectIntentResponse { + /** Properties of a CreateIntentRequest. */ + interface ICreateIntentRequest { - /** StreamingDetectIntentResponse recognitionResult */ - recognitionResult?: (google.cloud.dialogflow.cx.v3.IStreamingRecognitionResult|null); + /** CreateIntentRequest parent */ + parent?: (string|null); - /** StreamingDetectIntentResponse detectIntentResponse */ - detectIntentResponse?: (google.cloud.dialogflow.cx.v3.IDetectIntentResponse|null); + /** CreateIntentRequest intent */ + intent?: (google.cloud.dialogflow.cx.v3.IIntent|null); + + /** CreateIntentRequest languageCode */ + languageCode?: (string|null); } - /** Represents a StreamingDetectIntentResponse. */ - class StreamingDetectIntentResponse implements IStreamingDetectIntentResponse { + /** Represents a CreateIntentRequest. */ + class CreateIntentRequest implements ICreateIntentRequest { /** - * Constructs a new StreamingDetectIntentResponse. + * Constructs a new CreateIntentRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IStreamingDetectIntentResponse); + constructor(properties?: google.cloud.dialogflow.cx.v3.ICreateIntentRequest); - /** StreamingDetectIntentResponse recognitionResult. */ - public recognitionResult?: (google.cloud.dialogflow.cx.v3.IStreamingRecognitionResult|null); + /** CreateIntentRequest parent. */ + public parent: string; - /** StreamingDetectIntentResponse detectIntentResponse. */ - public detectIntentResponse?: (google.cloud.dialogflow.cx.v3.IDetectIntentResponse|null); + /** CreateIntentRequest intent. */ + public intent?: (google.cloud.dialogflow.cx.v3.IIntent|null); - /** StreamingDetectIntentResponse response. */ - public response?: ("recognitionResult"|"detectIntentResponse"); + /** CreateIntentRequest languageCode. */ + public languageCode: string; /** - * Creates a new StreamingDetectIntentResponse instance using the specified properties. + * Creates a new CreateIntentRequest instance using the specified properties. * @param [properties] Properties to set - * @returns StreamingDetectIntentResponse instance + * @returns CreateIntentRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IStreamingDetectIntentResponse): google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse; + public static create(properties?: google.cloud.dialogflow.cx.v3.ICreateIntentRequest): google.cloud.dialogflow.cx.v3.CreateIntentRequest; /** - * Encodes the specified StreamingDetectIntentResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse.verify|verify} messages. - * @param message StreamingDetectIntentResponse message or plain object to encode + * Encodes the specified CreateIntentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateIntentRequest.verify|verify} messages. + * @param message CreateIntentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IStreamingDetectIntentResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.ICreateIntentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified StreamingDetectIntentResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse.verify|verify} messages. - * @param message StreamingDetectIntentResponse message or plain object to encode + * Encodes the specified CreateIntentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateIntentRequest.verify|verify} messages. + * @param message CreateIntentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IStreamingDetectIntentResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ICreateIntentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a StreamingDetectIntentResponse message from the specified reader or buffer. + * Decodes a CreateIntentRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns StreamingDetectIntentResponse + * @returns CreateIntentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.CreateIntentRequest; /** - * Decodes a StreamingDetectIntentResponse message from the specified reader or buffer, length delimited. + * Decodes a CreateIntentRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns StreamingDetectIntentResponse + * @returns CreateIntentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.CreateIntentRequest; /** - * Verifies a StreamingDetectIntentResponse message. + * Verifies a CreateIntentRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a StreamingDetectIntentResponse message from a plain object. Also converts values to their respective internal types. + * Creates a CreateIntentRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns StreamingDetectIntentResponse + * @returns CreateIntentRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.CreateIntentRequest; /** - * Creates a plain object from a StreamingDetectIntentResponse message. Also converts values to other types if specified. - * @param message StreamingDetectIntentResponse + * Creates a plain object from a CreateIntentRequest message. Also converts values to other types if specified. + * @param message CreateIntentRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.CreateIntentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this StreamingDetectIntentResponse to JSON. + * Converts this CreateIntentRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a StreamingRecognitionResult. */ - interface IStreamingRecognitionResult { - - /** StreamingRecognitionResult messageType */ - messageType?: (google.cloud.dialogflow.cx.v3.StreamingRecognitionResult.MessageType|keyof typeof google.cloud.dialogflow.cx.v3.StreamingRecognitionResult.MessageType|null); - - /** StreamingRecognitionResult transcript */ - transcript?: (string|null); - - /** StreamingRecognitionResult isFinal */ - isFinal?: (boolean|null); - - /** StreamingRecognitionResult confidence */ - confidence?: (number|null); + /** Properties of an UpdateIntentRequest. */ + interface IUpdateIntentRequest { - /** StreamingRecognitionResult stability */ - stability?: (number|null); + /** UpdateIntentRequest intent */ + intent?: (google.cloud.dialogflow.cx.v3.IIntent|null); - /** StreamingRecognitionResult speechWordInfo */ - speechWordInfo?: (google.cloud.dialogflow.cx.v3.ISpeechWordInfo[]|null); + /** UpdateIntentRequest languageCode */ + languageCode?: (string|null); - /** StreamingRecognitionResult speechEndOffset */ - speechEndOffset?: (google.protobuf.IDuration|null); + /** UpdateIntentRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); } - /** Represents a StreamingRecognitionResult. */ - class StreamingRecognitionResult implements IStreamingRecognitionResult { + /** Represents an UpdateIntentRequest. */ + class UpdateIntentRequest implements IUpdateIntentRequest { /** - * Constructs a new StreamingRecognitionResult. + * Constructs a new UpdateIntentRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IStreamingRecognitionResult); - - /** StreamingRecognitionResult messageType. */ - public messageType: (google.cloud.dialogflow.cx.v3.StreamingRecognitionResult.MessageType|keyof typeof google.cloud.dialogflow.cx.v3.StreamingRecognitionResult.MessageType); - - /** StreamingRecognitionResult transcript. */ - public transcript: string; - - /** StreamingRecognitionResult isFinal. */ - public isFinal: boolean; - - /** StreamingRecognitionResult confidence. */ - public confidence: number; + constructor(properties?: google.cloud.dialogflow.cx.v3.IUpdateIntentRequest); - /** StreamingRecognitionResult stability. */ - public stability: number; + /** UpdateIntentRequest intent. */ + public intent?: (google.cloud.dialogflow.cx.v3.IIntent|null); - /** StreamingRecognitionResult speechWordInfo. */ - public speechWordInfo: google.cloud.dialogflow.cx.v3.ISpeechWordInfo[]; + /** UpdateIntentRequest languageCode. */ + public languageCode: string; - /** StreamingRecognitionResult speechEndOffset. */ - public speechEndOffset?: (google.protobuf.IDuration|null); + /** UpdateIntentRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); /** - * Creates a new StreamingRecognitionResult instance using the specified properties. + * Creates a new UpdateIntentRequest instance using the specified properties. * @param [properties] Properties to set - * @returns StreamingRecognitionResult instance + * @returns UpdateIntentRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IStreamingRecognitionResult): google.cloud.dialogflow.cx.v3.StreamingRecognitionResult; + public static create(properties?: google.cloud.dialogflow.cx.v3.IUpdateIntentRequest): google.cloud.dialogflow.cx.v3.UpdateIntentRequest; /** - * Encodes the specified StreamingRecognitionResult message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.StreamingRecognitionResult.verify|verify} messages. - * @param message StreamingRecognitionResult message or plain object to encode + * Encodes the specified UpdateIntentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateIntentRequest.verify|verify} messages. + * @param message UpdateIntentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IStreamingRecognitionResult, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IUpdateIntentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified StreamingRecognitionResult message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.StreamingRecognitionResult.verify|verify} messages. - * @param message StreamingRecognitionResult message or plain object to encode + * Encodes the specified UpdateIntentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateIntentRequest.verify|verify} messages. + * @param message UpdateIntentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IStreamingRecognitionResult, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IUpdateIntentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a StreamingRecognitionResult message from the specified reader or buffer. + * Decodes an UpdateIntentRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns StreamingRecognitionResult + * @returns UpdateIntentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.StreamingRecognitionResult; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.UpdateIntentRequest; /** - * Decodes a StreamingRecognitionResult message from the specified reader or buffer, length delimited. + * Decodes an UpdateIntentRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns StreamingRecognitionResult + * @returns UpdateIntentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.StreamingRecognitionResult; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.UpdateIntentRequest; /** - * Verifies a StreamingRecognitionResult message. + * Verifies an UpdateIntentRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a StreamingRecognitionResult message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateIntentRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns StreamingRecognitionResult + * @returns UpdateIntentRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.StreamingRecognitionResult; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.UpdateIntentRequest; /** - * Creates a plain object from a StreamingRecognitionResult message. Also converts values to other types if specified. - * @param message StreamingRecognitionResult + * Creates a plain object from an UpdateIntentRequest message. Also converts values to other types if specified. + * @param message UpdateIntentRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.StreamingRecognitionResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.UpdateIntentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this StreamingRecognitionResult to JSON. + * Converts this UpdateIntentRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace StreamingRecognitionResult { - - /** MessageType enum. */ - enum MessageType { - MESSAGE_TYPE_UNSPECIFIED = 0, - TRANSCRIPT = 1, - END_OF_SINGLE_UTTERANCE = 2 - } - } - - /** Properties of a QueryParameters. */ - interface IQueryParameters { - - /** QueryParameters timeZone */ - timeZone?: (string|null); - - /** QueryParameters geoLocation */ - geoLocation?: (google.type.ILatLng|null); - - /** QueryParameters sessionEntityTypes */ - sessionEntityTypes?: (google.cloud.dialogflow.cx.v3.ISessionEntityType[]|null); - - /** QueryParameters payload */ - payload?: (google.protobuf.IStruct|null); - - /** QueryParameters parameters */ - parameters?: (google.protobuf.IStruct|null); + /** Properties of a DeleteIntentRequest. */ + interface IDeleteIntentRequest { - /** QueryParameters analyzeQueryTextSentiment */ - analyzeQueryTextSentiment?: (boolean|null); + /** DeleteIntentRequest name */ + name?: (string|null); } - /** Represents a QueryParameters. */ - class QueryParameters implements IQueryParameters { + /** Represents a DeleteIntentRequest. */ + class DeleteIntentRequest implements IDeleteIntentRequest { /** - * Constructs a new QueryParameters. + * Constructs a new DeleteIntentRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IQueryParameters); - - /** QueryParameters timeZone. */ - public timeZone: string; - - /** QueryParameters geoLocation. */ - public geoLocation?: (google.type.ILatLng|null); - - /** QueryParameters sessionEntityTypes. */ - public sessionEntityTypes: google.cloud.dialogflow.cx.v3.ISessionEntityType[]; - - /** QueryParameters payload. */ - public payload?: (google.protobuf.IStruct|null); - - /** QueryParameters parameters. */ - public parameters?: (google.protobuf.IStruct|null); + constructor(properties?: google.cloud.dialogflow.cx.v3.IDeleteIntentRequest); - /** QueryParameters analyzeQueryTextSentiment. */ - public analyzeQueryTextSentiment: boolean; + /** DeleteIntentRequest name. */ + public name: string; /** - * Creates a new QueryParameters instance using the specified properties. + * Creates a new DeleteIntentRequest instance using the specified properties. * @param [properties] Properties to set - * @returns QueryParameters instance + * @returns DeleteIntentRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IQueryParameters): google.cloud.dialogflow.cx.v3.QueryParameters; + public static create(properties?: google.cloud.dialogflow.cx.v3.IDeleteIntentRequest): google.cloud.dialogflow.cx.v3.DeleteIntentRequest; /** - * Encodes the specified QueryParameters message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.QueryParameters.verify|verify} messages. - * @param message QueryParameters message or plain object to encode + * Encodes the specified DeleteIntentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteIntentRequest.verify|verify} messages. + * @param message DeleteIntentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IQueryParameters, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IDeleteIntentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified QueryParameters message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.QueryParameters.verify|verify} messages. - * @param message QueryParameters message or plain object to encode + * Encodes the specified DeleteIntentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteIntentRequest.verify|verify} messages. + * @param message DeleteIntentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IQueryParameters, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IDeleteIntentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a QueryParameters message from the specified reader or buffer. + * Decodes a DeleteIntentRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns QueryParameters + * @returns DeleteIntentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.QueryParameters; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.DeleteIntentRequest; /** - * Decodes a QueryParameters message from the specified reader or buffer, length delimited. + * Decodes a DeleteIntentRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns QueryParameters + * @returns DeleteIntentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.QueryParameters; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.DeleteIntentRequest; /** - * Verifies a QueryParameters message. + * Verifies a DeleteIntentRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a QueryParameters message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteIntentRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns QueryParameters + * @returns DeleteIntentRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.QueryParameters; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.DeleteIntentRequest; /** - * Creates a plain object from a QueryParameters message. Also converts values to other types if specified. - * @param message QueryParameters + * Creates a plain object from a DeleteIntentRequest message. Also converts values to other types if specified. + * @param message DeleteIntentRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.QueryParameters, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.DeleteIntentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this QueryParameters to JSON. + * Converts this DeleteIntentRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a QueryInput. */ - interface IQueryInput { - - /** QueryInput text */ - text?: (google.cloud.dialogflow.cx.v3.ITextInput|null); - - /** QueryInput intent */ - intent?: (google.cloud.dialogflow.cx.v3.IIntentInput|null); - - /** QueryInput audio */ - audio?: (google.cloud.dialogflow.cx.v3.IAudioInput|null); - - /** QueryInput event */ - event?: (google.cloud.dialogflow.cx.v3.IEventInput|null); - - /** QueryInput dtmf */ - dtmf?: (google.cloud.dialogflow.cx.v3.IDtmfInput|null); - - /** QueryInput languageCode */ - languageCode?: (string|null); + /** IntentView enum. */ + enum IntentView { + INTENT_VIEW_UNSPECIFIED = 0, + INTENT_VIEW_PARTIAL = 1, + INTENT_VIEW_FULL = 2 } - /** Represents a QueryInput. */ - class QueryInput implements IQueryInput { + /** Represents a SecuritySettingsService */ + class SecuritySettingsService extends $protobuf.rpc.Service { /** - * Constructs a new QueryInput. - * @param [properties] Properties to set + * Constructs a new SecuritySettingsService service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IQueryInput); - - /** QueryInput text. */ - public text?: (google.cloud.dialogflow.cx.v3.ITextInput|null); - - /** QueryInput intent. */ - public intent?: (google.cloud.dialogflow.cx.v3.IIntentInput|null); - - /** QueryInput audio. */ - public audio?: (google.cloud.dialogflow.cx.v3.IAudioInput|null); - - /** QueryInput event. */ - public event?: (google.cloud.dialogflow.cx.v3.IEventInput|null); - - /** QueryInput dtmf. */ - public dtmf?: (google.cloud.dialogflow.cx.v3.IDtmfInput|null); - - /** QueryInput languageCode. */ - public languageCode: string; + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); - /** QueryInput input. */ - public input?: ("text"|"intent"|"audio"|"event"|"dtmf"); + /** + * Creates new SecuritySettingsService service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): SecuritySettingsService; /** - * Creates a new QueryInput instance using the specified properties. - * @param [properties] Properties to set - * @returns QueryInput instance + * Calls CreateSecuritySettings. + * @param request CreateSecuritySettingsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SecuritySettings */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IQueryInput): google.cloud.dialogflow.cx.v3.QueryInput; + public createSecuritySettings(request: google.cloud.dialogflow.cx.v3.ICreateSecuritySettingsRequest, callback: google.cloud.dialogflow.cx.v3.SecuritySettingsService.CreateSecuritySettingsCallback): void; /** - * Encodes the specified QueryInput message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.QueryInput.verify|verify} messages. - * @param message QueryInput message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls CreateSecuritySettings. + * @param request CreateSecuritySettingsRequest message or plain object + * @returns Promise */ - public static encode(message: google.cloud.dialogflow.cx.v3.IQueryInput, writer?: $protobuf.Writer): $protobuf.Writer; + public createSecuritySettings(request: google.cloud.dialogflow.cx.v3.ICreateSecuritySettingsRequest): Promise; /** - * Encodes the specified QueryInput message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.QueryInput.verify|verify} messages. - * @param message QueryInput message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls GetSecuritySettings. + * @param request GetSecuritySettingsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SecuritySettings */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IQueryInput, writer?: $protobuf.Writer): $protobuf.Writer; + public getSecuritySettings(request: google.cloud.dialogflow.cx.v3.IGetSecuritySettingsRequest, callback: google.cloud.dialogflow.cx.v3.SecuritySettingsService.GetSecuritySettingsCallback): void; /** - * Decodes a QueryInput message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryInput - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls GetSecuritySettings. + * @param request GetSecuritySettingsRequest message or plain object + * @returns Promise */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.QueryInput; + public getSecuritySettings(request: google.cloud.dialogflow.cx.v3.IGetSecuritySettingsRequest): Promise; /** - * Decodes a QueryInput message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryInput - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls UpdateSecuritySettings. + * @param request UpdateSecuritySettingsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SecuritySettings */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.QueryInput; + public updateSecuritySettings(request: google.cloud.dialogflow.cx.v3.IUpdateSecuritySettingsRequest, callback: google.cloud.dialogflow.cx.v3.SecuritySettingsService.UpdateSecuritySettingsCallback): void; /** - * Verifies a QueryInput message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls UpdateSecuritySettings. + * @param request UpdateSecuritySettingsRequest message or plain object + * @returns Promise */ - public static verify(message: { [k: string]: any }): (string|null); + public updateSecuritySettings(request: google.cloud.dialogflow.cx.v3.IUpdateSecuritySettingsRequest): Promise; /** - * Creates a QueryInput message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryInput + * Calls ListSecuritySettings. + * @param request ListSecuritySettingsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListSecuritySettingsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.QueryInput; + public listSecuritySettings(request: google.cloud.dialogflow.cx.v3.IListSecuritySettingsRequest, callback: google.cloud.dialogflow.cx.v3.SecuritySettingsService.ListSecuritySettingsCallback): void; /** - * Creates a plain object from a QueryInput message. Also converts values to other types if specified. - * @param message QueryInput - * @param [options] Conversion options - * @returns Plain object + * Calls ListSecuritySettings. + * @param request ListSecuritySettingsRequest message or plain object + * @returns Promise */ - public static toObject(message: google.cloud.dialogflow.cx.v3.QueryInput, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public listSecuritySettings(request: google.cloud.dialogflow.cx.v3.IListSecuritySettingsRequest): Promise; /** - * Converts this QueryInput to JSON. - * @returns JSON object + * Calls DeleteSecuritySettings. + * @param request DeleteSecuritySettingsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryResult. */ - interface IQueryResult { - - /** QueryResult text */ - text?: (string|null); - - /** QueryResult triggerIntent */ - triggerIntent?: (string|null); - - /** QueryResult transcript */ - transcript?: (string|null); - - /** QueryResult triggerEvent */ - triggerEvent?: (string|null); - - /** QueryResult languageCode */ - languageCode?: (string|null); - - /** QueryResult parameters */ - parameters?: (google.protobuf.IStruct|null); + public deleteSecuritySettings(request: google.cloud.dialogflow.cx.v3.IDeleteSecuritySettingsRequest, callback: google.cloud.dialogflow.cx.v3.SecuritySettingsService.DeleteSecuritySettingsCallback): void; - /** QueryResult responseMessages */ - responseMessages?: (google.cloud.dialogflow.cx.v3.IResponseMessage[]|null); + /** + * Calls DeleteSecuritySettings. + * @param request DeleteSecuritySettingsRequest message or plain object + * @returns Promise + */ + public deleteSecuritySettings(request: google.cloud.dialogflow.cx.v3.IDeleteSecuritySettingsRequest): Promise; + } - /** QueryResult webhookStatuses */ - webhookStatuses?: (google.rpc.IStatus[]|null); + namespace SecuritySettingsService { - /** QueryResult webhookPayloads */ - webhookPayloads?: (google.protobuf.IStruct[]|null); + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.SecuritySettingsService#createSecuritySettings}. + * @param error Error, if any + * @param [response] SecuritySettings + */ + type CreateSecuritySettingsCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.SecuritySettings) => void; - /** QueryResult currentPage */ - currentPage?: (google.cloud.dialogflow.cx.v3.IPage|null); + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.SecuritySettingsService#getSecuritySettings}. + * @param error Error, if any + * @param [response] SecuritySettings + */ + type GetSecuritySettingsCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.SecuritySettings) => void; - /** QueryResult intent */ - intent?: (google.cloud.dialogflow.cx.v3.IIntent|null); + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.SecuritySettingsService#updateSecuritySettings}. + * @param error Error, if any + * @param [response] SecuritySettings + */ + type UpdateSecuritySettingsCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.SecuritySettings) => void; - /** QueryResult intentDetectionConfidence */ - intentDetectionConfidence?: (number|null); + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.SecuritySettingsService#listSecuritySettings}. + * @param error Error, if any + * @param [response] ListSecuritySettingsResponse + */ + type ListSecuritySettingsCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse) => void; - /** QueryResult match */ - match?: (google.cloud.dialogflow.cx.v3.IMatch|null); + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.SecuritySettingsService#deleteSecuritySettings}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteSecuritySettingsCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + } - /** QueryResult diagnosticInfo */ - diagnosticInfo?: (google.protobuf.IStruct|null); + /** Properties of a GetSecuritySettingsRequest. */ + interface IGetSecuritySettingsRequest { - /** QueryResult sentimentAnalysisResult */ - sentimentAnalysisResult?: (google.cloud.dialogflow.cx.v3.ISentimentAnalysisResult|null); + /** GetSecuritySettingsRequest name */ + name?: (string|null); } - /** Represents a QueryResult. */ - class QueryResult implements IQueryResult { + /** Represents a GetSecuritySettingsRequest. */ + class GetSecuritySettingsRequest implements IGetSecuritySettingsRequest { /** - * Constructs a new QueryResult. + * Constructs a new GetSecuritySettingsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IQueryResult); - - /** QueryResult text. */ - public text: string; - - /** QueryResult triggerIntent. */ - public triggerIntent: string; - - /** QueryResult transcript. */ - public transcript: string; - - /** QueryResult triggerEvent. */ - public triggerEvent: string; - - /** QueryResult languageCode. */ - public languageCode: string; - - /** QueryResult parameters. */ - public parameters?: (google.protobuf.IStruct|null); - - /** QueryResult responseMessages. */ - public responseMessages: google.cloud.dialogflow.cx.v3.IResponseMessage[]; - - /** QueryResult webhookStatuses. */ - public webhookStatuses: google.rpc.IStatus[]; - - /** QueryResult webhookPayloads. */ - public webhookPayloads: google.protobuf.IStruct[]; - - /** QueryResult currentPage. */ - public currentPage?: (google.cloud.dialogflow.cx.v3.IPage|null); - - /** QueryResult intent. */ - public intent?: (google.cloud.dialogflow.cx.v3.IIntent|null); - - /** QueryResult intentDetectionConfidence. */ - public intentDetectionConfidence: number; - - /** QueryResult match. */ - public match?: (google.cloud.dialogflow.cx.v3.IMatch|null); - - /** QueryResult diagnosticInfo. */ - public diagnosticInfo?: (google.protobuf.IStruct|null); - - /** QueryResult sentimentAnalysisResult. */ - public sentimentAnalysisResult?: (google.cloud.dialogflow.cx.v3.ISentimentAnalysisResult|null); + constructor(properties?: google.cloud.dialogflow.cx.v3.IGetSecuritySettingsRequest); - /** QueryResult query. */ - public query?: ("text"|"triggerIntent"|"transcript"|"triggerEvent"); + /** GetSecuritySettingsRequest name. */ + public name: string; /** - * Creates a new QueryResult instance using the specified properties. + * Creates a new GetSecuritySettingsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns QueryResult instance + * @returns GetSecuritySettingsRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IQueryResult): google.cloud.dialogflow.cx.v3.QueryResult; + public static create(properties?: google.cloud.dialogflow.cx.v3.IGetSecuritySettingsRequest): google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest; /** - * Encodes the specified QueryResult message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.QueryResult.verify|verify} messages. - * @param message QueryResult message or plain object to encode + * Encodes the specified GetSecuritySettingsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest.verify|verify} messages. + * @param message GetSecuritySettingsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IQueryResult, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IGetSecuritySettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified QueryResult message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.QueryResult.verify|verify} messages. - * @param message QueryResult message or plain object to encode + * Encodes the specified GetSecuritySettingsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest.verify|verify} messages. + * @param message GetSecuritySettingsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IQueryResult, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IGetSecuritySettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a QueryResult message from the specified reader or buffer. + * Decodes a GetSecuritySettingsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns QueryResult + * @returns GetSecuritySettingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.QueryResult; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest; /** - * Decodes a QueryResult message from the specified reader or buffer, length delimited. + * Decodes a GetSecuritySettingsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns QueryResult + * @returns GetSecuritySettingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.QueryResult; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest; /** - * Verifies a QueryResult message. + * Verifies a GetSecuritySettingsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a QueryResult message from a plain object. Also converts values to their respective internal types. + * Creates a GetSecuritySettingsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns QueryResult + * @returns GetSecuritySettingsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.QueryResult; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest; /** - * Creates a plain object from a QueryResult message. Also converts values to other types if specified. - * @param message QueryResult + * Creates a plain object from a GetSecuritySettingsRequest message. Also converts values to other types if specified. + * @param message GetSecuritySettingsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.QueryResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this QueryResult to JSON. + * Converts this GetSecuritySettingsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a TextInput. */ - interface ITextInput { + /** Properties of an UpdateSecuritySettingsRequest. */ + interface IUpdateSecuritySettingsRequest { - /** TextInput text */ - text?: (string|null); + /** UpdateSecuritySettingsRequest securitySettings */ + securitySettings?: (google.cloud.dialogflow.cx.v3.ISecuritySettings|null); + + /** UpdateSecuritySettingsRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); } - /** Represents a TextInput. */ - class TextInput implements ITextInput { + /** Represents an UpdateSecuritySettingsRequest. */ + class UpdateSecuritySettingsRequest implements IUpdateSecuritySettingsRequest { /** - * Constructs a new TextInput. + * Constructs a new UpdateSecuritySettingsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.ITextInput); + constructor(properties?: google.cloud.dialogflow.cx.v3.IUpdateSecuritySettingsRequest); - /** TextInput text. */ - public text: string; + /** UpdateSecuritySettingsRequest securitySettings. */ + public securitySettings?: (google.cloud.dialogflow.cx.v3.ISecuritySettings|null); + + /** UpdateSecuritySettingsRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); /** - * Creates a new TextInput instance using the specified properties. + * Creates a new UpdateSecuritySettingsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns TextInput instance + * @returns UpdateSecuritySettingsRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.ITextInput): google.cloud.dialogflow.cx.v3.TextInput; + public static create(properties?: google.cloud.dialogflow.cx.v3.IUpdateSecuritySettingsRequest): google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest; /** - * Encodes the specified TextInput message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TextInput.verify|verify} messages. - * @param message TextInput message or plain object to encode + * Encodes the specified UpdateSecuritySettingsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest.verify|verify} messages. + * @param message UpdateSecuritySettingsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.ITextInput, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IUpdateSecuritySettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TextInput message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TextInput.verify|verify} messages. - * @param message TextInput message or plain object to encode + * Encodes the specified UpdateSecuritySettingsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest.verify|verify} messages. + * @param message UpdateSecuritySettingsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ITextInput, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IUpdateSecuritySettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TextInput message from the specified reader or buffer. + * Decodes an UpdateSecuritySettingsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TextInput + * @returns UpdateSecuritySettingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.TextInput; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest; /** - * Decodes a TextInput message from the specified reader or buffer, length delimited. + * Decodes an UpdateSecuritySettingsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TextInput + * @returns UpdateSecuritySettingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.TextInput; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest; /** - * Verifies a TextInput message. + * Verifies an UpdateSecuritySettingsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a TextInput message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateSecuritySettingsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TextInput + * @returns UpdateSecuritySettingsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.TextInput; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest; /** - * Creates a plain object from a TextInput message. Also converts values to other types if specified. - * @param message TextInput + * Creates a plain object from an UpdateSecuritySettingsRequest message. Also converts values to other types if specified. + * @param message UpdateSecuritySettingsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.TextInput, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TextInput to JSON. + * Converts this UpdateSecuritySettingsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an IntentInput. */ - interface IIntentInput { + /** Properties of a ListSecuritySettingsRequest. */ + interface IListSecuritySettingsRequest { - /** IntentInput intent */ - intent?: (string|null); + /** ListSecuritySettingsRequest parent */ + parent?: (string|null); + + /** ListSecuritySettingsRequest pageSize */ + pageSize?: (number|null); + + /** ListSecuritySettingsRequest pageToken */ + pageToken?: (string|null); } - /** Represents an IntentInput. */ - class IntentInput implements IIntentInput { + /** Represents a ListSecuritySettingsRequest. */ + class ListSecuritySettingsRequest implements IListSecuritySettingsRequest { /** - * Constructs a new IntentInput. + * Constructs a new ListSecuritySettingsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IIntentInput); + constructor(properties?: google.cloud.dialogflow.cx.v3.IListSecuritySettingsRequest); - /** IntentInput intent. */ - public intent: string; + /** ListSecuritySettingsRequest parent. */ + public parent: string; + + /** ListSecuritySettingsRequest pageSize. */ + public pageSize: number; + + /** ListSecuritySettingsRequest pageToken. */ + public pageToken: string; /** - * Creates a new IntentInput instance using the specified properties. + * Creates a new ListSecuritySettingsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns IntentInput instance + * @returns ListSecuritySettingsRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IIntentInput): google.cloud.dialogflow.cx.v3.IntentInput; + public static create(properties?: google.cloud.dialogflow.cx.v3.IListSecuritySettingsRequest): google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest; /** - * Encodes the specified IntentInput message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.IntentInput.verify|verify} messages. - * @param message IntentInput message or plain object to encode + * Encodes the specified ListSecuritySettingsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest.verify|verify} messages. + * @param message ListSecuritySettingsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IIntentInput, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IListSecuritySettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified IntentInput message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.IntentInput.verify|verify} messages. - * @param message IntentInput message or plain object to encode + * Encodes the specified ListSecuritySettingsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest.verify|verify} messages. + * @param message ListSecuritySettingsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IIntentInput, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListSecuritySettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an IntentInput message from the specified reader or buffer. + * Decodes a ListSecuritySettingsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns IntentInput + * @returns ListSecuritySettingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.IntentInput; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest; /** - * Decodes an IntentInput message from the specified reader or buffer, length delimited. + * Decodes a ListSecuritySettingsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns IntentInput + * @returns ListSecuritySettingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.IntentInput; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest; /** - * Verifies an IntentInput message. + * Verifies a ListSecuritySettingsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an IntentInput message from a plain object. Also converts values to their respective internal types. + * Creates a ListSecuritySettingsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns IntentInput + * @returns ListSecuritySettingsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.IntentInput; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest; /** - * Creates a plain object from an IntentInput message. Also converts values to other types if specified. - * @param message IntentInput + * Creates a plain object from a ListSecuritySettingsRequest message. Also converts values to other types if specified. + * @param message ListSecuritySettingsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.IntentInput, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this IntentInput to JSON. + * Converts this ListSecuritySettingsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an AudioInput. */ - interface IAudioInput { + /** Properties of a ListSecuritySettingsResponse. */ + interface IListSecuritySettingsResponse { - /** AudioInput config */ - config?: (google.cloud.dialogflow.cx.v3.IInputAudioConfig|null); + /** ListSecuritySettingsResponse securitySettings */ + securitySettings?: (google.cloud.dialogflow.cx.v3.ISecuritySettings[]|null); - /** AudioInput audio */ - audio?: (Uint8Array|string|null); + /** ListSecuritySettingsResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents an AudioInput. */ - class AudioInput implements IAudioInput { + /** Represents a ListSecuritySettingsResponse. */ + class ListSecuritySettingsResponse implements IListSecuritySettingsResponse { /** - * Constructs a new AudioInput. + * Constructs a new ListSecuritySettingsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IAudioInput); + constructor(properties?: google.cloud.dialogflow.cx.v3.IListSecuritySettingsResponse); - /** AudioInput config. */ - public config?: (google.cloud.dialogflow.cx.v3.IInputAudioConfig|null); + /** ListSecuritySettingsResponse securitySettings. */ + public securitySettings: google.cloud.dialogflow.cx.v3.ISecuritySettings[]; - /** AudioInput audio. */ - public audio: (Uint8Array|string); + /** ListSecuritySettingsResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new AudioInput instance using the specified properties. + * Creates a new ListSecuritySettingsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns AudioInput instance + * @returns ListSecuritySettingsResponse instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IAudioInput): google.cloud.dialogflow.cx.v3.AudioInput; + public static create(properties?: google.cloud.dialogflow.cx.v3.IListSecuritySettingsResponse): google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse; /** - * Encodes the specified AudioInput message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.AudioInput.verify|verify} messages. - * @param message AudioInput message or plain object to encode + * Encodes the specified ListSecuritySettingsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse.verify|verify} messages. + * @param message ListSecuritySettingsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IAudioInput, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IListSecuritySettingsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AudioInput message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.AudioInput.verify|verify} messages. - * @param message AudioInput message or plain object to encode + * Encodes the specified ListSecuritySettingsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse.verify|verify} messages. + * @param message ListSecuritySettingsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IAudioInput, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListSecuritySettingsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AudioInput message from the specified reader or buffer. + * Decodes a ListSecuritySettingsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AudioInput + * @returns ListSecuritySettingsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.AudioInput; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse; /** - * Decodes an AudioInput message from the specified reader or buffer, length delimited. + * Decodes a ListSecuritySettingsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AudioInput + * @returns ListSecuritySettingsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.AudioInput; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse; /** - * Verifies an AudioInput message. + * Verifies a ListSecuritySettingsResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an AudioInput message from a plain object. Also converts values to their respective internal types. + * Creates a ListSecuritySettingsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AudioInput + * @returns ListSecuritySettingsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.AudioInput; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse; /** - * Creates a plain object from an AudioInput message. Also converts values to other types if specified. - * @param message AudioInput + * Creates a plain object from a ListSecuritySettingsResponse message. Also converts values to other types if specified. + * @param message ListSecuritySettingsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.AudioInput, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AudioInput to JSON. + * Converts this ListSecuritySettingsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an EventInput. */ - interface IEventInput { + /** Properties of a CreateSecuritySettingsRequest. */ + interface ICreateSecuritySettingsRequest { - /** EventInput event */ - event?: (string|null); + /** CreateSecuritySettingsRequest parent */ + parent?: (string|null); + + /** CreateSecuritySettingsRequest securitySettings */ + securitySettings?: (google.cloud.dialogflow.cx.v3.ISecuritySettings|null); } - /** Represents an EventInput. */ - class EventInput implements IEventInput { + /** Represents a CreateSecuritySettingsRequest. */ + class CreateSecuritySettingsRequest implements ICreateSecuritySettingsRequest { /** - * Constructs a new EventInput. + * Constructs a new CreateSecuritySettingsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IEventInput); + constructor(properties?: google.cloud.dialogflow.cx.v3.ICreateSecuritySettingsRequest); - /** EventInput event. */ - public event: string; + /** CreateSecuritySettingsRequest parent. */ + public parent: string; + + /** CreateSecuritySettingsRequest securitySettings. */ + public securitySettings?: (google.cloud.dialogflow.cx.v3.ISecuritySettings|null); /** - * Creates a new EventInput instance using the specified properties. + * Creates a new CreateSecuritySettingsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns EventInput instance + * @returns CreateSecuritySettingsRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IEventInput): google.cloud.dialogflow.cx.v3.EventInput; + public static create(properties?: google.cloud.dialogflow.cx.v3.ICreateSecuritySettingsRequest): google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest; /** - * Encodes the specified EventInput message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.EventInput.verify|verify} messages. - * @param message EventInput message or plain object to encode + * Encodes the specified CreateSecuritySettingsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest.verify|verify} messages. + * @param message CreateSecuritySettingsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IEventInput, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.ICreateSecuritySettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified EventInput message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.EventInput.verify|verify} messages. - * @param message EventInput message or plain object to encode + * Encodes the specified CreateSecuritySettingsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest.verify|verify} messages. + * @param message CreateSecuritySettingsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IEventInput, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ICreateSecuritySettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an EventInput message from the specified reader or buffer. + * Decodes a CreateSecuritySettingsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns EventInput + * @returns CreateSecuritySettingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.EventInput; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest; /** - * Decodes an EventInput message from the specified reader or buffer, length delimited. + * Decodes a CreateSecuritySettingsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns EventInput + * @returns CreateSecuritySettingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.EventInput; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest; /** - * Verifies an EventInput message. + * Verifies a CreateSecuritySettingsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an EventInput message from a plain object. Also converts values to their respective internal types. + * Creates a CreateSecuritySettingsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns EventInput + * @returns CreateSecuritySettingsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.EventInput; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest; /** - * Creates a plain object from an EventInput message. Also converts values to other types if specified. - * @param message EventInput + * Creates a plain object from a CreateSecuritySettingsRequest message. Also converts values to other types if specified. + * @param message CreateSecuritySettingsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.EventInput, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this EventInput to JSON. + * Converts this CreateSecuritySettingsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DtmfInput. */ - interface IDtmfInput { - - /** DtmfInput digits */ - digits?: (string|null); + /** Properties of a DeleteSecuritySettingsRequest. */ + interface IDeleteSecuritySettingsRequest { - /** DtmfInput finishDigit */ - finishDigit?: (string|null); + /** DeleteSecuritySettingsRequest name */ + name?: (string|null); } - /** Represents a DtmfInput. */ - class DtmfInput implements IDtmfInput { + /** Represents a DeleteSecuritySettingsRequest. */ + class DeleteSecuritySettingsRequest implements IDeleteSecuritySettingsRequest { /** - * Constructs a new DtmfInput. + * Constructs a new DeleteSecuritySettingsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IDtmfInput); - - /** DtmfInput digits. */ - public digits: string; + constructor(properties?: google.cloud.dialogflow.cx.v3.IDeleteSecuritySettingsRequest); - /** DtmfInput finishDigit. */ - public finishDigit: string; + /** DeleteSecuritySettingsRequest name. */ + public name: string; /** - * Creates a new DtmfInput instance using the specified properties. + * Creates a new DeleteSecuritySettingsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns DtmfInput instance + * @returns DeleteSecuritySettingsRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IDtmfInput): google.cloud.dialogflow.cx.v3.DtmfInput; + public static create(properties?: google.cloud.dialogflow.cx.v3.IDeleteSecuritySettingsRequest): google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest; /** - * Encodes the specified DtmfInput message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DtmfInput.verify|verify} messages. - * @param message DtmfInput message or plain object to encode + * Encodes the specified DeleteSecuritySettingsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest.verify|verify} messages. + * @param message DeleteSecuritySettingsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IDtmfInput, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IDeleteSecuritySettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DtmfInput message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DtmfInput.verify|verify} messages. - * @param message DtmfInput message or plain object to encode + * Encodes the specified DeleteSecuritySettingsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest.verify|verify} messages. + * @param message DeleteSecuritySettingsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IDtmfInput, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IDeleteSecuritySettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DtmfInput message from the specified reader or buffer. + * Decodes a DeleteSecuritySettingsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DtmfInput + * @returns DeleteSecuritySettingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.DtmfInput; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest; /** - * Decodes a DtmfInput message from the specified reader or buffer, length delimited. + * Decodes a DeleteSecuritySettingsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DtmfInput + * @returns DeleteSecuritySettingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.DtmfInput; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest; /** - * Verifies a DtmfInput message. + * Verifies a DeleteSecuritySettingsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DtmfInput message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteSecuritySettingsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DtmfInput + * @returns DeleteSecuritySettingsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.DtmfInput; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest; /** - * Creates a plain object from a DtmfInput message. Also converts values to other types if specified. - * @param message DtmfInput + * Creates a plain object from a DeleteSecuritySettingsRequest message. Also converts values to other types if specified. + * @param message DeleteSecuritySettingsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.DtmfInput, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DtmfInput to JSON. + * Converts this DeleteSecuritySettingsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a Match. */ - interface IMatch { + /** Properties of a SecuritySettings. */ + interface ISecuritySettings { - /** Match intent */ - intent?: (google.cloud.dialogflow.cx.v3.IIntent|null); + /** SecuritySettings name */ + name?: (string|null); - /** Match event */ - event?: (string|null); + /** SecuritySettings displayName */ + displayName?: (string|null); - /** Match parameters */ - parameters?: (google.protobuf.IStruct|null); + /** SecuritySettings redactionStrategy */ + redactionStrategy?: (google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionStrategy|keyof typeof google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionStrategy|null); - /** Match resolvedInput */ - resolvedInput?: (string|null); + /** SecuritySettings redactionScope */ + redactionScope?: (google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionScope|keyof typeof google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionScope|null); - /** Match matchType */ - matchType?: (google.cloud.dialogflow.cx.v3.Match.MatchType|keyof typeof google.cloud.dialogflow.cx.v3.Match.MatchType|null); + /** SecuritySettings inspectTemplate */ + inspectTemplate?: (string|null); - /** Match confidence */ - confidence?: (number|null); + /** SecuritySettings retentionWindowDays */ + retentionWindowDays?: (number|null); + + /** SecuritySettings purgeDataTypes */ + purgeDataTypes?: (google.cloud.dialogflow.cx.v3.SecuritySettings.PurgeDataType[]|null); } - /** Represents a Match. */ - class Match implements IMatch { + /** Represents a SecuritySettings. */ + class SecuritySettings implements ISecuritySettings { /** - * Constructs a new Match. + * Constructs a new SecuritySettings. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IMatch); + constructor(properties?: google.cloud.dialogflow.cx.v3.ISecuritySettings); - /** Match intent. */ - public intent?: (google.cloud.dialogflow.cx.v3.IIntent|null); + /** SecuritySettings name. */ + public name: string; - /** Match event. */ - public event: string; + /** SecuritySettings displayName. */ + public displayName: string; - /** Match parameters. */ - public parameters?: (google.protobuf.IStruct|null); + /** SecuritySettings redactionStrategy. */ + public redactionStrategy: (google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionStrategy|keyof typeof google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionStrategy); - /** Match resolvedInput. */ - public resolvedInput: string; + /** SecuritySettings redactionScope. */ + public redactionScope: (google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionScope|keyof typeof google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionScope); - /** Match matchType. */ - public matchType: (google.cloud.dialogflow.cx.v3.Match.MatchType|keyof typeof google.cloud.dialogflow.cx.v3.Match.MatchType); + /** SecuritySettings inspectTemplate. */ + public inspectTemplate: string; - /** Match confidence. */ - public confidence: number; + /** SecuritySettings retentionWindowDays. */ + public retentionWindowDays: number; + + /** SecuritySettings purgeDataTypes. */ + public purgeDataTypes: google.cloud.dialogflow.cx.v3.SecuritySettings.PurgeDataType[]; + + /** SecuritySettings dataRetention. */ + public dataRetention?: "retentionWindowDays"; /** - * Creates a new Match instance using the specified properties. + * Creates a new SecuritySettings instance using the specified properties. * @param [properties] Properties to set - * @returns Match instance + * @returns SecuritySettings instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IMatch): google.cloud.dialogflow.cx.v3.Match; + public static create(properties?: google.cloud.dialogflow.cx.v3.ISecuritySettings): google.cloud.dialogflow.cx.v3.SecuritySettings; /** - * Encodes the specified Match message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Match.verify|verify} messages. - * @param message Match message or plain object to encode + * Encodes the specified SecuritySettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SecuritySettings.verify|verify} messages. + * @param message SecuritySettings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IMatch, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.ISecuritySettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Match message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Match.verify|verify} messages. - * @param message Match message or plain object to encode + * Encodes the specified SecuritySettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SecuritySettings.verify|verify} messages. + * @param message SecuritySettings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IMatch, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ISecuritySettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Match message from the specified reader or buffer. + * Decodes a SecuritySettings message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Match + * @returns SecuritySettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.Match; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.SecuritySettings; /** - * Decodes a Match message from the specified reader or buffer, length delimited. + * Decodes a SecuritySettings message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Match + * @returns SecuritySettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.Match; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.SecuritySettings; /** - * Verifies a Match message. + * Verifies a SecuritySettings message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Match message from a plain object. Also converts values to their respective internal types. + * Creates a SecuritySettings message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Match + * @returns SecuritySettings */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Match; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.SecuritySettings; /** - * Creates a plain object from a Match message. Also converts values to other types if specified. - * @param message Match + * Creates a plain object from a SecuritySettings message. Also converts values to other types if specified. + * @param message SecuritySettings * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.Match, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.SecuritySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Match to JSON. + * Converts this SecuritySettings to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace Match { + namespace SecuritySettings { - /** MatchType enum. */ - enum MatchType { - MATCH_TYPE_UNSPECIFIED = 0, - INTENT = 1, - DIRECT_INTENT = 2, - PARAMETER_FILLING = 3, - NO_MATCH = 4, - NO_INPUT = 5, - EVENT = 6 + /** RedactionStrategy enum. */ + enum RedactionStrategy { + REDACTION_STRATEGY_UNSPECIFIED = 0, + REDACT_WITH_SERVICE = 1 + } + + /** RedactionScope enum. */ + enum RedactionScope { + REDACTION_SCOPE_UNSPECIFIED = 0, + REDACT_DISK_STORAGE = 2 + } + + /** PurgeDataType enum. */ + enum PurgeDataType { + PURGE_DATA_TYPE_UNSPECIFIED = 0, + DIALOGFLOW_HISTORY = 1 } } - /** Properties of a MatchIntentRequest. */ - interface IMatchIntentRequest { + /** Represents a Sessions */ + class Sessions extends $protobuf.rpc.Service { - /** MatchIntentRequest session */ + /** + * Constructs a new Sessions service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new Sessions service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Sessions; + + /** + * Calls DetectIntent. + * @param request DetectIntentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and DetectIntentResponse + */ + public detectIntent(request: google.cloud.dialogflow.cx.v3.IDetectIntentRequest, callback: google.cloud.dialogflow.cx.v3.Sessions.DetectIntentCallback): void; + + /** + * Calls DetectIntent. + * @param request DetectIntentRequest message or plain object + * @returns Promise + */ + public detectIntent(request: google.cloud.dialogflow.cx.v3.IDetectIntentRequest): Promise; + + /** + * Calls StreamingDetectIntent. + * @param request StreamingDetectIntentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and StreamingDetectIntentResponse + */ + public streamingDetectIntent(request: google.cloud.dialogflow.cx.v3.IStreamingDetectIntentRequest, callback: google.cloud.dialogflow.cx.v3.Sessions.StreamingDetectIntentCallback): void; + + /** + * Calls StreamingDetectIntent. + * @param request StreamingDetectIntentRequest message or plain object + * @returns Promise + */ + public streamingDetectIntent(request: google.cloud.dialogflow.cx.v3.IStreamingDetectIntentRequest): Promise; + + /** + * Calls MatchIntent. + * @param request MatchIntentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and MatchIntentResponse + */ + public matchIntent(request: google.cloud.dialogflow.cx.v3.IMatchIntentRequest, callback: google.cloud.dialogflow.cx.v3.Sessions.MatchIntentCallback): void; + + /** + * Calls MatchIntent. + * @param request MatchIntentRequest message or plain object + * @returns Promise + */ + public matchIntent(request: google.cloud.dialogflow.cx.v3.IMatchIntentRequest): Promise; + + /** + * Calls FulfillIntent. + * @param request FulfillIntentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and FulfillIntentResponse + */ + public fulfillIntent(request: google.cloud.dialogflow.cx.v3.IFulfillIntentRequest, callback: google.cloud.dialogflow.cx.v3.Sessions.FulfillIntentCallback): void; + + /** + * Calls FulfillIntent. + * @param request FulfillIntentRequest message or plain object + * @returns Promise + */ + public fulfillIntent(request: google.cloud.dialogflow.cx.v3.IFulfillIntentRequest): Promise; + } + + namespace Sessions { + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Sessions#detectIntent}. + * @param error Error, if any + * @param [response] DetectIntentResponse + */ + type DetectIntentCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.DetectIntentResponse) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Sessions#streamingDetectIntent}. + * @param error Error, if any + * @param [response] StreamingDetectIntentResponse + */ + type StreamingDetectIntentCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Sessions#matchIntent}. + * @param error Error, if any + * @param [response] MatchIntentResponse + */ + type MatchIntentCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.MatchIntentResponse) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Sessions#fulfillIntent}. + * @param error Error, if any + * @param [response] FulfillIntentResponse + */ + type FulfillIntentCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.FulfillIntentResponse) => void; + } + + /** Properties of a DetectIntentRequest. */ + interface IDetectIntentRequest { + + /** DetectIntentRequest session */ session?: (string|null); - /** MatchIntentRequest queryParams */ + /** DetectIntentRequest queryParams */ queryParams?: (google.cloud.dialogflow.cx.v3.IQueryParameters|null); - /** MatchIntentRequest queryInput */ + /** DetectIntentRequest queryInput */ queryInput?: (google.cloud.dialogflow.cx.v3.IQueryInput|null); + + /** DetectIntentRequest outputAudioConfig */ + outputAudioConfig?: (google.cloud.dialogflow.cx.v3.IOutputAudioConfig|null); } - /** Represents a MatchIntentRequest. */ - class MatchIntentRequest implements IMatchIntentRequest { + /** Represents a DetectIntentRequest. */ + class DetectIntentRequest implements IDetectIntentRequest { /** - * Constructs a new MatchIntentRequest. + * Constructs a new DetectIntentRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IMatchIntentRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3.IDetectIntentRequest); - /** MatchIntentRequest session. */ + /** DetectIntentRequest session. */ public session: string; - /** MatchIntentRequest queryParams. */ + /** DetectIntentRequest queryParams. */ public queryParams?: (google.cloud.dialogflow.cx.v3.IQueryParameters|null); - /** MatchIntentRequest queryInput. */ + /** DetectIntentRequest queryInput. */ public queryInput?: (google.cloud.dialogflow.cx.v3.IQueryInput|null); + /** DetectIntentRequest outputAudioConfig. */ + public outputAudioConfig?: (google.cloud.dialogflow.cx.v3.IOutputAudioConfig|null); + /** - * Creates a new MatchIntentRequest instance using the specified properties. + * Creates a new DetectIntentRequest instance using the specified properties. * @param [properties] Properties to set - * @returns MatchIntentRequest instance + * @returns DetectIntentRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IMatchIntentRequest): google.cloud.dialogflow.cx.v3.MatchIntentRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3.IDetectIntentRequest): google.cloud.dialogflow.cx.v3.DetectIntentRequest; /** - * Encodes the specified MatchIntentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.MatchIntentRequest.verify|verify} messages. - * @param message MatchIntentRequest message or plain object to encode + * Encodes the specified DetectIntentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DetectIntentRequest.verify|verify} messages. + * @param message DetectIntentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IMatchIntentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IDetectIntentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MatchIntentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.MatchIntentRequest.verify|verify} messages. - * @param message MatchIntentRequest message or plain object to encode + * Encodes the specified DetectIntentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DetectIntentRequest.verify|verify} messages. + * @param message DetectIntentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IMatchIntentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IDetectIntentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MatchIntentRequest message from the specified reader or buffer. + * Decodes a DetectIntentRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MatchIntentRequest + * @returns DetectIntentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.MatchIntentRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.DetectIntentRequest; /** - * Decodes a MatchIntentRequest message from the specified reader or buffer, length delimited. + * Decodes a DetectIntentRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MatchIntentRequest + * @returns DetectIntentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.MatchIntentRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.DetectIntentRequest; /** - * Verifies a MatchIntentRequest message. + * Verifies a DetectIntentRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a MatchIntentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DetectIntentRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MatchIntentRequest + * @returns DetectIntentRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.MatchIntentRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.DetectIntentRequest; /** - * Creates a plain object from a MatchIntentRequest message. Also converts values to other types if specified. - * @param message MatchIntentRequest + * Creates a plain object from a DetectIntentRequest message. Also converts values to other types if specified. + * @param message DetectIntentRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.MatchIntentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.DetectIntentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MatchIntentRequest to JSON. + * Converts this DetectIntentRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a MatchIntentResponse. */ - interface IMatchIntentResponse { - - /** MatchIntentResponse text */ - text?: (string|null); - - /** MatchIntentResponse triggerIntent */ - triggerIntent?: (string|null); + /** Properties of a DetectIntentResponse. */ + interface IDetectIntentResponse { - /** MatchIntentResponse transcript */ - transcript?: (string|null); + /** DetectIntentResponse responseId */ + responseId?: (string|null); - /** MatchIntentResponse triggerEvent */ - triggerEvent?: (string|null); + /** DetectIntentResponse queryResult */ + queryResult?: (google.cloud.dialogflow.cx.v3.IQueryResult|null); - /** MatchIntentResponse matches */ - matches?: (google.cloud.dialogflow.cx.v3.IMatch[]|null); + /** DetectIntentResponse outputAudio */ + outputAudio?: (Uint8Array|string|null); - /** MatchIntentResponse currentPage */ - currentPage?: (google.cloud.dialogflow.cx.v3.IPage|null); + /** DetectIntentResponse outputAudioConfig */ + outputAudioConfig?: (google.cloud.dialogflow.cx.v3.IOutputAudioConfig|null); } - /** Represents a MatchIntentResponse. */ - class MatchIntentResponse implements IMatchIntentResponse { + /** Represents a DetectIntentResponse. */ + class DetectIntentResponse implements IDetectIntentResponse { /** - * Constructs a new MatchIntentResponse. + * Constructs a new DetectIntentResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IMatchIntentResponse); - - /** MatchIntentResponse text. */ - public text: string; - - /** MatchIntentResponse triggerIntent. */ - public triggerIntent: string; - - /** MatchIntentResponse transcript. */ - public transcript: string; + constructor(properties?: google.cloud.dialogflow.cx.v3.IDetectIntentResponse); - /** MatchIntentResponse triggerEvent. */ - public triggerEvent: string; + /** DetectIntentResponse responseId. */ + public responseId: string; - /** MatchIntentResponse matches. */ - public matches: google.cloud.dialogflow.cx.v3.IMatch[]; + /** DetectIntentResponse queryResult. */ + public queryResult?: (google.cloud.dialogflow.cx.v3.IQueryResult|null); - /** MatchIntentResponse currentPage. */ - public currentPage?: (google.cloud.dialogflow.cx.v3.IPage|null); + /** DetectIntentResponse outputAudio. */ + public outputAudio: (Uint8Array|string); - /** MatchIntentResponse query. */ - public query?: ("text"|"triggerIntent"|"transcript"|"triggerEvent"); + /** DetectIntentResponse outputAudioConfig. */ + public outputAudioConfig?: (google.cloud.dialogflow.cx.v3.IOutputAudioConfig|null); /** - * Creates a new MatchIntentResponse instance using the specified properties. + * Creates a new DetectIntentResponse instance using the specified properties. * @param [properties] Properties to set - * @returns MatchIntentResponse instance + * @returns DetectIntentResponse instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IMatchIntentResponse): google.cloud.dialogflow.cx.v3.MatchIntentResponse; + public static create(properties?: google.cloud.dialogflow.cx.v3.IDetectIntentResponse): google.cloud.dialogflow.cx.v3.DetectIntentResponse; /** - * Encodes the specified MatchIntentResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.MatchIntentResponse.verify|verify} messages. - * @param message MatchIntentResponse message or plain object to encode + * Encodes the specified DetectIntentResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DetectIntentResponse.verify|verify} messages. + * @param message DetectIntentResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IMatchIntentResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IDetectIntentResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MatchIntentResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.MatchIntentResponse.verify|verify} messages. - * @param message MatchIntentResponse message or plain object to encode + * Encodes the specified DetectIntentResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DetectIntentResponse.verify|verify} messages. + * @param message DetectIntentResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IMatchIntentResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IDetectIntentResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MatchIntentResponse message from the specified reader or buffer. + * Decodes a DetectIntentResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MatchIntentResponse + * @returns DetectIntentResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.MatchIntentResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.DetectIntentResponse; /** - * Decodes a MatchIntentResponse message from the specified reader or buffer, length delimited. + * Decodes a DetectIntentResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MatchIntentResponse + * @returns DetectIntentResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.MatchIntentResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.DetectIntentResponse; /** - * Verifies a MatchIntentResponse message. + * Verifies a DetectIntentResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a MatchIntentResponse message from a plain object. Also converts values to their respective internal types. + * Creates a DetectIntentResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MatchIntentResponse + * @returns DetectIntentResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.MatchIntentResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.DetectIntentResponse; /** - * Creates a plain object from a MatchIntentResponse message. Also converts values to other types if specified. - * @param message MatchIntentResponse + * Creates a plain object from a DetectIntentResponse message. Also converts values to other types if specified. + * @param message DetectIntentResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.MatchIntentResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.DetectIntentResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MatchIntentResponse to JSON. + * Converts this DetectIntentResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a FulfillIntentRequest. */ - interface IFulfillIntentRequest { + /** Properties of a StreamingDetectIntentRequest. */ + interface IStreamingDetectIntentRequest { - /** FulfillIntentRequest matchIntentRequest */ - matchIntentRequest?: (google.cloud.dialogflow.cx.v3.IMatchIntentRequest|null); + /** StreamingDetectIntentRequest session */ + session?: (string|null); - /** FulfillIntentRequest match */ - match?: (google.cloud.dialogflow.cx.v3.IMatch|null); + /** StreamingDetectIntentRequest queryParams */ + queryParams?: (google.cloud.dialogflow.cx.v3.IQueryParameters|null); - /** FulfillIntentRequest outputAudioConfig */ + /** StreamingDetectIntentRequest queryInput */ + queryInput?: (google.cloud.dialogflow.cx.v3.IQueryInput|null); + + /** StreamingDetectIntentRequest outputAudioConfig */ outputAudioConfig?: (google.cloud.dialogflow.cx.v3.IOutputAudioConfig|null); } - /** Represents a FulfillIntentRequest. */ - class FulfillIntentRequest implements IFulfillIntentRequest { + /** Represents a StreamingDetectIntentRequest. */ + class StreamingDetectIntentRequest implements IStreamingDetectIntentRequest { /** - * Constructs a new FulfillIntentRequest. + * Constructs a new StreamingDetectIntentRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IFulfillIntentRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3.IStreamingDetectIntentRequest); - /** FulfillIntentRequest matchIntentRequest. */ - public matchIntentRequest?: (google.cloud.dialogflow.cx.v3.IMatchIntentRequest|null); + /** StreamingDetectIntentRequest session. */ + public session: string; - /** FulfillIntentRequest match. */ - public match?: (google.cloud.dialogflow.cx.v3.IMatch|null); + /** StreamingDetectIntentRequest queryParams. */ + public queryParams?: (google.cloud.dialogflow.cx.v3.IQueryParameters|null); - /** FulfillIntentRequest outputAudioConfig. */ + /** StreamingDetectIntentRequest queryInput. */ + public queryInput?: (google.cloud.dialogflow.cx.v3.IQueryInput|null); + + /** StreamingDetectIntentRequest outputAudioConfig. */ public outputAudioConfig?: (google.cloud.dialogflow.cx.v3.IOutputAudioConfig|null); /** - * Creates a new FulfillIntentRequest instance using the specified properties. + * Creates a new StreamingDetectIntentRequest instance using the specified properties. * @param [properties] Properties to set - * @returns FulfillIntentRequest instance + * @returns StreamingDetectIntentRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IFulfillIntentRequest): google.cloud.dialogflow.cx.v3.FulfillIntentRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3.IStreamingDetectIntentRequest): google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest; /** - * Encodes the specified FulfillIntentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.FulfillIntentRequest.verify|verify} messages. - * @param message FulfillIntentRequest message or plain object to encode + * Encodes the specified StreamingDetectIntentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest.verify|verify} messages. + * @param message StreamingDetectIntentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IFulfillIntentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IStreamingDetectIntentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified FulfillIntentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.FulfillIntentRequest.verify|verify} messages. - * @param message FulfillIntentRequest message or plain object to encode + * Encodes the specified StreamingDetectIntentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest.verify|verify} messages. + * @param message StreamingDetectIntentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IFulfillIntentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IStreamingDetectIntentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FulfillIntentRequest message from the specified reader or buffer. + * Decodes a StreamingDetectIntentRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns FulfillIntentRequest + * @returns StreamingDetectIntentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.FulfillIntentRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest; /** - * Decodes a FulfillIntentRequest message from the specified reader or buffer, length delimited. + * Decodes a StreamingDetectIntentRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FulfillIntentRequest + * @returns StreamingDetectIntentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.FulfillIntentRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest; /** - * Verifies a FulfillIntentRequest message. + * Verifies a StreamingDetectIntentRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a FulfillIntentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a StreamingDetectIntentRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FulfillIntentRequest + * @returns StreamingDetectIntentRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.FulfillIntentRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest; /** - * Creates a plain object from a FulfillIntentRequest message. Also converts values to other types if specified. - * @param message FulfillIntentRequest + * Creates a plain object from a StreamingDetectIntentRequest message. Also converts values to other types if specified. + * @param message StreamingDetectIntentRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.FulfillIntentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FulfillIntentRequest to JSON. + * Converts this StreamingDetectIntentRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a FulfillIntentResponse. */ - interface IFulfillIntentResponse { - - /** FulfillIntentResponse responseId */ - responseId?: (string|null); - - /** FulfillIntentResponse queryResult */ - queryResult?: (google.cloud.dialogflow.cx.v3.IQueryResult|null); + /** Properties of a StreamingDetectIntentResponse. */ + interface IStreamingDetectIntentResponse { - /** FulfillIntentResponse outputAudio */ - outputAudio?: (Uint8Array|string|null); + /** StreamingDetectIntentResponse recognitionResult */ + recognitionResult?: (google.cloud.dialogflow.cx.v3.IStreamingRecognitionResult|null); - /** FulfillIntentResponse outputAudioConfig */ - outputAudioConfig?: (google.cloud.dialogflow.cx.v3.IOutputAudioConfig|null); + /** StreamingDetectIntentResponse detectIntentResponse */ + detectIntentResponse?: (google.cloud.dialogflow.cx.v3.IDetectIntentResponse|null); } - /** Represents a FulfillIntentResponse. */ - class FulfillIntentResponse implements IFulfillIntentResponse { + /** Represents a StreamingDetectIntentResponse. */ + class StreamingDetectIntentResponse implements IStreamingDetectIntentResponse { /** - * Constructs a new FulfillIntentResponse. + * Constructs a new StreamingDetectIntentResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IFulfillIntentResponse); - - /** FulfillIntentResponse responseId. */ - public responseId: string; + constructor(properties?: google.cloud.dialogflow.cx.v3.IStreamingDetectIntentResponse); - /** FulfillIntentResponse queryResult. */ - public queryResult?: (google.cloud.dialogflow.cx.v3.IQueryResult|null); + /** StreamingDetectIntentResponse recognitionResult. */ + public recognitionResult?: (google.cloud.dialogflow.cx.v3.IStreamingRecognitionResult|null); - /** FulfillIntentResponse outputAudio. */ - public outputAudio: (Uint8Array|string); + /** StreamingDetectIntentResponse detectIntentResponse. */ + public detectIntentResponse?: (google.cloud.dialogflow.cx.v3.IDetectIntentResponse|null); - /** FulfillIntentResponse outputAudioConfig. */ - public outputAudioConfig?: (google.cloud.dialogflow.cx.v3.IOutputAudioConfig|null); + /** StreamingDetectIntentResponse response. */ + public response?: ("recognitionResult"|"detectIntentResponse"); /** - * Creates a new FulfillIntentResponse instance using the specified properties. + * Creates a new StreamingDetectIntentResponse instance using the specified properties. * @param [properties] Properties to set - * @returns FulfillIntentResponse instance + * @returns StreamingDetectIntentResponse instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IFulfillIntentResponse): google.cloud.dialogflow.cx.v3.FulfillIntentResponse; + public static create(properties?: google.cloud.dialogflow.cx.v3.IStreamingDetectIntentResponse): google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse; /** - * Encodes the specified FulfillIntentResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.FulfillIntentResponse.verify|verify} messages. - * @param message FulfillIntentResponse message or plain object to encode + * Encodes the specified StreamingDetectIntentResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse.verify|verify} messages. + * @param message StreamingDetectIntentResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IFulfillIntentResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IStreamingDetectIntentResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified FulfillIntentResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.FulfillIntentResponse.verify|verify} messages. - * @param message FulfillIntentResponse message or plain object to encode + * Encodes the specified StreamingDetectIntentResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse.verify|verify} messages. + * @param message StreamingDetectIntentResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IFulfillIntentResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IStreamingDetectIntentResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FulfillIntentResponse message from the specified reader or buffer. + * Decodes a StreamingDetectIntentResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns FulfillIntentResponse + * @returns StreamingDetectIntentResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.FulfillIntentResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse; /** - * Decodes a FulfillIntentResponse message from the specified reader or buffer, length delimited. + * Decodes a StreamingDetectIntentResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FulfillIntentResponse + * @returns StreamingDetectIntentResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.FulfillIntentResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse; /** - * Verifies a FulfillIntentResponse message. + * Verifies a StreamingDetectIntentResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a FulfillIntentResponse message from a plain object. Also converts values to their respective internal types. + * Creates a StreamingDetectIntentResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FulfillIntentResponse + * @returns StreamingDetectIntentResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.FulfillIntentResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse; /** - * Creates a plain object from a FulfillIntentResponse message. Also converts values to other types if specified. - * @param message FulfillIntentResponse + * Creates a plain object from a StreamingDetectIntentResponse message. Also converts values to other types if specified. + * @param message StreamingDetectIntentResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.FulfillIntentResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FulfillIntentResponse to JSON. + * Converts this StreamingDetectIntentResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a SentimentAnalysisResult. */ - interface ISentimentAnalysisResult { + /** Properties of a StreamingRecognitionResult. */ + interface IStreamingRecognitionResult { - /** SentimentAnalysisResult score */ - score?: (number|null); + /** StreamingRecognitionResult messageType */ + messageType?: (google.cloud.dialogflow.cx.v3.StreamingRecognitionResult.MessageType|keyof typeof google.cloud.dialogflow.cx.v3.StreamingRecognitionResult.MessageType|null); - /** SentimentAnalysisResult magnitude */ - magnitude?: (number|null); + /** StreamingRecognitionResult transcript */ + transcript?: (string|null); + + /** StreamingRecognitionResult isFinal */ + isFinal?: (boolean|null); + + /** StreamingRecognitionResult confidence */ + confidence?: (number|null); + + /** StreamingRecognitionResult stability */ + stability?: (number|null); + + /** StreamingRecognitionResult speechWordInfo */ + speechWordInfo?: (google.cloud.dialogflow.cx.v3.ISpeechWordInfo[]|null); + + /** StreamingRecognitionResult speechEndOffset */ + speechEndOffset?: (google.protobuf.IDuration|null); } - /** Represents a SentimentAnalysisResult. */ - class SentimentAnalysisResult implements ISentimentAnalysisResult { + /** Represents a StreamingRecognitionResult. */ + class StreamingRecognitionResult implements IStreamingRecognitionResult { /** - * Constructs a new SentimentAnalysisResult. + * Constructs a new StreamingRecognitionResult. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.ISentimentAnalysisResult); + constructor(properties?: google.cloud.dialogflow.cx.v3.IStreamingRecognitionResult); - /** SentimentAnalysisResult score. */ - public score: number; + /** StreamingRecognitionResult messageType. */ + public messageType: (google.cloud.dialogflow.cx.v3.StreamingRecognitionResult.MessageType|keyof typeof google.cloud.dialogflow.cx.v3.StreamingRecognitionResult.MessageType); - /** SentimentAnalysisResult magnitude. */ - public magnitude: number; + /** StreamingRecognitionResult transcript. */ + public transcript: string; + + /** StreamingRecognitionResult isFinal. */ + public isFinal: boolean; + + /** StreamingRecognitionResult confidence. */ + public confidence: number; + + /** StreamingRecognitionResult stability. */ + public stability: number; + + /** StreamingRecognitionResult speechWordInfo. */ + public speechWordInfo: google.cloud.dialogflow.cx.v3.ISpeechWordInfo[]; + + /** StreamingRecognitionResult speechEndOffset. */ + public speechEndOffset?: (google.protobuf.IDuration|null); /** - * Creates a new SentimentAnalysisResult instance using the specified properties. + * Creates a new StreamingRecognitionResult instance using the specified properties. * @param [properties] Properties to set - * @returns SentimentAnalysisResult instance + * @returns StreamingRecognitionResult instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.ISentimentAnalysisResult): google.cloud.dialogflow.cx.v3.SentimentAnalysisResult; + public static create(properties?: google.cloud.dialogflow.cx.v3.IStreamingRecognitionResult): google.cloud.dialogflow.cx.v3.StreamingRecognitionResult; /** - * Encodes the specified SentimentAnalysisResult message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SentimentAnalysisResult.verify|verify} messages. - * @param message SentimentAnalysisResult message or plain object to encode + * Encodes the specified StreamingRecognitionResult message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.StreamingRecognitionResult.verify|verify} messages. + * @param message StreamingRecognitionResult message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.ISentimentAnalysisResult, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IStreamingRecognitionResult, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SentimentAnalysisResult message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SentimentAnalysisResult.verify|verify} messages. - * @param message SentimentAnalysisResult message or plain object to encode + * Encodes the specified StreamingRecognitionResult message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.StreamingRecognitionResult.verify|verify} messages. + * @param message StreamingRecognitionResult message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ISentimentAnalysisResult, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IStreamingRecognitionResult, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SentimentAnalysisResult message from the specified reader or buffer. + * Decodes a StreamingRecognitionResult message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SentimentAnalysisResult + * @returns StreamingRecognitionResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.SentimentAnalysisResult; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.StreamingRecognitionResult; /** - * Decodes a SentimentAnalysisResult message from the specified reader or buffer, length delimited. + * Decodes a StreamingRecognitionResult message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SentimentAnalysisResult + * @returns StreamingRecognitionResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.SentimentAnalysisResult; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.StreamingRecognitionResult; /** - * Verifies a SentimentAnalysisResult message. + * Verifies a StreamingRecognitionResult message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a SentimentAnalysisResult message from a plain object. Also converts values to their respective internal types. + * Creates a StreamingRecognitionResult message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SentimentAnalysisResult + * @returns StreamingRecognitionResult */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.SentimentAnalysisResult; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.StreamingRecognitionResult; /** - * Creates a plain object from a SentimentAnalysisResult message. Also converts values to other types if specified. - * @param message SentimentAnalysisResult + * Creates a plain object from a StreamingRecognitionResult message. Also converts values to other types if specified. + * @param message StreamingRecognitionResult * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.SentimentAnalysisResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.StreamingRecognitionResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SentimentAnalysisResult to JSON. + * Converts this StreamingRecognitionResult to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Represents a SessionEntityTypes */ - class SessionEntityTypes extends $protobuf.rpc.Service { - - /** - * Constructs a new SessionEntityTypes service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); - - /** - * Creates new SessionEntityTypes service using the specified rpc implementation. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - * @returns RPC service. Useful where requests and/or responses are streamed. - */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): SessionEntityTypes; - - /** - * Calls ListSessionEntityTypes. - * @param request ListSessionEntityTypesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListSessionEntityTypesResponse - */ - public listSessionEntityTypes(request: google.cloud.dialogflow.cx.v3.IListSessionEntityTypesRequest, callback: google.cloud.dialogflow.cx.v3.SessionEntityTypes.ListSessionEntityTypesCallback): void; + namespace StreamingRecognitionResult { - /** - * Calls ListSessionEntityTypes. - * @param request ListSessionEntityTypesRequest message or plain object - * @returns Promise - */ - public listSessionEntityTypes(request: google.cloud.dialogflow.cx.v3.IListSessionEntityTypesRequest): Promise; + /** MessageType enum. */ + enum MessageType { + MESSAGE_TYPE_UNSPECIFIED = 0, + TRANSCRIPT = 1, + END_OF_SINGLE_UTTERANCE = 2 + } + } - /** - * Calls GetSessionEntityType. - * @param request GetSessionEntityTypeRequest message or plain object - * @param callback Node-style callback called with the error, if any, and SessionEntityType - */ - public getSessionEntityType(request: google.cloud.dialogflow.cx.v3.IGetSessionEntityTypeRequest, callback: google.cloud.dialogflow.cx.v3.SessionEntityTypes.GetSessionEntityTypeCallback): void; + /** Properties of a QueryParameters. */ + interface IQueryParameters { - /** - * Calls GetSessionEntityType. - * @param request GetSessionEntityTypeRequest message or plain object - * @returns Promise - */ - public getSessionEntityType(request: google.cloud.dialogflow.cx.v3.IGetSessionEntityTypeRequest): Promise; + /** QueryParameters timeZone */ + timeZone?: (string|null); - /** - * Calls CreateSessionEntityType. - * @param request CreateSessionEntityTypeRequest message or plain object - * @param callback Node-style callback called with the error, if any, and SessionEntityType - */ - public createSessionEntityType(request: google.cloud.dialogflow.cx.v3.ICreateSessionEntityTypeRequest, callback: google.cloud.dialogflow.cx.v3.SessionEntityTypes.CreateSessionEntityTypeCallback): void; + /** QueryParameters geoLocation */ + geoLocation?: (google.type.ILatLng|null); - /** - * Calls CreateSessionEntityType. - * @param request CreateSessionEntityTypeRequest message or plain object - * @returns Promise - */ - public createSessionEntityType(request: google.cloud.dialogflow.cx.v3.ICreateSessionEntityTypeRequest): Promise; + /** QueryParameters sessionEntityTypes */ + sessionEntityTypes?: (google.cloud.dialogflow.cx.v3.ISessionEntityType[]|null); - /** - * Calls UpdateSessionEntityType. - * @param request UpdateSessionEntityTypeRequest message or plain object - * @param callback Node-style callback called with the error, if any, and SessionEntityType - */ - public updateSessionEntityType(request: google.cloud.dialogflow.cx.v3.IUpdateSessionEntityTypeRequest, callback: google.cloud.dialogflow.cx.v3.SessionEntityTypes.UpdateSessionEntityTypeCallback): void; + /** QueryParameters payload */ + payload?: (google.protobuf.IStruct|null); - /** - * Calls UpdateSessionEntityType. - * @param request UpdateSessionEntityTypeRequest message or plain object - * @returns Promise - */ - public updateSessionEntityType(request: google.cloud.dialogflow.cx.v3.IUpdateSessionEntityTypeRequest): Promise; + /** QueryParameters parameters */ + parameters?: (google.protobuf.IStruct|null); - /** - * Calls DeleteSessionEntityType. - * @param request DeleteSessionEntityTypeRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public deleteSessionEntityType(request: google.cloud.dialogflow.cx.v3.IDeleteSessionEntityTypeRequest, callback: google.cloud.dialogflow.cx.v3.SessionEntityTypes.DeleteSessionEntityTypeCallback): void; + /** QueryParameters analyzeQueryTextSentiment */ + analyzeQueryTextSentiment?: (boolean|null); - /** - * Calls DeleteSessionEntityType. - * @param request DeleteSessionEntityTypeRequest message or plain object - * @returns Promise - */ - public deleteSessionEntityType(request: google.cloud.dialogflow.cx.v3.IDeleteSessionEntityTypeRequest): Promise; + /** QueryParameters webhookHeaders */ + webhookHeaders?: ({ [k: string]: string }|null); } - namespace SessionEntityTypes { - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.SessionEntityTypes#listSessionEntityTypes}. - * @param error Error, if any - * @param [response] ListSessionEntityTypesResponse - */ - type ListSessionEntityTypesCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse) => void; - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.SessionEntityTypes#getSessionEntityType}. - * @param error Error, if any - * @param [response] SessionEntityType - */ - type GetSessionEntityTypeCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.SessionEntityType) => void; - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.SessionEntityTypes#createSessionEntityType}. - * @param error Error, if any - * @param [response] SessionEntityType - */ - type CreateSessionEntityTypeCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.SessionEntityType) => void; - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.SessionEntityTypes#updateSessionEntityType}. - * @param error Error, if any - * @param [response] SessionEntityType - */ - type UpdateSessionEntityTypeCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.SessionEntityType) => void; + /** Represents a QueryParameters. */ + class QueryParameters implements IQueryParameters { /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.SessionEntityTypes#deleteSessionEntityType}. - * @param error Error, if any - * @param [response] Empty + * Constructs a new QueryParameters. + * @param [properties] Properties to set */ - type DeleteSessionEntityTypeCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - } - - /** Properties of a SessionEntityType. */ - interface ISessionEntityType { - - /** SessionEntityType name */ - name?: (string|null); + constructor(properties?: google.cloud.dialogflow.cx.v3.IQueryParameters); - /** SessionEntityType entityOverrideMode */ - entityOverrideMode?: (google.cloud.dialogflow.cx.v3.SessionEntityType.EntityOverrideMode|keyof typeof google.cloud.dialogflow.cx.v3.SessionEntityType.EntityOverrideMode|null); + /** QueryParameters timeZone. */ + public timeZone: string; - /** SessionEntityType entities */ - entities?: (google.cloud.dialogflow.cx.v3.EntityType.IEntity[]|null); - } + /** QueryParameters geoLocation. */ + public geoLocation?: (google.type.ILatLng|null); - /** Represents a SessionEntityType. */ - class SessionEntityType implements ISessionEntityType { + /** QueryParameters sessionEntityTypes. */ + public sessionEntityTypes: google.cloud.dialogflow.cx.v3.ISessionEntityType[]; - /** - * Constructs a new SessionEntityType. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3.ISessionEntityType); + /** QueryParameters payload. */ + public payload?: (google.protobuf.IStruct|null); - /** SessionEntityType name. */ - public name: string; + /** QueryParameters parameters. */ + public parameters?: (google.protobuf.IStruct|null); - /** SessionEntityType entityOverrideMode. */ - public entityOverrideMode: (google.cloud.dialogflow.cx.v3.SessionEntityType.EntityOverrideMode|keyof typeof google.cloud.dialogflow.cx.v3.SessionEntityType.EntityOverrideMode); + /** QueryParameters analyzeQueryTextSentiment. */ + public analyzeQueryTextSentiment: boolean; - /** SessionEntityType entities. */ - public entities: google.cloud.dialogflow.cx.v3.EntityType.IEntity[]; + /** QueryParameters webhookHeaders. */ + public webhookHeaders: { [k: string]: string }; /** - * Creates a new SessionEntityType instance using the specified properties. + * Creates a new QueryParameters instance using the specified properties. * @param [properties] Properties to set - * @returns SessionEntityType instance + * @returns QueryParameters instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.ISessionEntityType): google.cloud.dialogflow.cx.v3.SessionEntityType; + public static create(properties?: google.cloud.dialogflow.cx.v3.IQueryParameters): google.cloud.dialogflow.cx.v3.QueryParameters; /** - * Encodes the specified SessionEntityType message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SessionEntityType.verify|verify} messages. - * @param message SessionEntityType message or plain object to encode + * Encodes the specified QueryParameters message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.QueryParameters.verify|verify} messages. + * @param message QueryParameters message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.ISessionEntityType, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IQueryParameters, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SessionEntityType message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SessionEntityType.verify|verify} messages. - * @param message SessionEntityType message or plain object to encode + * Encodes the specified QueryParameters message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.QueryParameters.verify|verify} messages. + * @param message QueryParameters message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ISessionEntityType, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IQueryParameters, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SessionEntityType message from the specified reader or buffer. + * Decodes a QueryParameters message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SessionEntityType + * @returns QueryParameters * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.SessionEntityType; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.QueryParameters; /** - * Decodes a SessionEntityType message from the specified reader or buffer, length delimited. + * Decodes a QueryParameters message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SessionEntityType + * @returns QueryParameters * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.SessionEntityType; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.QueryParameters; /** - * Verifies a SessionEntityType message. + * Verifies a QueryParameters message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a SessionEntityType message from a plain object. Also converts values to their respective internal types. + * Creates a QueryParameters message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SessionEntityType + * @returns QueryParameters */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.SessionEntityType; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.QueryParameters; /** - * Creates a plain object from a SessionEntityType message. Also converts values to other types if specified. - * @param message SessionEntityType + * Creates a plain object from a QueryParameters message. Also converts values to other types if specified. + * @param message QueryParameters * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.SessionEntityType, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.QueryParameters, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SessionEntityType to JSON. + * Converts this QueryParameters to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace SessionEntityType { + /** Properties of a QueryInput. */ + interface IQueryInput { - /** EntityOverrideMode enum. */ - enum EntityOverrideMode { - ENTITY_OVERRIDE_MODE_UNSPECIFIED = 0, - ENTITY_OVERRIDE_MODE_OVERRIDE = 1, - ENTITY_OVERRIDE_MODE_SUPPLEMENT = 2 - } - } + /** QueryInput text */ + text?: (google.cloud.dialogflow.cx.v3.ITextInput|null); - /** Properties of a ListSessionEntityTypesRequest. */ - interface IListSessionEntityTypesRequest { + /** QueryInput intent */ + intent?: (google.cloud.dialogflow.cx.v3.IIntentInput|null); - /** ListSessionEntityTypesRequest parent */ - parent?: (string|null); + /** QueryInput audio */ + audio?: (google.cloud.dialogflow.cx.v3.IAudioInput|null); - /** ListSessionEntityTypesRequest pageSize */ - pageSize?: (number|null); + /** QueryInput event */ + event?: (google.cloud.dialogflow.cx.v3.IEventInput|null); - /** ListSessionEntityTypesRequest pageToken */ - pageToken?: (string|null); + /** QueryInput dtmf */ + dtmf?: (google.cloud.dialogflow.cx.v3.IDtmfInput|null); + + /** QueryInput languageCode */ + languageCode?: (string|null); } - /** Represents a ListSessionEntityTypesRequest. */ - class ListSessionEntityTypesRequest implements IListSessionEntityTypesRequest { + /** Represents a QueryInput. */ + class QueryInput implements IQueryInput { /** - * Constructs a new ListSessionEntityTypesRequest. + * Constructs a new QueryInput. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IListSessionEntityTypesRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3.IQueryInput); - /** ListSessionEntityTypesRequest parent. */ - public parent: string; + /** QueryInput text. */ + public text?: (google.cloud.dialogflow.cx.v3.ITextInput|null); - /** ListSessionEntityTypesRequest pageSize. */ - public pageSize: number; + /** QueryInput intent. */ + public intent?: (google.cloud.dialogflow.cx.v3.IIntentInput|null); - /** ListSessionEntityTypesRequest pageToken. */ - public pageToken: string; + /** QueryInput audio. */ + public audio?: (google.cloud.dialogflow.cx.v3.IAudioInput|null); + + /** QueryInput event. */ + public event?: (google.cloud.dialogflow.cx.v3.IEventInput|null); + + /** QueryInput dtmf. */ + public dtmf?: (google.cloud.dialogflow.cx.v3.IDtmfInput|null); + + /** QueryInput languageCode. */ + public languageCode: string; + + /** QueryInput input. */ + public input?: ("text"|"intent"|"audio"|"event"|"dtmf"); /** - * Creates a new ListSessionEntityTypesRequest instance using the specified properties. + * Creates a new QueryInput instance using the specified properties. * @param [properties] Properties to set - * @returns ListSessionEntityTypesRequest instance + * @returns QueryInput instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IListSessionEntityTypesRequest): google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3.IQueryInput): google.cloud.dialogflow.cx.v3.QueryInput; /** - * Encodes the specified ListSessionEntityTypesRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest.verify|verify} messages. - * @param message ListSessionEntityTypesRequest message or plain object to encode + * Encodes the specified QueryInput message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.QueryInput.verify|verify} messages. + * @param message QueryInput message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IListSessionEntityTypesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IQueryInput, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListSessionEntityTypesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest.verify|verify} messages. - * @param message ListSessionEntityTypesRequest message or plain object to encode + * Encodes the specified QueryInput message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.QueryInput.verify|verify} messages. + * @param message QueryInput message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListSessionEntityTypesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IQueryInput, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListSessionEntityTypesRequest message from the specified reader or buffer. + * Decodes a QueryInput message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListSessionEntityTypesRequest + * @returns QueryInput * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.QueryInput; /** - * Decodes a ListSessionEntityTypesRequest message from the specified reader or buffer, length delimited. + * Decodes a QueryInput message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListSessionEntityTypesRequest + * @returns QueryInput * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.QueryInput; /** - * Verifies a ListSessionEntityTypesRequest message. + * Verifies a QueryInput message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListSessionEntityTypesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a QueryInput message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListSessionEntityTypesRequest + * @returns QueryInput */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.QueryInput; /** - * Creates a plain object from a ListSessionEntityTypesRequest message. Also converts values to other types if specified. - * @param message ListSessionEntityTypesRequest + * Creates a plain object from a QueryInput message. Also converts values to other types if specified. + * @param message QueryInput * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.QueryInput, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListSessionEntityTypesRequest to JSON. + * Converts this QueryInput to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListSessionEntityTypesResponse. */ - interface IListSessionEntityTypesResponse { + /** Properties of a QueryResult. */ + interface IQueryResult { - /** ListSessionEntityTypesResponse sessionEntityTypes */ - sessionEntityTypes?: (google.cloud.dialogflow.cx.v3.ISessionEntityType[]|null); + /** QueryResult text */ + text?: (string|null); - /** ListSessionEntityTypesResponse nextPageToken */ - nextPageToken?: (string|null); + /** QueryResult triggerIntent */ + triggerIntent?: (string|null); + + /** QueryResult transcript */ + transcript?: (string|null); + + /** QueryResult triggerEvent */ + triggerEvent?: (string|null); + + /** QueryResult languageCode */ + languageCode?: (string|null); + + /** QueryResult parameters */ + parameters?: (google.protobuf.IStruct|null); + + /** QueryResult responseMessages */ + responseMessages?: (google.cloud.dialogflow.cx.v3.IResponseMessage[]|null); + + /** QueryResult webhookStatuses */ + webhookStatuses?: (google.rpc.IStatus[]|null); + + /** QueryResult webhookPayloads */ + webhookPayloads?: (google.protobuf.IStruct[]|null); + + /** QueryResult currentPage */ + currentPage?: (google.cloud.dialogflow.cx.v3.IPage|null); + + /** QueryResult intent */ + intent?: (google.cloud.dialogflow.cx.v3.IIntent|null); + + /** QueryResult intentDetectionConfidence */ + intentDetectionConfidence?: (number|null); + + /** QueryResult match */ + match?: (google.cloud.dialogflow.cx.v3.IMatch|null); + + /** QueryResult diagnosticInfo */ + diagnosticInfo?: (google.protobuf.IStruct|null); + + /** QueryResult sentimentAnalysisResult */ + sentimentAnalysisResult?: (google.cloud.dialogflow.cx.v3.ISentimentAnalysisResult|null); } - /** Represents a ListSessionEntityTypesResponse. */ - class ListSessionEntityTypesResponse implements IListSessionEntityTypesResponse { + /** Represents a QueryResult. */ + class QueryResult implements IQueryResult { /** - * Constructs a new ListSessionEntityTypesResponse. + * Constructs a new QueryResult. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IListSessionEntityTypesResponse); + constructor(properties?: google.cloud.dialogflow.cx.v3.IQueryResult); - /** ListSessionEntityTypesResponse sessionEntityTypes. */ - public sessionEntityTypes: google.cloud.dialogflow.cx.v3.ISessionEntityType[]; + /** QueryResult text. */ + public text: string; - /** ListSessionEntityTypesResponse nextPageToken. */ - public nextPageToken: string; + /** QueryResult triggerIntent. */ + public triggerIntent: string; + + /** QueryResult transcript. */ + public transcript: string; + + /** QueryResult triggerEvent. */ + public triggerEvent: string; + + /** QueryResult languageCode. */ + public languageCode: string; + + /** QueryResult parameters. */ + public parameters?: (google.protobuf.IStruct|null); + + /** QueryResult responseMessages. */ + public responseMessages: google.cloud.dialogflow.cx.v3.IResponseMessage[]; + + /** QueryResult webhookStatuses. */ + public webhookStatuses: google.rpc.IStatus[]; + + /** QueryResult webhookPayloads. */ + public webhookPayloads: google.protobuf.IStruct[]; + + /** QueryResult currentPage. */ + public currentPage?: (google.cloud.dialogflow.cx.v3.IPage|null); + + /** QueryResult intent. */ + public intent?: (google.cloud.dialogflow.cx.v3.IIntent|null); + + /** QueryResult intentDetectionConfidence. */ + public intentDetectionConfidence: number; + + /** QueryResult match. */ + public match?: (google.cloud.dialogflow.cx.v3.IMatch|null); + + /** QueryResult diagnosticInfo. */ + public diagnosticInfo?: (google.protobuf.IStruct|null); + + /** QueryResult sentimentAnalysisResult. */ + public sentimentAnalysisResult?: (google.cloud.dialogflow.cx.v3.ISentimentAnalysisResult|null); + + /** QueryResult query. */ + public query?: ("text"|"triggerIntent"|"transcript"|"triggerEvent"); /** - * Creates a new ListSessionEntityTypesResponse instance using the specified properties. + * Creates a new QueryResult instance using the specified properties. * @param [properties] Properties to set - * @returns ListSessionEntityTypesResponse instance + * @returns QueryResult instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IListSessionEntityTypesResponse): google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse; + public static create(properties?: google.cloud.dialogflow.cx.v3.IQueryResult): google.cloud.dialogflow.cx.v3.QueryResult; /** - * Encodes the specified ListSessionEntityTypesResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse.verify|verify} messages. - * @param message ListSessionEntityTypesResponse message or plain object to encode + * Encodes the specified QueryResult message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.QueryResult.verify|verify} messages. + * @param message QueryResult message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IListSessionEntityTypesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IQueryResult, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListSessionEntityTypesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse.verify|verify} messages. - * @param message ListSessionEntityTypesResponse message or plain object to encode + * Encodes the specified QueryResult message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.QueryResult.verify|verify} messages. + * @param message QueryResult message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListSessionEntityTypesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IQueryResult, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListSessionEntityTypesResponse message from the specified reader or buffer. + * Decodes a QueryResult message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListSessionEntityTypesResponse + * @returns QueryResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.QueryResult; /** - * Decodes a ListSessionEntityTypesResponse message from the specified reader or buffer, length delimited. + * Decodes a QueryResult message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListSessionEntityTypesResponse + * @returns QueryResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.QueryResult; /** - * Verifies a ListSessionEntityTypesResponse message. + * Verifies a QueryResult message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListSessionEntityTypesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a QueryResult message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListSessionEntityTypesResponse + * @returns QueryResult */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.QueryResult; /** - * Creates a plain object from a ListSessionEntityTypesResponse message. Also converts values to other types if specified. - * @param message ListSessionEntityTypesResponse + * Creates a plain object from a QueryResult message. Also converts values to other types if specified. + * @param message QueryResult * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.QueryResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListSessionEntityTypesResponse to JSON. + * Converts this QueryResult to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetSessionEntityTypeRequest. */ - interface IGetSessionEntityTypeRequest { + /** Properties of a TextInput. */ + interface ITextInput { - /** GetSessionEntityTypeRequest name */ - name?: (string|null); + /** TextInput text */ + text?: (string|null); } - /** Represents a GetSessionEntityTypeRequest. */ - class GetSessionEntityTypeRequest implements IGetSessionEntityTypeRequest { + /** Represents a TextInput. */ + class TextInput implements ITextInput { /** - * Constructs a new GetSessionEntityTypeRequest. + * Constructs a new TextInput. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IGetSessionEntityTypeRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3.ITextInput); - /** GetSessionEntityTypeRequest name. */ - public name: string; + /** TextInput text. */ + public text: string; /** - * Creates a new GetSessionEntityTypeRequest instance using the specified properties. + * Creates a new TextInput instance using the specified properties. * @param [properties] Properties to set - * @returns GetSessionEntityTypeRequest instance + * @returns TextInput instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IGetSessionEntityTypeRequest): google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3.ITextInput): google.cloud.dialogflow.cx.v3.TextInput; /** - * Encodes the specified GetSessionEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest.verify|verify} messages. - * @param message GetSessionEntityTypeRequest message or plain object to encode + * Encodes the specified TextInput message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TextInput.verify|verify} messages. + * @param message TextInput message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IGetSessionEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.ITextInput, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetSessionEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest.verify|verify} messages. - * @param message GetSessionEntityTypeRequest message or plain object to encode + * Encodes the specified TextInput message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TextInput.verify|verify} messages. + * @param message TextInput message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IGetSessionEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ITextInput, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetSessionEntityTypeRequest message from the specified reader or buffer. + * Decodes a TextInput message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetSessionEntityTypeRequest + * @returns TextInput * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.TextInput; /** - * Decodes a GetSessionEntityTypeRequest message from the specified reader or buffer, length delimited. + * Decodes a TextInput message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetSessionEntityTypeRequest + * @returns TextInput * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.TextInput; /** - * Verifies a GetSessionEntityTypeRequest message. + * Verifies a TextInput message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetSessionEntityTypeRequest message from a plain object. Also converts values to their respective internal types. + * Creates a TextInput message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetSessionEntityTypeRequest + * @returns TextInput */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.TextInput; /** - * Creates a plain object from a GetSessionEntityTypeRequest message. Also converts values to other types if specified. - * @param message GetSessionEntityTypeRequest + * Creates a plain object from a TextInput message. Also converts values to other types if specified. + * @param message TextInput * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.TextInput, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetSessionEntityTypeRequest to JSON. + * Converts this TextInput to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CreateSessionEntityTypeRequest. */ - interface ICreateSessionEntityTypeRequest { - - /** CreateSessionEntityTypeRequest parent */ - parent?: (string|null); + /** Properties of an IntentInput. */ + interface IIntentInput { - /** CreateSessionEntityTypeRequest sessionEntityType */ - sessionEntityType?: (google.cloud.dialogflow.cx.v3.ISessionEntityType|null); + /** IntentInput intent */ + intent?: (string|null); } - /** Represents a CreateSessionEntityTypeRequest. */ - class CreateSessionEntityTypeRequest implements ICreateSessionEntityTypeRequest { + /** Represents an IntentInput. */ + class IntentInput implements IIntentInput { /** - * Constructs a new CreateSessionEntityTypeRequest. + * Constructs a new IntentInput. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.ICreateSessionEntityTypeRequest); - - /** CreateSessionEntityTypeRequest parent. */ - public parent: string; + constructor(properties?: google.cloud.dialogflow.cx.v3.IIntentInput); - /** CreateSessionEntityTypeRequest sessionEntityType. */ - public sessionEntityType?: (google.cloud.dialogflow.cx.v3.ISessionEntityType|null); + /** IntentInput intent. */ + public intent: string; /** - * Creates a new CreateSessionEntityTypeRequest instance using the specified properties. + * Creates a new IntentInput instance using the specified properties. * @param [properties] Properties to set - * @returns CreateSessionEntityTypeRequest instance + * @returns IntentInput instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.ICreateSessionEntityTypeRequest): google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3.IIntentInput): google.cloud.dialogflow.cx.v3.IntentInput; /** - * Encodes the specified CreateSessionEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest.verify|verify} messages. - * @param message CreateSessionEntityTypeRequest message or plain object to encode + * Encodes the specified IntentInput message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.IntentInput.verify|verify} messages. + * @param message IntentInput message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.ICreateSessionEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IIntentInput, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateSessionEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest.verify|verify} messages. - * @param message CreateSessionEntityTypeRequest message or plain object to encode + * Encodes the specified IntentInput message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.IntentInput.verify|verify} messages. + * @param message IntentInput message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ICreateSessionEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IIntentInput, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateSessionEntityTypeRequest message from the specified reader or buffer. + * Decodes an IntentInput message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateSessionEntityTypeRequest + * @returns IntentInput * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.IntentInput; /** - * Decodes a CreateSessionEntityTypeRequest message from the specified reader or buffer, length delimited. + * Decodes an IntentInput message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateSessionEntityTypeRequest + * @returns IntentInput * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.IntentInput; /** - * Verifies a CreateSessionEntityTypeRequest message. + * Verifies an IntentInput message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CreateSessionEntityTypeRequest message from a plain object. Also converts values to their respective internal types. + * Creates an IntentInput message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateSessionEntityTypeRequest + * @returns IntentInput */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.IntentInput; /** - * Creates a plain object from a CreateSessionEntityTypeRequest message. Also converts values to other types if specified. - * @param message CreateSessionEntityTypeRequest + * Creates a plain object from an IntentInput message. Also converts values to other types if specified. + * @param message IntentInput * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.IntentInput, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateSessionEntityTypeRequest to JSON. + * Converts this IntentInput to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an UpdateSessionEntityTypeRequest. */ - interface IUpdateSessionEntityTypeRequest { + /** Properties of an AudioInput. */ + interface IAudioInput { - /** UpdateSessionEntityTypeRequest sessionEntityType */ - sessionEntityType?: (google.cloud.dialogflow.cx.v3.ISessionEntityType|null); + /** AudioInput config */ + config?: (google.cloud.dialogflow.cx.v3.IInputAudioConfig|null); - /** UpdateSessionEntityTypeRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** AudioInput audio */ + audio?: (Uint8Array|string|null); } - /** Represents an UpdateSessionEntityTypeRequest. */ - class UpdateSessionEntityTypeRequest implements IUpdateSessionEntityTypeRequest { + /** Represents an AudioInput. */ + class AudioInput implements IAudioInput { /** - * Constructs a new UpdateSessionEntityTypeRequest. + * Constructs a new AudioInput. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IUpdateSessionEntityTypeRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3.IAudioInput); - /** UpdateSessionEntityTypeRequest sessionEntityType. */ - public sessionEntityType?: (google.cloud.dialogflow.cx.v3.ISessionEntityType|null); + /** AudioInput config. */ + public config?: (google.cloud.dialogflow.cx.v3.IInputAudioConfig|null); - /** UpdateSessionEntityTypeRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** AudioInput audio. */ + public audio: (Uint8Array|string); /** - * Creates a new UpdateSessionEntityTypeRequest instance using the specified properties. + * Creates a new AudioInput instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateSessionEntityTypeRequest instance + * @returns AudioInput instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IUpdateSessionEntityTypeRequest): google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3.IAudioInput): google.cloud.dialogflow.cx.v3.AudioInput; /** - * Encodes the specified UpdateSessionEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest.verify|verify} messages. - * @param message UpdateSessionEntityTypeRequest message or plain object to encode + * Encodes the specified AudioInput message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.AudioInput.verify|verify} messages. + * @param message AudioInput message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IUpdateSessionEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IAudioInput, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateSessionEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest.verify|verify} messages. - * @param message UpdateSessionEntityTypeRequest message or plain object to encode + * Encodes the specified AudioInput message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.AudioInput.verify|verify} messages. + * @param message AudioInput message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IUpdateSessionEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IAudioInput, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateSessionEntityTypeRequest message from the specified reader or buffer. + * Decodes an AudioInput message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateSessionEntityTypeRequest + * @returns AudioInput * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.AudioInput; /** - * Decodes an UpdateSessionEntityTypeRequest message from the specified reader or buffer, length delimited. + * Decodes an AudioInput message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateSessionEntityTypeRequest + * @returns AudioInput * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.AudioInput; /** - * Verifies an UpdateSessionEntityTypeRequest message. + * Verifies an AudioInput message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an UpdateSessionEntityTypeRequest message from a plain object. Also converts values to their respective internal types. + * Creates an AudioInput message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateSessionEntityTypeRequest + * @returns AudioInput */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.AudioInput; /** - * Creates a plain object from an UpdateSessionEntityTypeRequest message. Also converts values to other types if specified. - * @param message UpdateSessionEntityTypeRequest + * Creates a plain object from an AudioInput message. Also converts values to other types if specified. + * @param message AudioInput * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.AudioInput, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateSessionEntityTypeRequest to JSON. + * Converts this AudioInput to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DeleteSessionEntityTypeRequest. */ - interface IDeleteSessionEntityTypeRequest { + /** Properties of an EventInput. */ + interface IEventInput { - /** DeleteSessionEntityTypeRequest name */ - name?: (string|null); + /** EventInput event */ + event?: (string|null); } - /** Represents a DeleteSessionEntityTypeRequest. */ - class DeleteSessionEntityTypeRequest implements IDeleteSessionEntityTypeRequest { + /** Represents an EventInput. */ + class EventInput implements IEventInput { /** - * Constructs a new DeleteSessionEntityTypeRequest. + * Constructs a new EventInput. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IDeleteSessionEntityTypeRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3.IEventInput); - /** DeleteSessionEntityTypeRequest name. */ - public name: string; + /** EventInput event. */ + public event: string; /** - * Creates a new DeleteSessionEntityTypeRequest instance using the specified properties. + * Creates a new EventInput instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteSessionEntityTypeRequest instance + * @returns EventInput instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IDeleteSessionEntityTypeRequest): google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3.IEventInput): google.cloud.dialogflow.cx.v3.EventInput; /** - * Encodes the specified DeleteSessionEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest.verify|verify} messages. - * @param message DeleteSessionEntityTypeRequest message or plain object to encode + * Encodes the specified EventInput message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.EventInput.verify|verify} messages. + * @param message EventInput message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IDeleteSessionEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IEventInput, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteSessionEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest.verify|verify} messages. - * @param message DeleteSessionEntityTypeRequest message or plain object to encode + * Encodes the specified EventInput message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.EventInput.verify|verify} messages. + * @param message EventInput message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IDeleteSessionEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IEventInput, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteSessionEntityTypeRequest message from the specified reader or buffer. + * Decodes an EventInput message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteSessionEntityTypeRequest + * @returns EventInput * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.EventInput; /** - * Decodes a DeleteSessionEntityTypeRequest message from the specified reader or buffer, length delimited. + * Decodes an EventInput message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteSessionEntityTypeRequest + * @returns EventInput * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.EventInput; /** - * Verifies a DeleteSessionEntityTypeRequest message. + * Verifies an EventInput message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DeleteSessionEntityTypeRequest message from a plain object. Also converts values to their respective internal types. + * Creates an EventInput message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteSessionEntityTypeRequest + * @returns EventInput */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.EventInput; /** - * Creates a plain object from a DeleteSessionEntityTypeRequest message. Also converts values to other types if specified. - * @param message DeleteSessionEntityTypeRequest + * Creates a plain object from an EventInput message. Also converts values to other types if specified. + * @param message EventInput * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.EventInput, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteSessionEntityTypeRequest to JSON. + * Converts this EventInput to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Represents a TransitionRouteGroups */ - class TransitionRouteGroups extends $protobuf.rpc.Service { + /** Properties of a DtmfInput. */ + interface IDtmfInput { - /** - * Constructs a new TransitionRouteGroups service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + /** DtmfInput digits */ + digits?: (string|null); - /** - * Creates new TransitionRouteGroups service using the specified rpc implementation. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - * @returns RPC service. Useful where requests and/or responses are streamed. - */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): TransitionRouteGroups; + /** DtmfInput finishDigit */ + finishDigit?: (string|null); + } - /** - * Calls ListTransitionRouteGroups. - * @param request ListTransitionRouteGroupsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListTransitionRouteGroupsResponse - */ - public listTransitionRouteGroups(request: google.cloud.dialogflow.cx.v3.IListTransitionRouteGroupsRequest, callback: google.cloud.dialogflow.cx.v3.TransitionRouteGroups.ListTransitionRouteGroupsCallback): void; + /** Represents a DtmfInput. */ + class DtmfInput implements IDtmfInput { /** - * Calls ListTransitionRouteGroups. - * @param request ListTransitionRouteGroupsRequest message or plain object - * @returns Promise + * Constructs a new DtmfInput. + * @param [properties] Properties to set */ - public listTransitionRouteGroups(request: google.cloud.dialogflow.cx.v3.IListTransitionRouteGroupsRequest): Promise; + constructor(properties?: google.cloud.dialogflow.cx.v3.IDtmfInput); - /** - * Calls GetTransitionRouteGroup. - * @param request GetTransitionRouteGroupRequest message or plain object - * @param callback Node-style callback called with the error, if any, and TransitionRouteGroup - */ - public getTransitionRouteGroup(request: google.cloud.dialogflow.cx.v3.IGetTransitionRouteGroupRequest, callback: google.cloud.dialogflow.cx.v3.TransitionRouteGroups.GetTransitionRouteGroupCallback): void; + /** DtmfInput digits. */ + public digits: string; - /** - * Calls GetTransitionRouteGroup. - * @param request GetTransitionRouteGroupRequest message or plain object - * @returns Promise - */ - public getTransitionRouteGroup(request: google.cloud.dialogflow.cx.v3.IGetTransitionRouteGroupRequest): Promise; + /** DtmfInput finishDigit. */ + public finishDigit: string; /** - * Calls CreateTransitionRouteGroup. - * @param request CreateTransitionRouteGroupRequest message or plain object - * @param callback Node-style callback called with the error, if any, and TransitionRouteGroup + * Creates a new DtmfInput instance using the specified properties. + * @param [properties] Properties to set + * @returns DtmfInput instance */ - public createTransitionRouteGroup(request: google.cloud.dialogflow.cx.v3.ICreateTransitionRouteGroupRequest, callback: google.cloud.dialogflow.cx.v3.TransitionRouteGroups.CreateTransitionRouteGroupCallback): void; + public static create(properties?: google.cloud.dialogflow.cx.v3.IDtmfInput): google.cloud.dialogflow.cx.v3.DtmfInput; /** - * Calls CreateTransitionRouteGroup. - * @param request CreateTransitionRouteGroupRequest message or plain object - * @returns Promise + * Encodes the specified DtmfInput message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DtmfInput.verify|verify} messages. + * @param message DtmfInput message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public createTransitionRouteGroup(request: google.cloud.dialogflow.cx.v3.ICreateTransitionRouteGroupRequest): Promise; + public static encode(message: google.cloud.dialogflow.cx.v3.IDtmfInput, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls UpdateTransitionRouteGroup. - * @param request UpdateTransitionRouteGroupRequest message or plain object - * @param callback Node-style callback called with the error, if any, and TransitionRouteGroup + * Encodes the specified DtmfInput message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DtmfInput.verify|verify} messages. + * @param message DtmfInput message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public updateTransitionRouteGroup(request: google.cloud.dialogflow.cx.v3.IUpdateTransitionRouteGroupRequest, callback: google.cloud.dialogflow.cx.v3.TransitionRouteGroups.UpdateTransitionRouteGroupCallback): void; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IDtmfInput, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls UpdateTransitionRouteGroup. - * @param request UpdateTransitionRouteGroupRequest message or plain object - * @returns Promise + * Decodes a DtmfInput message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DtmfInput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public updateTransitionRouteGroup(request: google.cloud.dialogflow.cx.v3.IUpdateTransitionRouteGroupRequest): Promise; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.DtmfInput; /** - * Calls DeleteTransitionRouteGroup. - * @param request DeleteTransitionRouteGroupRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty + * Decodes a DtmfInput message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DtmfInput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public deleteTransitionRouteGroup(request: google.cloud.dialogflow.cx.v3.IDeleteTransitionRouteGroupRequest, callback: google.cloud.dialogflow.cx.v3.TransitionRouteGroups.DeleteTransitionRouteGroupCallback): void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.DtmfInput; /** - * Calls DeleteTransitionRouteGroup. - * @param request DeleteTransitionRouteGroupRequest message or plain object - * @returns Promise + * Verifies a DtmfInput message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public deleteTransitionRouteGroup(request: google.cloud.dialogflow.cx.v3.IDeleteTransitionRouteGroupRequest): Promise; - } - - namespace TransitionRouteGroups { + public static verify(message: { [k: string]: any }): (string|null); /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.TransitionRouteGroups#listTransitionRouteGroups}. - * @param error Error, if any - * @param [response] ListTransitionRouteGroupsResponse + * Creates a DtmfInput message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DtmfInput */ - type ListTransitionRouteGroupsCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse) => void; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.DtmfInput; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.TransitionRouteGroups#getTransitionRouteGroup}. - * @param error Error, if any - * @param [response] TransitionRouteGroup + * Creates a plain object from a DtmfInput message. Also converts values to other types if specified. + * @param message DtmfInput + * @param [options] Conversion options + * @returns Plain object */ - type GetTransitionRouteGroupCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.TransitionRouteGroup) => void; + public static toObject(message: google.cloud.dialogflow.cx.v3.DtmfInput, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.TransitionRouteGroups#createTransitionRouteGroup}. - * @param error Error, if any - * @param [response] TransitionRouteGroup + * Converts this DtmfInput to JSON. + * @returns JSON object */ - type CreateTransitionRouteGroupCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.TransitionRouteGroup) => void; + public toJSON(): { [k: string]: any }; + } - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.TransitionRouteGroups#updateTransitionRouteGroup}. - * @param error Error, if any - * @param [response] TransitionRouteGroup - */ - type UpdateTransitionRouteGroupCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.TransitionRouteGroup) => void; + /** Properties of a Match. */ + interface IMatch { - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.TransitionRouteGroups#deleteTransitionRouteGroup}. - * @param error Error, if any - * @param [response] Empty - */ - type DeleteTransitionRouteGroupCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - } + /** Match intent */ + intent?: (google.cloud.dialogflow.cx.v3.IIntent|null); - /** Properties of a TransitionRouteGroup. */ - interface ITransitionRouteGroup { + /** Match event */ + event?: (string|null); - /** TransitionRouteGroup name */ - name?: (string|null); + /** Match parameters */ + parameters?: (google.protobuf.IStruct|null); - /** TransitionRouteGroup displayName */ - displayName?: (string|null); + /** Match resolvedInput */ + resolvedInput?: (string|null); - /** TransitionRouteGroup transitionRoutes */ - transitionRoutes?: (google.cloud.dialogflow.cx.v3.ITransitionRoute[]|null); + /** Match matchType */ + matchType?: (google.cloud.dialogflow.cx.v3.Match.MatchType|keyof typeof google.cloud.dialogflow.cx.v3.Match.MatchType|null); + + /** Match confidence */ + confidence?: (number|null); } - /** Represents a TransitionRouteGroup. */ - class TransitionRouteGroup implements ITransitionRouteGroup { + /** Represents a Match. */ + class Match implements IMatch { /** - * Constructs a new TransitionRouteGroup. + * Constructs a new Match. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.ITransitionRouteGroup); + constructor(properties?: google.cloud.dialogflow.cx.v3.IMatch); - /** TransitionRouteGroup name. */ - public name: string; + /** Match intent. */ + public intent?: (google.cloud.dialogflow.cx.v3.IIntent|null); - /** TransitionRouteGroup displayName. */ - public displayName: string; + /** Match event. */ + public event: string; - /** TransitionRouteGroup transitionRoutes. */ - public transitionRoutes: google.cloud.dialogflow.cx.v3.ITransitionRoute[]; + /** Match parameters. */ + public parameters?: (google.protobuf.IStruct|null); + + /** Match resolvedInput. */ + public resolvedInput: string; + + /** Match matchType. */ + public matchType: (google.cloud.dialogflow.cx.v3.Match.MatchType|keyof typeof google.cloud.dialogflow.cx.v3.Match.MatchType); + + /** Match confidence. */ + public confidence: number; /** - * Creates a new TransitionRouteGroup instance using the specified properties. + * Creates a new Match instance using the specified properties. * @param [properties] Properties to set - * @returns TransitionRouteGroup instance + * @returns Match instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.ITransitionRouteGroup): google.cloud.dialogflow.cx.v3.TransitionRouteGroup; + public static create(properties?: google.cloud.dialogflow.cx.v3.IMatch): google.cloud.dialogflow.cx.v3.Match; /** - * Encodes the specified TransitionRouteGroup message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TransitionRouteGroup.verify|verify} messages. - * @param message TransitionRouteGroup message or plain object to encode + * Encodes the specified Match message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Match.verify|verify} messages. + * @param message Match message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.ITransitionRouteGroup, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IMatch, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TransitionRouteGroup message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TransitionRouteGroup.verify|verify} messages. - * @param message TransitionRouteGroup message or plain object to encode + * Encodes the specified Match message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Match.verify|verify} messages. + * @param message Match message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ITransitionRouteGroup, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IMatch, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TransitionRouteGroup message from the specified reader or buffer. + * Decodes a Match message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TransitionRouteGroup + * @returns Match * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.TransitionRouteGroup; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.Match; /** - * Decodes a TransitionRouteGroup message from the specified reader or buffer, length delimited. + * Decodes a Match message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TransitionRouteGroup + * @returns Match * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.TransitionRouteGroup; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.Match; /** - * Verifies a TransitionRouteGroup message. + * Verifies a Match message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a TransitionRouteGroup message from a plain object. Also converts values to their respective internal types. + * Creates a Match message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TransitionRouteGroup + * @returns Match */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.TransitionRouteGroup; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Match; /** - * Creates a plain object from a TransitionRouteGroup message. Also converts values to other types if specified. - * @param message TransitionRouteGroup + * Creates a plain object from a Match message. Also converts values to other types if specified. + * @param message Match * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.TransitionRouteGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.Match, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TransitionRouteGroup to JSON. + * Converts this Match to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListTransitionRouteGroupsRequest. */ - interface IListTransitionRouteGroupsRequest { + namespace Match { - /** ListTransitionRouteGroupsRequest parent */ - parent?: (string|null); + /** MatchType enum. */ + enum MatchType { + MATCH_TYPE_UNSPECIFIED = 0, + INTENT = 1, + DIRECT_INTENT = 2, + PARAMETER_FILLING = 3, + NO_MATCH = 4, + NO_INPUT = 5, + EVENT = 6 + } + } - /** ListTransitionRouteGroupsRequest pageSize */ - pageSize?: (number|null); + /** Properties of a MatchIntentRequest. */ + interface IMatchIntentRequest { - /** ListTransitionRouteGroupsRequest pageToken */ - pageToken?: (string|null); + /** MatchIntentRequest session */ + session?: (string|null); - /** ListTransitionRouteGroupsRequest languageCode */ - languageCode?: (string|null); + /** MatchIntentRequest queryParams */ + queryParams?: (google.cloud.dialogflow.cx.v3.IQueryParameters|null); + + /** MatchIntentRequest queryInput */ + queryInput?: (google.cloud.dialogflow.cx.v3.IQueryInput|null); } - /** Represents a ListTransitionRouteGroupsRequest. */ - class ListTransitionRouteGroupsRequest implements IListTransitionRouteGroupsRequest { + /** Represents a MatchIntentRequest. */ + class MatchIntentRequest implements IMatchIntentRequest { /** - * Constructs a new ListTransitionRouteGroupsRequest. + * Constructs a new MatchIntentRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IListTransitionRouteGroupsRequest); - - /** ListTransitionRouteGroupsRequest parent. */ - public parent: string; + constructor(properties?: google.cloud.dialogflow.cx.v3.IMatchIntentRequest); - /** ListTransitionRouteGroupsRequest pageSize. */ - public pageSize: number; + /** MatchIntentRequest session. */ + public session: string; - /** ListTransitionRouteGroupsRequest pageToken. */ - public pageToken: string; + /** MatchIntentRequest queryParams. */ + public queryParams?: (google.cloud.dialogflow.cx.v3.IQueryParameters|null); - /** ListTransitionRouteGroupsRequest languageCode. */ - public languageCode: string; + /** MatchIntentRequest queryInput. */ + public queryInput?: (google.cloud.dialogflow.cx.v3.IQueryInput|null); /** - * Creates a new ListTransitionRouteGroupsRequest instance using the specified properties. + * Creates a new MatchIntentRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListTransitionRouteGroupsRequest instance + * @returns MatchIntentRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IListTransitionRouteGroupsRequest): google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3.IMatchIntentRequest): google.cloud.dialogflow.cx.v3.MatchIntentRequest; /** - * Encodes the specified ListTransitionRouteGroupsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest.verify|verify} messages. - * @param message ListTransitionRouteGroupsRequest message or plain object to encode + * Encodes the specified MatchIntentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.MatchIntentRequest.verify|verify} messages. + * @param message MatchIntentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IListTransitionRouteGroupsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IMatchIntentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListTransitionRouteGroupsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest.verify|verify} messages. - * @param message ListTransitionRouteGroupsRequest message or plain object to encode + * Encodes the specified MatchIntentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.MatchIntentRequest.verify|verify} messages. + * @param message MatchIntentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListTransitionRouteGroupsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IMatchIntentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListTransitionRouteGroupsRequest message from the specified reader or buffer. + * Decodes a MatchIntentRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListTransitionRouteGroupsRequest + * @returns MatchIntentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.MatchIntentRequest; /** - * Decodes a ListTransitionRouteGroupsRequest message from the specified reader or buffer, length delimited. + * Decodes a MatchIntentRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListTransitionRouteGroupsRequest + * @returns MatchIntentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.MatchIntentRequest; /** - * Verifies a ListTransitionRouteGroupsRequest message. + * Verifies a MatchIntentRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListTransitionRouteGroupsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a MatchIntentRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListTransitionRouteGroupsRequest + * @returns MatchIntentRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.MatchIntentRequest; /** - * Creates a plain object from a ListTransitionRouteGroupsRequest message. Also converts values to other types if specified. - * @param message ListTransitionRouteGroupsRequest + * Creates a plain object from a MatchIntentRequest message. Also converts values to other types if specified. + * @param message MatchIntentRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.MatchIntentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListTransitionRouteGroupsRequest to JSON. + * Converts this MatchIntentRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListTransitionRouteGroupsResponse. */ - interface IListTransitionRouteGroupsResponse { + /** Properties of a MatchIntentResponse. */ + interface IMatchIntentResponse { - /** ListTransitionRouteGroupsResponse transitionRouteGroups */ - transitionRouteGroups?: (google.cloud.dialogflow.cx.v3.ITransitionRouteGroup[]|null); + /** MatchIntentResponse text */ + text?: (string|null); - /** ListTransitionRouteGroupsResponse nextPageToken */ - nextPageToken?: (string|null); + /** MatchIntentResponse triggerIntent */ + triggerIntent?: (string|null); + + /** MatchIntentResponse transcript */ + transcript?: (string|null); + + /** MatchIntentResponse triggerEvent */ + triggerEvent?: (string|null); + + /** MatchIntentResponse matches */ + matches?: (google.cloud.dialogflow.cx.v3.IMatch[]|null); + + /** MatchIntentResponse currentPage */ + currentPage?: (google.cloud.dialogflow.cx.v3.IPage|null); } - /** Represents a ListTransitionRouteGroupsResponse. */ - class ListTransitionRouteGroupsResponse implements IListTransitionRouteGroupsResponse { + /** Represents a MatchIntentResponse. */ + class MatchIntentResponse implements IMatchIntentResponse { /** - * Constructs a new ListTransitionRouteGroupsResponse. + * Constructs a new MatchIntentResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IListTransitionRouteGroupsResponse); + constructor(properties?: google.cloud.dialogflow.cx.v3.IMatchIntentResponse); - /** ListTransitionRouteGroupsResponse transitionRouteGroups. */ - public transitionRouteGroups: google.cloud.dialogflow.cx.v3.ITransitionRouteGroup[]; + /** MatchIntentResponse text. */ + public text: string; - /** ListTransitionRouteGroupsResponse nextPageToken. */ - public nextPageToken: string; + /** MatchIntentResponse triggerIntent. */ + public triggerIntent: string; + + /** MatchIntentResponse transcript. */ + public transcript: string; + + /** MatchIntentResponse triggerEvent. */ + public triggerEvent: string; + + /** MatchIntentResponse matches. */ + public matches: google.cloud.dialogflow.cx.v3.IMatch[]; + + /** MatchIntentResponse currentPage. */ + public currentPage?: (google.cloud.dialogflow.cx.v3.IPage|null); + + /** MatchIntentResponse query. */ + public query?: ("text"|"triggerIntent"|"transcript"|"triggerEvent"); /** - * Creates a new ListTransitionRouteGroupsResponse instance using the specified properties. + * Creates a new MatchIntentResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ListTransitionRouteGroupsResponse instance + * @returns MatchIntentResponse instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IListTransitionRouteGroupsResponse): google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse; + public static create(properties?: google.cloud.dialogflow.cx.v3.IMatchIntentResponse): google.cloud.dialogflow.cx.v3.MatchIntentResponse; /** - * Encodes the specified ListTransitionRouteGroupsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse.verify|verify} messages. - * @param message ListTransitionRouteGroupsResponse message or plain object to encode + * Encodes the specified MatchIntentResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.MatchIntentResponse.verify|verify} messages. + * @param message MatchIntentResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IListTransitionRouteGroupsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IMatchIntentResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListTransitionRouteGroupsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse.verify|verify} messages. - * @param message ListTransitionRouteGroupsResponse message or plain object to encode + * Encodes the specified MatchIntentResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.MatchIntentResponse.verify|verify} messages. + * @param message MatchIntentResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListTransitionRouteGroupsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IMatchIntentResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListTransitionRouteGroupsResponse message from the specified reader or buffer. + * Decodes a MatchIntentResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListTransitionRouteGroupsResponse + * @returns MatchIntentResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.MatchIntentResponse; /** - * Decodes a ListTransitionRouteGroupsResponse message from the specified reader or buffer, length delimited. + * Decodes a MatchIntentResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListTransitionRouteGroupsResponse + * @returns MatchIntentResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.MatchIntentResponse; /** - * Verifies a ListTransitionRouteGroupsResponse message. + * Verifies a MatchIntentResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListTransitionRouteGroupsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a MatchIntentResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListTransitionRouteGroupsResponse + * @returns MatchIntentResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.MatchIntentResponse; /** - * Creates a plain object from a ListTransitionRouteGroupsResponse message. Also converts values to other types if specified. - * @param message ListTransitionRouteGroupsResponse + * Creates a plain object from a MatchIntentResponse message. Also converts values to other types if specified. + * @param message MatchIntentResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.MatchIntentResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListTransitionRouteGroupsResponse to JSON. + * Converts this MatchIntentResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetTransitionRouteGroupRequest. */ - interface IGetTransitionRouteGroupRequest { + /** Properties of a FulfillIntentRequest. */ + interface IFulfillIntentRequest { - /** GetTransitionRouteGroupRequest name */ - name?: (string|null); + /** FulfillIntentRequest matchIntentRequest */ + matchIntentRequest?: (google.cloud.dialogflow.cx.v3.IMatchIntentRequest|null); - /** GetTransitionRouteGroupRequest languageCode */ - languageCode?: (string|null); + /** FulfillIntentRequest match */ + match?: (google.cloud.dialogflow.cx.v3.IMatch|null); + + /** FulfillIntentRequest outputAudioConfig */ + outputAudioConfig?: (google.cloud.dialogflow.cx.v3.IOutputAudioConfig|null); } - /** Represents a GetTransitionRouteGroupRequest. */ - class GetTransitionRouteGroupRequest implements IGetTransitionRouteGroupRequest { + /** Represents a FulfillIntentRequest. */ + class FulfillIntentRequest implements IFulfillIntentRequest { /** - * Constructs a new GetTransitionRouteGroupRequest. + * Constructs a new FulfillIntentRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IGetTransitionRouteGroupRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3.IFulfillIntentRequest); - /** GetTransitionRouteGroupRequest name. */ - public name: string; + /** FulfillIntentRequest matchIntentRequest. */ + public matchIntentRequest?: (google.cloud.dialogflow.cx.v3.IMatchIntentRequest|null); - /** GetTransitionRouteGroupRequest languageCode. */ - public languageCode: string; + /** FulfillIntentRequest match. */ + public match?: (google.cloud.dialogflow.cx.v3.IMatch|null); + + /** FulfillIntentRequest outputAudioConfig. */ + public outputAudioConfig?: (google.cloud.dialogflow.cx.v3.IOutputAudioConfig|null); /** - * Creates a new GetTransitionRouteGroupRequest instance using the specified properties. + * Creates a new FulfillIntentRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetTransitionRouteGroupRequest instance + * @returns FulfillIntentRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IGetTransitionRouteGroupRequest): google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3.IFulfillIntentRequest): google.cloud.dialogflow.cx.v3.FulfillIntentRequest; /** - * Encodes the specified GetTransitionRouteGroupRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest.verify|verify} messages. - * @param message GetTransitionRouteGroupRequest message or plain object to encode + * Encodes the specified FulfillIntentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.FulfillIntentRequest.verify|verify} messages. + * @param message FulfillIntentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IGetTransitionRouteGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IFulfillIntentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetTransitionRouteGroupRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest.verify|verify} messages. - * @param message GetTransitionRouteGroupRequest message or plain object to encode + * Encodes the specified FulfillIntentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.FulfillIntentRequest.verify|verify} messages. + * @param message FulfillIntentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IGetTransitionRouteGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IFulfillIntentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetTransitionRouteGroupRequest message from the specified reader or buffer. + * Decodes a FulfillIntentRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetTransitionRouteGroupRequest + * @returns FulfillIntentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.FulfillIntentRequest; /** - * Decodes a GetTransitionRouteGroupRequest message from the specified reader or buffer, length delimited. + * Decodes a FulfillIntentRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetTransitionRouteGroupRequest + * @returns FulfillIntentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.FulfillIntentRequest; /** - * Verifies a GetTransitionRouteGroupRequest message. + * Verifies a FulfillIntentRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetTransitionRouteGroupRequest message from a plain object. Also converts values to their respective internal types. + * Creates a FulfillIntentRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetTransitionRouteGroupRequest + * @returns FulfillIntentRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.FulfillIntentRequest; /** - * Creates a plain object from a GetTransitionRouteGroupRequest message. Also converts values to other types if specified. - * @param message GetTransitionRouteGroupRequest + * Creates a plain object from a FulfillIntentRequest message. Also converts values to other types if specified. + * @param message FulfillIntentRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.FulfillIntentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetTransitionRouteGroupRequest to JSON. + * Converts this FulfillIntentRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CreateTransitionRouteGroupRequest. */ - interface ICreateTransitionRouteGroupRequest { - - /** CreateTransitionRouteGroupRequest parent */ - parent?: (string|null); - - /** CreateTransitionRouteGroupRequest transitionRouteGroup */ - transitionRouteGroup?: (google.cloud.dialogflow.cx.v3.ITransitionRouteGroup|null); - - /** CreateTransitionRouteGroupRequest languageCode */ - languageCode?: (string|null); - } - - /** Represents a CreateTransitionRouteGroupRequest. */ - class CreateTransitionRouteGroupRequest implements ICreateTransitionRouteGroupRequest { - - /** - * Constructs a new CreateTransitionRouteGroupRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3.ICreateTransitionRouteGroupRequest); - - /** CreateTransitionRouteGroupRequest parent. */ - public parent: string; - - /** CreateTransitionRouteGroupRequest transitionRouteGroup. */ - public transitionRouteGroup?: (google.cloud.dialogflow.cx.v3.ITransitionRouteGroup|null); - - /** CreateTransitionRouteGroupRequest languageCode. */ - public languageCode: string; - - /** - * Creates a new CreateTransitionRouteGroupRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateTransitionRouteGroupRequest instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3.ICreateTransitionRouteGroupRequest): google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest; - - /** - * Encodes the specified CreateTransitionRouteGroupRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest.verify|verify} messages. - * @param message CreateTransitionRouteGroupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.cx.v3.ICreateTransitionRouteGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateTransitionRouteGroupRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest.verify|verify} messages. - * @param message CreateTransitionRouteGroupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ICreateTransitionRouteGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateTransitionRouteGroupRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateTransitionRouteGroupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest; - - /** - * Decodes a CreateTransitionRouteGroupRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateTransitionRouteGroupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest; - - /** - * Verifies a CreateTransitionRouteGroupRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateTransitionRouteGroupRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateTransitionRouteGroupRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest; - - /** - * Creates a plain object from a CreateTransitionRouteGroupRequest message. Also converts values to other types if specified. - * @param message CreateTransitionRouteGroupRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateTransitionRouteGroupRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Properties of a FulfillIntentResponse. */ + interface IFulfillIntentResponse { - /** Properties of an UpdateTransitionRouteGroupRequest. */ - interface IUpdateTransitionRouteGroupRequest { + /** FulfillIntentResponse responseId */ + responseId?: (string|null); - /** UpdateTransitionRouteGroupRequest transitionRouteGroup */ - transitionRouteGroup?: (google.cloud.dialogflow.cx.v3.ITransitionRouteGroup|null); + /** FulfillIntentResponse queryResult */ + queryResult?: (google.cloud.dialogflow.cx.v3.IQueryResult|null); - /** UpdateTransitionRouteGroupRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** FulfillIntentResponse outputAudio */ + outputAudio?: (Uint8Array|string|null); - /** UpdateTransitionRouteGroupRequest languageCode */ - languageCode?: (string|null); + /** FulfillIntentResponse outputAudioConfig */ + outputAudioConfig?: (google.cloud.dialogflow.cx.v3.IOutputAudioConfig|null); } - /** Represents an UpdateTransitionRouteGroupRequest. */ - class UpdateTransitionRouteGroupRequest implements IUpdateTransitionRouteGroupRequest { + /** Represents a FulfillIntentResponse. */ + class FulfillIntentResponse implements IFulfillIntentResponse { /** - * Constructs a new UpdateTransitionRouteGroupRequest. + * Constructs a new FulfillIntentResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IUpdateTransitionRouteGroupRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3.IFulfillIntentResponse); - /** UpdateTransitionRouteGroupRequest transitionRouteGroup. */ - public transitionRouteGroup?: (google.cloud.dialogflow.cx.v3.ITransitionRouteGroup|null); + /** FulfillIntentResponse responseId. */ + public responseId: string; - /** UpdateTransitionRouteGroupRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** FulfillIntentResponse queryResult. */ + public queryResult?: (google.cloud.dialogflow.cx.v3.IQueryResult|null); - /** UpdateTransitionRouteGroupRequest languageCode. */ - public languageCode: string; + /** FulfillIntentResponse outputAudio. */ + public outputAudio: (Uint8Array|string); + + /** FulfillIntentResponse outputAudioConfig. */ + public outputAudioConfig?: (google.cloud.dialogflow.cx.v3.IOutputAudioConfig|null); /** - * Creates a new UpdateTransitionRouteGroupRequest instance using the specified properties. + * Creates a new FulfillIntentResponse instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateTransitionRouteGroupRequest instance + * @returns FulfillIntentResponse instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IUpdateTransitionRouteGroupRequest): google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3.IFulfillIntentResponse): google.cloud.dialogflow.cx.v3.FulfillIntentResponse; /** - * Encodes the specified UpdateTransitionRouteGroupRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest.verify|verify} messages. - * @param message UpdateTransitionRouteGroupRequest message or plain object to encode + * Encodes the specified FulfillIntentResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.FulfillIntentResponse.verify|verify} messages. + * @param message FulfillIntentResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IUpdateTransitionRouteGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IFulfillIntentResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateTransitionRouteGroupRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest.verify|verify} messages. - * @param message UpdateTransitionRouteGroupRequest message or plain object to encode + * Encodes the specified FulfillIntentResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.FulfillIntentResponse.verify|verify} messages. + * @param message FulfillIntentResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IUpdateTransitionRouteGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IFulfillIntentResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateTransitionRouteGroupRequest message from the specified reader or buffer. + * Decodes a FulfillIntentResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateTransitionRouteGroupRequest + * @returns FulfillIntentResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.FulfillIntentResponse; /** - * Decodes an UpdateTransitionRouteGroupRequest message from the specified reader or buffer, length delimited. + * Decodes a FulfillIntentResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateTransitionRouteGroupRequest + * @returns FulfillIntentResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.FulfillIntentResponse; /** - * Verifies an UpdateTransitionRouteGroupRequest message. + * Verifies a FulfillIntentResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an UpdateTransitionRouteGroupRequest message from a plain object. Also converts values to their respective internal types. + * Creates a FulfillIntentResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateTransitionRouteGroupRequest + * @returns FulfillIntentResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.FulfillIntentResponse; /** - * Creates a plain object from an UpdateTransitionRouteGroupRequest message. Also converts values to other types if specified. - * @param message UpdateTransitionRouteGroupRequest + * Creates a plain object from a FulfillIntentResponse message. Also converts values to other types if specified. + * @param message FulfillIntentResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.FulfillIntentResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateTransitionRouteGroupRequest to JSON. + * Converts this FulfillIntentResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DeleteTransitionRouteGroupRequest. */ - interface IDeleteTransitionRouteGroupRequest { + /** Properties of a SentimentAnalysisResult. */ + interface ISentimentAnalysisResult { - /** DeleteTransitionRouteGroupRequest name */ - name?: (string|null); + /** SentimentAnalysisResult score */ + score?: (number|null); - /** DeleteTransitionRouteGroupRequest force */ - force?: (boolean|null); + /** SentimentAnalysisResult magnitude */ + magnitude?: (number|null); } - /** Represents a DeleteTransitionRouteGroupRequest. */ - class DeleteTransitionRouteGroupRequest implements IDeleteTransitionRouteGroupRequest { + /** Represents a SentimentAnalysisResult. */ + class SentimentAnalysisResult implements ISentimentAnalysisResult { /** - * Constructs a new DeleteTransitionRouteGroupRequest. + * Constructs a new SentimentAnalysisResult. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IDeleteTransitionRouteGroupRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3.ISentimentAnalysisResult); - /** DeleteTransitionRouteGroupRequest name. */ - public name: string; + /** SentimentAnalysisResult score. */ + public score: number; - /** DeleteTransitionRouteGroupRequest force. */ - public force: boolean; + /** SentimentAnalysisResult magnitude. */ + public magnitude: number; /** - * Creates a new DeleteTransitionRouteGroupRequest instance using the specified properties. + * Creates a new SentimentAnalysisResult instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteTransitionRouteGroupRequest instance + * @returns SentimentAnalysisResult instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IDeleteTransitionRouteGroupRequest): google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3.ISentimentAnalysisResult): google.cloud.dialogflow.cx.v3.SentimentAnalysisResult; /** - * Encodes the specified DeleteTransitionRouteGroupRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest.verify|verify} messages. - * @param message DeleteTransitionRouteGroupRequest message or plain object to encode + * Encodes the specified SentimentAnalysisResult message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SentimentAnalysisResult.verify|verify} messages. + * @param message SentimentAnalysisResult message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IDeleteTransitionRouteGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.ISentimentAnalysisResult, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteTransitionRouteGroupRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest.verify|verify} messages. - * @param message DeleteTransitionRouteGroupRequest message or plain object to encode + * Encodes the specified SentimentAnalysisResult message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SentimentAnalysisResult.verify|verify} messages. + * @param message SentimentAnalysisResult message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IDeleteTransitionRouteGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ISentimentAnalysisResult, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteTransitionRouteGroupRequest message from the specified reader or buffer. + * Decodes a SentimentAnalysisResult message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteTransitionRouteGroupRequest + * @returns SentimentAnalysisResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.SentimentAnalysisResult; /** - * Decodes a DeleteTransitionRouteGroupRequest message from the specified reader or buffer, length delimited. + * Decodes a SentimentAnalysisResult message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteTransitionRouteGroupRequest + * @returns SentimentAnalysisResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.SentimentAnalysisResult; /** - * Verifies a DeleteTransitionRouteGroupRequest message. + * Verifies a SentimentAnalysisResult message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DeleteTransitionRouteGroupRequest message from a plain object. Also converts values to their respective internal types. + * Creates a SentimentAnalysisResult message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteTransitionRouteGroupRequest + * @returns SentimentAnalysisResult */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.SentimentAnalysisResult; /** - * Creates a plain object from a DeleteTransitionRouteGroupRequest message. Also converts values to other types if specified. - * @param message DeleteTransitionRouteGroupRequest + * Creates a plain object from a SentimentAnalysisResult message. Also converts values to other types if specified. + * @param message SentimentAnalysisResult * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.SentimentAnalysisResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteTransitionRouteGroupRequest to JSON. + * Converts this SentimentAnalysisResult to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Represents a Versions */ - class Versions extends $protobuf.rpc.Service { + /** Represents a SessionEntityTypes */ + class SessionEntityTypes extends $protobuf.rpc.Service { /** - * Constructs a new Versions service. + * Constructs a new SessionEntityTypes service. * @param rpcImpl RPC implementation * @param [requestDelimited=false] Whether requests are length-delimited * @param [responseDelimited=false] Whether responses are length-delimited @@ -13861,3032 +14130,2678 @@ export namespace google { constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); /** - * Creates new Versions service using the specified rpc implementation. + * Creates new SessionEntityTypes service using the specified rpc implementation. * @param rpcImpl RPC implementation * @param [requestDelimited=false] Whether requests are length-delimited * @param [responseDelimited=false] Whether responses are length-delimited * @returns RPC service. Useful where requests and/or responses are streamed. */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Versions; + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): SessionEntityTypes; /** - * Calls ListVersions. - * @param request ListVersionsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListVersionsResponse + * Calls ListSessionEntityTypes. + * @param request ListSessionEntityTypesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListSessionEntityTypesResponse */ - public listVersions(request: google.cloud.dialogflow.cx.v3.IListVersionsRequest, callback: google.cloud.dialogflow.cx.v3.Versions.ListVersionsCallback): void; + public listSessionEntityTypes(request: google.cloud.dialogflow.cx.v3.IListSessionEntityTypesRequest, callback: google.cloud.dialogflow.cx.v3.SessionEntityTypes.ListSessionEntityTypesCallback): void; /** - * Calls ListVersions. - * @param request ListVersionsRequest message or plain object + * Calls ListSessionEntityTypes. + * @param request ListSessionEntityTypesRequest message or plain object * @returns Promise */ - public listVersions(request: google.cloud.dialogflow.cx.v3.IListVersionsRequest): Promise; + public listSessionEntityTypes(request: google.cloud.dialogflow.cx.v3.IListSessionEntityTypesRequest): Promise; /** - * Calls GetVersion. - * @param request GetVersionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Version + * Calls GetSessionEntityType. + * @param request GetSessionEntityTypeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SessionEntityType */ - public getVersion(request: google.cloud.dialogflow.cx.v3.IGetVersionRequest, callback: google.cloud.dialogflow.cx.v3.Versions.GetVersionCallback): void; + public getSessionEntityType(request: google.cloud.dialogflow.cx.v3.IGetSessionEntityTypeRequest, callback: google.cloud.dialogflow.cx.v3.SessionEntityTypes.GetSessionEntityTypeCallback): void; /** - * Calls GetVersion. - * @param request GetVersionRequest message or plain object + * Calls GetSessionEntityType. + * @param request GetSessionEntityTypeRequest message or plain object * @returns Promise */ - public getVersion(request: google.cloud.dialogflow.cx.v3.IGetVersionRequest): Promise; + public getSessionEntityType(request: google.cloud.dialogflow.cx.v3.IGetSessionEntityTypeRequest): Promise; /** - * Calls CreateVersion. - * @param request CreateVersionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Calls CreateSessionEntityType. + * @param request CreateSessionEntityTypeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SessionEntityType */ - public createVersion(request: google.cloud.dialogflow.cx.v3.ICreateVersionRequest, callback: google.cloud.dialogflow.cx.v3.Versions.CreateVersionCallback): void; + public createSessionEntityType(request: google.cloud.dialogflow.cx.v3.ICreateSessionEntityTypeRequest, callback: google.cloud.dialogflow.cx.v3.SessionEntityTypes.CreateSessionEntityTypeCallback): void; /** - * Calls CreateVersion. - * @param request CreateVersionRequest message or plain object + * Calls CreateSessionEntityType. + * @param request CreateSessionEntityTypeRequest message or plain object * @returns Promise */ - public createVersion(request: google.cloud.dialogflow.cx.v3.ICreateVersionRequest): Promise; + public createSessionEntityType(request: google.cloud.dialogflow.cx.v3.ICreateSessionEntityTypeRequest): Promise; /** - * Calls UpdateVersion. - * @param request UpdateVersionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Version + * Calls UpdateSessionEntityType. + * @param request UpdateSessionEntityTypeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SessionEntityType */ - public updateVersion(request: google.cloud.dialogflow.cx.v3.IUpdateVersionRequest, callback: google.cloud.dialogflow.cx.v3.Versions.UpdateVersionCallback): void; + public updateSessionEntityType(request: google.cloud.dialogflow.cx.v3.IUpdateSessionEntityTypeRequest, callback: google.cloud.dialogflow.cx.v3.SessionEntityTypes.UpdateSessionEntityTypeCallback): void; /** - * Calls UpdateVersion. - * @param request UpdateVersionRequest message or plain object + * Calls UpdateSessionEntityType. + * @param request UpdateSessionEntityTypeRequest message or plain object * @returns Promise */ - public updateVersion(request: google.cloud.dialogflow.cx.v3.IUpdateVersionRequest): Promise; + public updateSessionEntityType(request: google.cloud.dialogflow.cx.v3.IUpdateSessionEntityTypeRequest): Promise; /** - * Calls DeleteVersion. - * @param request DeleteVersionRequest message or plain object + * Calls DeleteSessionEntityType. + * @param request DeleteSessionEntityTypeRequest message or plain object * @param callback Node-style callback called with the error, if any, and Empty */ - public deleteVersion(request: google.cloud.dialogflow.cx.v3.IDeleteVersionRequest, callback: google.cloud.dialogflow.cx.v3.Versions.DeleteVersionCallback): void; - - /** - * Calls DeleteVersion. - * @param request DeleteVersionRequest message or plain object - * @returns Promise - */ - public deleteVersion(request: google.cloud.dialogflow.cx.v3.IDeleteVersionRequest): Promise; - - /** - * Calls LoadVersion. - * @param request LoadVersionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public loadVersion(request: google.cloud.dialogflow.cx.v3.ILoadVersionRequest, callback: google.cloud.dialogflow.cx.v3.Versions.LoadVersionCallback): void; + public deleteSessionEntityType(request: google.cloud.dialogflow.cx.v3.IDeleteSessionEntityTypeRequest, callback: google.cloud.dialogflow.cx.v3.SessionEntityTypes.DeleteSessionEntityTypeCallback): void; /** - * Calls LoadVersion. - * @param request LoadVersionRequest message or plain object + * Calls DeleteSessionEntityType. + * @param request DeleteSessionEntityTypeRequest message or plain object * @returns Promise */ - public loadVersion(request: google.cloud.dialogflow.cx.v3.ILoadVersionRequest): Promise; + public deleteSessionEntityType(request: google.cloud.dialogflow.cx.v3.IDeleteSessionEntityTypeRequest): Promise; } - namespace Versions { + namespace SessionEntityTypes { /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Versions#listVersions}. + * Callback as used by {@link google.cloud.dialogflow.cx.v3.SessionEntityTypes#listSessionEntityTypes}. * @param error Error, if any - * @param [response] ListVersionsResponse + * @param [response] ListSessionEntityTypesResponse */ - type ListVersionsCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.ListVersionsResponse) => void; + type ListSessionEntityTypesCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse) => void; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Versions#getVersion}. + * Callback as used by {@link google.cloud.dialogflow.cx.v3.SessionEntityTypes#getSessionEntityType}. * @param error Error, if any - * @param [response] Version + * @param [response] SessionEntityType */ - type GetVersionCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.Version) => void; + type GetSessionEntityTypeCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.SessionEntityType) => void; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Versions#createVersion}. + * Callback as used by {@link google.cloud.dialogflow.cx.v3.SessionEntityTypes#createSessionEntityType}. * @param error Error, if any - * @param [response] Operation + * @param [response] SessionEntityType */ - type CreateVersionCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + type CreateSessionEntityTypeCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.SessionEntityType) => void; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Versions#updateVersion}. + * Callback as used by {@link google.cloud.dialogflow.cx.v3.SessionEntityTypes#updateSessionEntityType}. * @param error Error, if any - * @param [response] Version + * @param [response] SessionEntityType */ - type UpdateVersionCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.Version) => void; + type UpdateSessionEntityTypeCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.SessionEntityType) => void; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Versions#deleteVersion}. + * Callback as used by {@link google.cloud.dialogflow.cx.v3.SessionEntityTypes#deleteSessionEntityType}. * @param error Error, if any * @param [response] Empty */ - type DeleteVersionCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Versions#loadVersion}. - * @param error Error, if any - * @param [response] Operation - */ - type LoadVersionCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + type DeleteSessionEntityTypeCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; } - /** Properties of a CreateVersionOperationMetadata. */ - interface ICreateVersionOperationMetadata { + /** Properties of a SessionEntityType. */ + interface ISessionEntityType { - /** CreateVersionOperationMetadata version */ - version?: (string|null); + /** SessionEntityType name */ + name?: (string|null); + + /** SessionEntityType entityOverrideMode */ + entityOverrideMode?: (google.cloud.dialogflow.cx.v3.SessionEntityType.EntityOverrideMode|keyof typeof google.cloud.dialogflow.cx.v3.SessionEntityType.EntityOverrideMode|null); + + /** SessionEntityType entities */ + entities?: (google.cloud.dialogflow.cx.v3.EntityType.IEntity[]|null); } - /** Represents a CreateVersionOperationMetadata. */ - class CreateVersionOperationMetadata implements ICreateVersionOperationMetadata { + /** Represents a SessionEntityType. */ + class SessionEntityType implements ISessionEntityType { /** - * Constructs a new CreateVersionOperationMetadata. + * Constructs a new SessionEntityType. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.ICreateVersionOperationMetadata); + constructor(properties?: google.cloud.dialogflow.cx.v3.ISessionEntityType); - /** CreateVersionOperationMetadata version. */ - public version: string; + /** SessionEntityType name. */ + public name: string; + + /** SessionEntityType entityOverrideMode. */ + public entityOverrideMode: (google.cloud.dialogflow.cx.v3.SessionEntityType.EntityOverrideMode|keyof typeof google.cloud.dialogflow.cx.v3.SessionEntityType.EntityOverrideMode); + + /** SessionEntityType entities. */ + public entities: google.cloud.dialogflow.cx.v3.EntityType.IEntity[]; /** - * Creates a new CreateVersionOperationMetadata instance using the specified properties. + * Creates a new SessionEntityType instance using the specified properties. * @param [properties] Properties to set - * @returns CreateVersionOperationMetadata instance + * @returns SessionEntityType instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.ICreateVersionOperationMetadata): google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata; + public static create(properties?: google.cloud.dialogflow.cx.v3.ISessionEntityType): google.cloud.dialogflow.cx.v3.SessionEntityType; /** - * Encodes the specified CreateVersionOperationMetadata message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata.verify|verify} messages. - * @param message CreateVersionOperationMetadata message or plain object to encode + * Encodes the specified SessionEntityType message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SessionEntityType.verify|verify} messages. + * @param message SessionEntityType message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.ICreateVersionOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.ISessionEntityType, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateVersionOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata.verify|verify} messages. - * @param message CreateVersionOperationMetadata message or plain object to encode + * Encodes the specified SessionEntityType message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SessionEntityType.verify|verify} messages. + * @param message SessionEntityType message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ICreateVersionOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ISessionEntityType, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateVersionOperationMetadata message from the specified reader or buffer. + * Decodes a SessionEntityType message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateVersionOperationMetadata + * @returns SessionEntityType * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.SessionEntityType; /** - * Decodes a CreateVersionOperationMetadata message from the specified reader or buffer, length delimited. + * Decodes a SessionEntityType message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateVersionOperationMetadata + * @returns SessionEntityType * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.SessionEntityType; /** - * Verifies a CreateVersionOperationMetadata message. + * Verifies a SessionEntityType message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CreateVersionOperationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a SessionEntityType message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateVersionOperationMetadata + * @returns SessionEntityType */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.SessionEntityType; /** - * Creates a plain object from a CreateVersionOperationMetadata message. Also converts values to other types if specified. - * @param message CreateVersionOperationMetadata + * Creates a plain object from a SessionEntityType message. Also converts values to other types if specified. + * @param message SessionEntityType * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.SessionEntityType, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateVersionOperationMetadata to JSON. + * Converts this SessionEntityType to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a Version. */ - interface IVersion { + namespace SessionEntityType { - /** Version name */ - name?: (string|null); - - /** Version displayName */ - displayName?: (string|null); + /** EntityOverrideMode enum. */ + enum EntityOverrideMode { + ENTITY_OVERRIDE_MODE_UNSPECIFIED = 0, + ENTITY_OVERRIDE_MODE_OVERRIDE = 1, + ENTITY_OVERRIDE_MODE_SUPPLEMENT = 2 + } + } - /** Version description */ - description?: (string|null); + /** Properties of a ListSessionEntityTypesRequest. */ + interface IListSessionEntityTypesRequest { - /** Version nluSettings */ - nluSettings?: (google.cloud.dialogflow.cx.v3.INluSettings|null); + /** ListSessionEntityTypesRequest parent */ + parent?: (string|null); - /** Version createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** ListSessionEntityTypesRequest pageSize */ + pageSize?: (number|null); - /** Version state */ - state?: (google.cloud.dialogflow.cx.v3.Version.State|keyof typeof google.cloud.dialogflow.cx.v3.Version.State|null); + /** ListSessionEntityTypesRequest pageToken */ + pageToken?: (string|null); } - /** Represents a Version. */ - class Version implements IVersion { + /** Represents a ListSessionEntityTypesRequest. */ + class ListSessionEntityTypesRequest implements IListSessionEntityTypesRequest { /** - * Constructs a new Version. + * Constructs a new ListSessionEntityTypesRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IVersion); - - /** Version name. */ - public name: string; - - /** Version displayName. */ - public displayName: string; - - /** Version description. */ - public description: string; + constructor(properties?: google.cloud.dialogflow.cx.v3.IListSessionEntityTypesRequest); - /** Version nluSettings. */ - public nluSettings?: (google.cloud.dialogflow.cx.v3.INluSettings|null); + /** ListSessionEntityTypesRequest parent. */ + public parent: string; - /** Version createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + /** ListSessionEntityTypesRequest pageSize. */ + public pageSize: number; - /** Version state. */ - public state: (google.cloud.dialogflow.cx.v3.Version.State|keyof typeof google.cloud.dialogflow.cx.v3.Version.State); + /** ListSessionEntityTypesRequest pageToken. */ + public pageToken: string; /** - * Creates a new Version instance using the specified properties. + * Creates a new ListSessionEntityTypesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns Version instance + * @returns ListSessionEntityTypesRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IVersion): google.cloud.dialogflow.cx.v3.Version; + public static create(properties?: google.cloud.dialogflow.cx.v3.IListSessionEntityTypesRequest): google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest; /** - * Encodes the specified Version message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Version.verify|verify} messages. - * @param message Version message or plain object to encode + * Encodes the specified ListSessionEntityTypesRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest.verify|verify} messages. + * @param message ListSessionEntityTypesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IVersion, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IListSessionEntityTypesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Version message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Version.verify|verify} messages. - * @param message Version message or plain object to encode + * Encodes the specified ListSessionEntityTypesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest.verify|verify} messages. + * @param message ListSessionEntityTypesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IVersion, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListSessionEntityTypesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Version message from the specified reader or buffer. + * Decodes a ListSessionEntityTypesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Version + * @returns ListSessionEntityTypesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.Version; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest; /** - * Decodes a Version message from the specified reader or buffer, length delimited. + * Decodes a ListSessionEntityTypesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Version + * @returns ListSessionEntityTypesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.Version; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest; /** - * Verifies a Version message. + * Verifies a ListSessionEntityTypesRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Version message from a plain object. Also converts values to their respective internal types. + * Creates a ListSessionEntityTypesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Version + * @returns ListSessionEntityTypesRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Version; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest; /** - * Creates a plain object from a Version message. Also converts values to other types if specified. - * @param message Version + * Creates a plain object from a ListSessionEntityTypesRequest message. Also converts values to other types if specified. + * @param message ListSessionEntityTypesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.Version, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Version to JSON. + * Converts this ListSessionEntityTypesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace Version { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - RUNNING = 1, - SUCCEEDED = 2, - FAILED = 3 - } - } - - /** Properties of a ListVersionsRequest. */ - interface IListVersionsRequest { - - /** ListVersionsRequest parent */ - parent?: (string|null); + /** Properties of a ListSessionEntityTypesResponse. */ + interface IListSessionEntityTypesResponse { - /** ListVersionsRequest pageSize */ - pageSize?: (number|null); + /** ListSessionEntityTypesResponse sessionEntityTypes */ + sessionEntityTypes?: (google.cloud.dialogflow.cx.v3.ISessionEntityType[]|null); - /** ListVersionsRequest pageToken */ - pageToken?: (string|null); + /** ListSessionEntityTypesResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a ListVersionsRequest. */ - class ListVersionsRequest implements IListVersionsRequest { + /** Represents a ListSessionEntityTypesResponse. */ + class ListSessionEntityTypesResponse implements IListSessionEntityTypesResponse { /** - * Constructs a new ListVersionsRequest. + * Constructs a new ListSessionEntityTypesResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IListVersionsRequest); - - /** ListVersionsRequest parent. */ - public parent: string; + constructor(properties?: google.cloud.dialogflow.cx.v3.IListSessionEntityTypesResponse); - /** ListVersionsRequest pageSize. */ - public pageSize: number; + /** ListSessionEntityTypesResponse sessionEntityTypes. */ + public sessionEntityTypes: google.cloud.dialogflow.cx.v3.ISessionEntityType[]; - /** ListVersionsRequest pageToken. */ - public pageToken: string; + /** ListSessionEntityTypesResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new ListVersionsRequest instance using the specified properties. + * Creates a new ListSessionEntityTypesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ListVersionsRequest instance + * @returns ListSessionEntityTypesResponse instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IListVersionsRequest): google.cloud.dialogflow.cx.v3.ListVersionsRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3.IListSessionEntityTypesResponse): google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse; /** - * Encodes the specified ListVersionsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListVersionsRequest.verify|verify} messages. - * @param message ListVersionsRequest message or plain object to encode + * Encodes the specified ListSessionEntityTypesResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse.verify|verify} messages. + * @param message ListSessionEntityTypesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IListVersionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IListSessionEntityTypesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListVersionsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListVersionsRequest.verify|verify} messages. - * @param message ListVersionsRequest message or plain object to encode + * Encodes the specified ListSessionEntityTypesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse.verify|verify} messages. + * @param message ListSessionEntityTypesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListVersionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListSessionEntityTypesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListVersionsRequest message from the specified reader or buffer. + * Decodes a ListSessionEntityTypesResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListVersionsRequest + * @returns ListSessionEntityTypesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ListVersionsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse; /** - * Decodes a ListVersionsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListSessionEntityTypesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListVersionsRequest + * @returns ListSessionEntityTypesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ListVersionsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse; /** - * Verifies a ListVersionsRequest message. + * Verifies a ListSessionEntityTypesResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListVersionsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListSessionEntityTypesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListVersionsRequest + * @returns ListSessionEntityTypesResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListVersionsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse; /** - * Creates a plain object from a ListVersionsRequest message. Also converts values to other types if specified. - * @param message ListVersionsRequest + * Creates a plain object from a ListSessionEntityTypesResponse message. Also converts values to other types if specified. + * @param message ListSessionEntityTypesResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.ListVersionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListVersionsRequest to JSON. + * Converts this ListSessionEntityTypesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListVersionsResponse. */ - interface IListVersionsResponse { - - /** ListVersionsResponse versions */ - versions?: (google.cloud.dialogflow.cx.v3.IVersion[]|null); + /** Properties of a GetSessionEntityTypeRequest. */ + interface IGetSessionEntityTypeRequest { - /** ListVersionsResponse nextPageToken */ - nextPageToken?: (string|null); + /** GetSessionEntityTypeRequest name */ + name?: (string|null); } - /** Represents a ListVersionsResponse. */ - class ListVersionsResponse implements IListVersionsResponse { + /** Represents a GetSessionEntityTypeRequest. */ + class GetSessionEntityTypeRequest implements IGetSessionEntityTypeRequest { /** - * Constructs a new ListVersionsResponse. + * Constructs a new GetSessionEntityTypeRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IListVersionsResponse); - - /** ListVersionsResponse versions. */ - public versions: google.cloud.dialogflow.cx.v3.IVersion[]; + constructor(properties?: google.cloud.dialogflow.cx.v3.IGetSessionEntityTypeRequest); - /** ListVersionsResponse nextPageToken. */ - public nextPageToken: string; + /** GetSessionEntityTypeRequest name. */ + public name: string; /** - * Creates a new ListVersionsResponse instance using the specified properties. + * Creates a new GetSessionEntityTypeRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListVersionsResponse instance + * @returns GetSessionEntityTypeRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IListVersionsResponse): google.cloud.dialogflow.cx.v3.ListVersionsResponse; + public static create(properties?: google.cloud.dialogflow.cx.v3.IGetSessionEntityTypeRequest): google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest; /** - * Encodes the specified ListVersionsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListVersionsResponse.verify|verify} messages. - * @param message ListVersionsResponse message or plain object to encode + * Encodes the specified GetSessionEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest.verify|verify} messages. + * @param message GetSessionEntityTypeRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IListVersionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IGetSessionEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListVersionsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListVersionsResponse.verify|verify} messages. - * @param message ListVersionsResponse message or plain object to encode + * Encodes the specified GetSessionEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest.verify|verify} messages. + * @param message GetSessionEntityTypeRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListVersionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IGetSessionEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListVersionsResponse message from the specified reader or buffer. + * Decodes a GetSessionEntityTypeRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListVersionsResponse + * @returns GetSessionEntityTypeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ListVersionsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest; /** - * Decodes a ListVersionsResponse message from the specified reader or buffer, length delimited. + * Decodes a GetSessionEntityTypeRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListVersionsResponse + * @returns GetSessionEntityTypeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ListVersionsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest; /** - * Verifies a ListVersionsResponse message. + * Verifies a GetSessionEntityTypeRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListVersionsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetSessionEntityTypeRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListVersionsResponse + * @returns GetSessionEntityTypeRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListVersionsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest; /** - * Creates a plain object from a ListVersionsResponse message. Also converts values to other types if specified. - * @param message ListVersionsResponse + * Creates a plain object from a GetSessionEntityTypeRequest message. Also converts values to other types if specified. + * @param message GetSessionEntityTypeRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.ListVersionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListVersionsResponse to JSON. + * Converts this GetSessionEntityTypeRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetVersionRequest. */ - interface IGetVersionRequest { + /** Properties of a CreateSessionEntityTypeRequest. */ + interface ICreateSessionEntityTypeRequest { - /** GetVersionRequest name */ - name?: (string|null); + /** CreateSessionEntityTypeRequest parent */ + parent?: (string|null); + + /** CreateSessionEntityTypeRequest sessionEntityType */ + sessionEntityType?: (google.cloud.dialogflow.cx.v3.ISessionEntityType|null); } - /** Represents a GetVersionRequest. */ - class GetVersionRequest implements IGetVersionRequest { + /** Represents a CreateSessionEntityTypeRequest. */ + class CreateSessionEntityTypeRequest implements ICreateSessionEntityTypeRequest { /** - * Constructs a new GetVersionRequest. + * Constructs a new CreateSessionEntityTypeRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IGetVersionRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3.ICreateSessionEntityTypeRequest); - /** GetVersionRequest name. */ - public name: string; + /** CreateSessionEntityTypeRequest parent. */ + public parent: string; + + /** CreateSessionEntityTypeRequest sessionEntityType. */ + public sessionEntityType?: (google.cloud.dialogflow.cx.v3.ISessionEntityType|null); /** - * Creates a new GetVersionRequest instance using the specified properties. + * Creates a new CreateSessionEntityTypeRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetVersionRequest instance + * @returns CreateSessionEntityTypeRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IGetVersionRequest): google.cloud.dialogflow.cx.v3.GetVersionRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3.ICreateSessionEntityTypeRequest): google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest; /** - * Encodes the specified GetVersionRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetVersionRequest.verify|verify} messages. - * @param message GetVersionRequest message or plain object to encode + * Encodes the specified CreateSessionEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest.verify|verify} messages. + * @param message CreateSessionEntityTypeRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IGetVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.ICreateSessionEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetVersionRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetVersionRequest.verify|verify} messages. - * @param message GetVersionRequest message or plain object to encode + * Encodes the specified CreateSessionEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest.verify|verify} messages. + * @param message CreateSessionEntityTypeRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IGetVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ICreateSessionEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetVersionRequest message from the specified reader or buffer. + * Decodes a CreateSessionEntityTypeRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetVersionRequest + * @returns CreateSessionEntityTypeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.GetVersionRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest; /** - * Decodes a GetVersionRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateSessionEntityTypeRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetVersionRequest + * @returns CreateSessionEntityTypeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.GetVersionRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest; /** - * Verifies a GetVersionRequest message. + * Verifies a CreateSessionEntityTypeRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetVersionRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateSessionEntityTypeRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetVersionRequest + * @returns CreateSessionEntityTypeRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.GetVersionRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest; /** - * Creates a plain object from a GetVersionRequest message. Also converts values to other types if specified. - * @param message GetVersionRequest + * Creates a plain object from a CreateSessionEntityTypeRequest message. Also converts values to other types if specified. + * @param message CreateSessionEntityTypeRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.GetVersionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetVersionRequest to JSON. + * Converts this CreateSessionEntityTypeRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CreateVersionRequest. */ - interface ICreateVersionRequest { + /** Properties of an UpdateSessionEntityTypeRequest. */ + interface IUpdateSessionEntityTypeRequest { - /** CreateVersionRequest parent */ - parent?: (string|null); + /** UpdateSessionEntityTypeRequest sessionEntityType */ + sessionEntityType?: (google.cloud.dialogflow.cx.v3.ISessionEntityType|null); - /** CreateVersionRequest version */ - version?: (google.cloud.dialogflow.cx.v3.IVersion|null); + /** UpdateSessionEntityTypeRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); } - /** Represents a CreateVersionRequest. */ - class CreateVersionRequest implements ICreateVersionRequest { + /** Represents an UpdateSessionEntityTypeRequest. */ + class UpdateSessionEntityTypeRequest implements IUpdateSessionEntityTypeRequest { /** - * Constructs a new CreateVersionRequest. + * Constructs a new UpdateSessionEntityTypeRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.ICreateVersionRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3.IUpdateSessionEntityTypeRequest); - /** CreateVersionRequest parent. */ - public parent: string; + /** UpdateSessionEntityTypeRequest sessionEntityType. */ + public sessionEntityType?: (google.cloud.dialogflow.cx.v3.ISessionEntityType|null); - /** CreateVersionRequest version. */ - public version?: (google.cloud.dialogflow.cx.v3.IVersion|null); + /** UpdateSessionEntityTypeRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); /** - * Creates a new CreateVersionRequest instance using the specified properties. + * Creates a new UpdateSessionEntityTypeRequest instance using the specified properties. * @param [properties] Properties to set - * @returns CreateVersionRequest instance + * @returns UpdateSessionEntityTypeRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.ICreateVersionRequest): google.cloud.dialogflow.cx.v3.CreateVersionRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3.IUpdateSessionEntityTypeRequest): google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest; /** - * Encodes the specified CreateVersionRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateVersionRequest.verify|verify} messages. - * @param message CreateVersionRequest message or plain object to encode + * Encodes the specified UpdateSessionEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest.verify|verify} messages. + * @param message UpdateSessionEntityTypeRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.ICreateVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IUpdateSessionEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateVersionRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateVersionRequest.verify|verify} messages. - * @param message CreateVersionRequest message or plain object to encode + * Encodes the specified UpdateSessionEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest.verify|verify} messages. + * @param message UpdateSessionEntityTypeRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ICreateVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IUpdateSessionEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateVersionRequest message from the specified reader or buffer. + * Decodes an UpdateSessionEntityTypeRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateVersionRequest + * @returns UpdateSessionEntityTypeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.CreateVersionRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest; /** - * Decodes a CreateVersionRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateSessionEntityTypeRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateVersionRequest + * @returns UpdateSessionEntityTypeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.CreateVersionRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest; /** - * Verifies a CreateVersionRequest message. + * Verifies an UpdateSessionEntityTypeRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CreateVersionRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateSessionEntityTypeRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateVersionRequest + * @returns UpdateSessionEntityTypeRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.CreateVersionRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest; /** - * Creates a plain object from a CreateVersionRequest message. Also converts values to other types if specified. - * @param message CreateVersionRequest + * Creates a plain object from an UpdateSessionEntityTypeRequest message. Also converts values to other types if specified. + * @param message UpdateSessionEntityTypeRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.CreateVersionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateVersionRequest to JSON. + * Converts this UpdateSessionEntityTypeRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an UpdateVersionRequest. */ - interface IUpdateVersionRequest { - - /** UpdateVersionRequest version */ - version?: (google.cloud.dialogflow.cx.v3.IVersion|null); + /** Properties of a DeleteSessionEntityTypeRequest. */ + interface IDeleteSessionEntityTypeRequest { - /** UpdateVersionRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** DeleteSessionEntityTypeRequest name */ + name?: (string|null); } - /** Represents an UpdateVersionRequest. */ - class UpdateVersionRequest implements IUpdateVersionRequest { + /** Represents a DeleteSessionEntityTypeRequest. */ + class DeleteSessionEntityTypeRequest implements IDeleteSessionEntityTypeRequest { /** - * Constructs a new UpdateVersionRequest. + * Constructs a new DeleteSessionEntityTypeRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IUpdateVersionRequest); - - /** UpdateVersionRequest version. */ - public version?: (google.cloud.dialogflow.cx.v3.IVersion|null); + constructor(properties?: google.cloud.dialogflow.cx.v3.IDeleteSessionEntityTypeRequest); - /** UpdateVersionRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** DeleteSessionEntityTypeRequest name. */ + public name: string; /** - * Creates a new UpdateVersionRequest instance using the specified properties. + * Creates a new DeleteSessionEntityTypeRequest instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateVersionRequest instance + * @returns DeleteSessionEntityTypeRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IUpdateVersionRequest): google.cloud.dialogflow.cx.v3.UpdateVersionRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3.IDeleteSessionEntityTypeRequest): google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest; /** - * Encodes the specified UpdateVersionRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateVersionRequest.verify|verify} messages. - * @param message UpdateVersionRequest message or plain object to encode + * Encodes the specified DeleteSessionEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest.verify|verify} messages. + * @param message DeleteSessionEntityTypeRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IUpdateVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IDeleteSessionEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateVersionRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateVersionRequest.verify|verify} messages. - * @param message UpdateVersionRequest message or plain object to encode + * Encodes the specified DeleteSessionEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest.verify|verify} messages. + * @param message DeleteSessionEntityTypeRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IUpdateVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IDeleteSessionEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateVersionRequest message from the specified reader or buffer. + * Decodes a DeleteSessionEntityTypeRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateVersionRequest + * @returns DeleteSessionEntityTypeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.UpdateVersionRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest; /** - * Decodes an UpdateVersionRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteSessionEntityTypeRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateVersionRequest + * @returns DeleteSessionEntityTypeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.UpdateVersionRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest; /** - * Verifies an UpdateVersionRequest message. + * Verifies a DeleteSessionEntityTypeRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an UpdateVersionRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteSessionEntityTypeRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateVersionRequest + * @returns DeleteSessionEntityTypeRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.UpdateVersionRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest; /** - * Creates a plain object from an UpdateVersionRequest message. Also converts values to other types if specified. - * @param message UpdateVersionRequest + * Creates a plain object from a DeleteSessionEntityTypeRequest message. Also converts values to other types if specified. + * @param message DeleteSessionEntityTypeRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.UpdateVersionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateVersionRequest to JSON. + * Converts this DeleteSessionEntityTypeRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DeleteVersionRequest. */ - interface IDeleteVersionRequest { - - /** DeleteVersionRequest name */ - name?: (string|null); - } - - /** Represents a DeleteVersionRequest. */ - class DeleteVersionRequest implements IDeleteVersionRequest { + /** Represents a TransitionRouteGroups */ + class TransitionRouteGroups extends $protobuf.rpc.Service { /** - * Constructs a new DeleteVersionRequest. - * @param [properties] Properties to set + * Constructs a new TransitionRouteGroups service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IDeleteVersionRequest); - - /** DeleteVersionRequest name. */ - public name: string; + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); /** - * Creates a new DeleteVersionRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteVersionRequest instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IDeleteVersionRequest): google.cloud.dialogflow.cx.v3.DeleteVersionRequest; - + * Creates new TransitionRouteGroups service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): TransitionRouteGroups; + /** - * Encodes the specified DeleteVersionRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteVersionRequest.verify|verify} messages. - * @param message DeleteVersionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls ListTransitionRouteGroups. + * @param request ListTransitionRouteGroupsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListTransitionRouteGroupsResponse */ - public static encode(message: google.cloud.dialogflow.cx.v3.IDeleteVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public listTransitionRouteGroups(request: google.cloud.dialogflow.cx.v3.IListTransitionRouteGroupsRequest, callback: google.cloud.dialogflow.cx.v3.TransitionRouteGroups.ListTransitionRouteGroupsCallback): void; /** - * Encodes the specified DeleteVersionRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteVersionRequest.verify|verify} messages. - * @param message DeleteVersionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls ListTransitionRouteGroups. + * @param request ListTransitionRouteGroupsRequest message or plain object + * @returns Promise */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IDeleteVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public listTransitionRouteGroups(request: google.cloud.dialogflow.cx.v3.IListTransitionRouteGroupsRequest): Promise; /** - * Decodes a DeleteVersionRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteVersionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls GetTransitionRouteGroup. + * @param request GetTransitionRouteGroupRequest message or plain object + * @param callback Node-style callback called with the error, if any, and TransitionRouteGroup */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.DeleteVersionRequest; + public getTransitionRouteGroup(request: google.cloud.dialogflow.cx.v3.IGetTransitionRouteGroupRequest, callback: google.cloud.dialogflow.cx.v3.TransitionRouteGroups.GetTransitionRouteGroupCallback): void; /** - * Decodes a DeleteVersionRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteVersionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls GetTransitionRouteGroup. + * @param request GetTransitionRouteGroupRequest message or plain object + * @returns Promise */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.DeleteVersionRequest; + public getTransitionRouteGroup(request: google.cloud.dialogflow.cx.v3.IGetTransitionRouteGroupRequest): Promise; /** - * Verifies a DeleteVersionRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls CreateTransitionRouteGroup. + * @param request CreateTransitionRouteGroupRequest message or plain object + * @param callback Node-style callback called with the error, if any, and TransitionRouteGroup */ - public static verify(message: { [k: string]: any }): (string|null); + public createTransitionRouteGroup(request: google.cloud.dialogflow.cx.v3.ICreateTransitionRouteGroupRequest, callback: google.cloud.dialogflow.cx.v3.TransitionRouteGroups.CreateTransitionRouteGroupCallback): void; /** - * Creates a DeleteVersionRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteVersionRequest + * Calls CreateTransitionRouteGroup. + * @param request CreateTransitionRouteGroupRequest message or plain object + * @returns Promise */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.DeleteVersionRequest; + public createTransitionRouteGroup(request: google.cloud.dialogflow.cx.v3.ICreateTransitionRouteGroupRequest): Promise; /** - * Creates a plain object from a DeleteVersionRequest message. Also converts values to other types if specified. - * @param message DeleteVersionRequest - * @param [options] Conversion options - * @returns Plain object + * Calls UpdateTransitionRouteGroup. + * @param request UpdateTransitionRouteGroupRequest message or plain object + * @param callback Node-style callback called with the error, if any, and TransitionRouteGroup */ - public static toObject(message: google.cloud.dialogflow.cx.v3.DeleteVersionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public updateTransitionRouteGroup(request: google.cloud.dialogflow.cx.v3.IUpdateTransitionRouteGroupRequest, callback: google.cloud.dialogflow.cx.v3.TransitionRouteGroups.UpdateTransitionRouteGroupCallback): void; /** - * Converts this DeleteVersionRequest to JSON. - * @returns JSON object + * Calls UpdateTransitionRouteGroup. + * @param request UpdateTransitionRouteGroupRequest message or plain object + * @returns Promise */ - public toJSON(): { [k: string]: any }; + public updateTransitionRouteGroup(request: google.cloud.dialogflow.cx.v3.IUpdateTransitionRouteGroupRequest): Promise; + + /** + * Calls DeleteTransitionRouteGroup. + * @param request DeleteTransitionRouteGroupRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteTransitionRouteGroup(request: google.cloud.dialogflow.cx.v3.IDeleteTransitionRouteGroupRequest, callback: google.cloud.dialogflow.cx.v3.TransitionRouteGroups.DeleteTransitionRouteGroupCallback): void; + + /** + * Calls DeleteTransitionRouteGroup. + * @param request DeleteTransitionRouteGroupRequest message or plain object + * @returns Promise + */ + public deleteTransitionRouteGroup(request: google.cloud.dialogflow.cx.v3.IDeleteTransitionRouteGroupRequest): Promise; } - /** Properties of a LoadVersionRequest. */ - interface ILoadVersionRequest { + namespace TransitionRouteGroups { - /** LoadVersionRequest name */ + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.TransitionRouteGroups#listTransitionRouteGroups}. + * @param error Error, if any + * @param [response] ListTransitionRouteGroupsResponse + */ + type ListTransitionRouteGroupsCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.TransitionRouteGroups#getTransitionRouteGroup}. + * @param error Error, if any + * @param [response] TransitionRouteGroup + */ + type GetTransitionRouteGroupCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.TransitionRouteGroup) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.TransitionRouteGroups#createTransitionRouteGroup}. + * @param error Error, if any + * @param [response] TransitionRouteGroup + */ + type CreateTransitionRouteGroupCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.TransitionRouteGroup) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.TransitionRouteGroups#updateTransitionRouteGroup}. + * @param error Error, if any + * @param [response] TransitionRouteGroup + */ + type UpdateTransitionRouteGroupCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.TransitionRouteGroup) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.TransitionRouteGroups#deleteTransitionRouteGroup}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteTransitionRouteGroupCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + } + + /** Properties of a TransitionRouteGroup. */ + interface ITransitionRouteGroup { + + /** TransitionRouteGroup name */ name?: (string|null); - /** LoadVersionRequest allowOverrideAgentResources */ - allowOverrideAgentResources?: (boolean|null); + /** TransitionRouteGroup displayName */ + displayName?: (string|null); + + /** TransitionRouteGroup transitionRoutes */ + transitionRoutes?: (google.cloud.dialogflow.cx.v3.ITransitionRoute[]|null); } - /** Represents a LoadVersionRequest. */ - class LoadVersionRequest implements ILoadVersionRequest { + /** Represents a TransitionRouteGroup. */ + class TransitionRouteGroup implements ITransitionRouteGroup { /** - * Constructs a new LoadVersionRequest. + * Constructs a new TransitionRouteGroup. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.ILoadVersionRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3.ITransitionRouteGroup); - /** LoadVersionRequest name. */ + /** TransitionRouteGroup name. */ public name: string; - /** LoadVersionRequest allowOverrideAgentResources. */ - public allowOverrideAgentResources: boolean; + /** TransitionRouteGroup displayName. */ + public displayName: string; + + /** TransitionRouteGroup transitionRoutes. */ + public transitionRoutes: google.cloud.dialogflow.cx.v3.ITransitionRoute[]; /** - * Creates a new LoadVersionRequest instance using the specified properties. + * Creates a new TransitionRouteGroup instance using the specified properties. * @param [properties] Properties to set - * @returns LoadVersionRequest instance + * @returns TransitionRouteGroup instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.ILoadVersionRequest): google.cloud.dialogflow.cx.v3.LoadVersionRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3.ITransitionRouteGroup): google.cloud.dialogflow.cx.v3.TransitionRouteGroup; /** - * Encodes the specified LoadVersionRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.LoadVersionRequest.verify|verify} messages. - * @param message LoadVersionRequest message or plain object to encode + * Encodes the specified TransitionRouteGroup message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TransitionRouteGroup.verify|verify} messages. + * @param message TransitionRouteGroup message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.ILoadVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.ITransitionRouteGroup, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified LoadVersionRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.LoadVersionRequest.verify|verify} messages. - * @param message LoadVersionRequest message or plain object to encode + * Encodes the specified TransitionRouteGroup message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TransitionRouteGroup.verify|verify} messages. + * @param message TransitionRouteGroup message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ILoadVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ITransitionRouteGroup, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a LoadVersionRequest message from the specified reader or buffer. + * Decodes a TransitionRouteGroup message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns LoadVersionRequest + * @returns TransitionRouteGroup * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.LoadVersionRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.TransitionRouteGroup; /** - * Decodes a LoadVersionRequest message from the specified reader or buffer, length delimited. + * Decodes a TransitionRouteGroup message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns LoadVersionRequest + * @returns TransitionRouteGroup * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.LoadVersionRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.TransitionRouteGroup; /** - * Verifies a LoadVersionRequest message. + * Verifies a TransitionRouteGroup message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a LoadVersionRequest message from a plain object. Also converts values to their respective internal types. + * Creates a TransitionRouteGroup message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns LoadVersionRequest + * @returns TransitionRouteGroup */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.LoadVersionRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.TransitionRouteGroup; /** - * Creates a plain object from a LoadVersionRequest message. Also converts values to other types if specified. - * @param message LoadVersionRequest + * Creates a plain object from a TransitionRouteGroup message. Also converts values to other types if specified. + * @param message TransitionRouteGroup * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.LoadVersionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.TransitionRouteGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this LoadVersionRequest to JSON. + * Converts this TransitionRouteGroup to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Represents a Webhooks */ - class Webhooks extends $protobuf.rpc.Service { + /** Properties of a ListTransitionRouteGroupsRequest. */ + interface IListTransitionRouteGroupsRequest { - /** - * Constructs a new Webhooks service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + /** ListTransitionRouteGroupsRequest parent */ + parent?: (string|null); - /** - * Creates new Webhooks service using the specified rpc implementation. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - * @returns RPC service. Useful where requests and/or responses are streamed. - */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Webhooks; + /** ListTransitionRouteGroupsRequest pageSize */ + pageSize?: (number|null); - /** - * Calls ListWebhooks. - * @param request ListWebhooksRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListWebhooksResponse - */ - public listWebhooks(request: google.cloud.dialogflow.cx.v3.IListWebhooksRequest, callback: google.cloud.dialogflow.cx.v3.Webhooks.ListWebhooksCallback): void; + /** ListTransitionRouteGroupsRequest pageToken */ + pageToken?: (string|null); - /** - * Calls ListWebhooks. - * @param request ListWebhooksRequest message or plain object - * @returns Promise - */ - public listWebhooks(request: google.cloud.dialogflow.cx.v3.IListWebhooksRequest): Promise; + /** ListTransitionRouteGroupsRequest languageCode */ + languageCode?: (string|null); + } - /** - * Calls GetWebhook. - * @param request GetWebhookRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Webhook - */ - public getWebhook(request: google.cloud.dialogflow.cx.v3.IGetWebhookRequest, callback: google.cloud.dialogflow.cx.v3.Webhooks.GetWebhookCallback): void; + /** Represents a ListTransitionRouteGroupsRequest. */ + class ListTransitionRouteGroupsRequest implements IListTransitionRouteGroupsRequest { /** - * Calls GetWebhook. - * @param request GetWebhookRequest message or plain object - * @returns Promise + * Constructs a new ListTransitionRouteGroupsRequest. + * @param [properties] Properties to set */ - public getWebhook(request: google.cloud.dialogflow.cx.v3.IGetWebhookRequest): Promise; + constructor(properties?: google.cloud.dialogflow.cx.v3.IListTransitionRouteGroupsRequest); - /** - * Calls CreateWebhook. - * @param request CreateWebhookRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Webhook - */ - public createWebhook(request: google.cloud.dialogflow.cx.v3.ICreateWebhookRequest, callback: google.cloud.dialogflow.cx.v3.Webhooks.CreateWebhookCallback): void; + /** ListTransitionRouteGroupsRequest parent. */ + public parent: string; - /** - * Calls CreateWebhook. - * @param request CreateWebhookRequest message or plain object - * @returns Promise - */ - public createWebhook(request: google.cloud.dialogflow.cx.v3.ICreateWebhookRequest): Promise; + /** ListTransitionRouteGroupsRequest pageSize. */ + public pageSize: number; + + /** ListTransitionRouteGroupsRequest pageToken. */ + public pageToken: string; + + /** ListTransitionRouteGroupsRequest languageCode. */ + public languageCode: string; /** - * Calls UpdateWebhook. - * @param request UpdateWebhookRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Webhook + * Creates a new ListTransitionRouteGroupsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListTransitionRouteGroupsRequest instance */ - public updateWebhook(request: google.cloud.dialogflow.cx.v3.IUpdateWebhookRequest, callback: google.cloud.dialogflow.cx.v3.Webhooks.UpdateWebhookCallback): void; + public static create(properties?: google.cloud.dialogflow.cx.v3.IListTransitionRouteGroupsRequest): google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest; /** - * Calls UpdateWebhook. - * @param request UpdateWebhookRequest message or plain object - * @returns Promise + * Encodes the specified ListTransitionRouteGroupsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest.verify|verify} messages. + * @param message ListTransitionRouteGroupsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public updateWebhook(request: google.cloud.dialogflow.cx.v3.IUpdateWebhookRequest): Promise; + public static encode(message: google.cloud.dialogflow.cx.v3.IListTransitionRouteGroupsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls DeleteWebhook. - * @param request DeleteWebhookRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty + * Encodes the specified ListTransitionRouteGroupsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest.verify|verify} messages. + * @param message ListTransitionRouteGroupsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public deleteWebhook(request: google.cloud.dialogflow.cx.v3.IDeleteWebhookRequest, callback: google.cloud.dialogflow.cx.v3.Webhooks.DeleteWebhookCallback): void; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListTransitionRouteGroupsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls DeleteWebhook. - * @param request DeleteWebhookRequest message or plain object - * @returns Promise + * Decodes a ListTransitionRouteGroupsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListTransitionRouteGroupsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public deleteWebhook(request: google.cloud.dialogflow.cx.v3.IDeleteWebhookRequest): Promise; - } - - namespace Webhooks { + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Webhooks#listWebhooks}. - * @param error Error, if any - * @param [response] ListWebhooksResponse + * Decodes a ListTransitionRouteGroupsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListTransitionRouteGroupsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type ListWebhooksCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.ListWebhooksResponse) => void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Webhooks#getWebhook}. - * @param error Error, if any - * @param [response] Webhook + * Verifies a ListTransitionRouteGroupsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - type GetWebhookCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.Webhook) => void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Webhooks#createWebhook}. - * @param error Error, if any - * @param [response] Webhook + * Creates a ListTransitionRouteGroupsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListTransitionRouteGroupsRequest */ - type CreateWebhookCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.Webhook) => void; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Webhooks#updateWebhook}. - * @param error Error, if any - * @param [response] Webhook + * Creates a plain object from a ListTransitionRouteGroupsRequest message. Also converts values to other types if specified. + * @param message ListTransitionRouteGroupsRequest + * @param [options] Conversion options + * @returns Plain object */ - type UpdateWebhookCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.Webhook) => void; + public static toObject(message: google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Webhooks#deleteWebhook}. - * @param error Error, if any - * @param [response] Empty + * Converts this ListTransitionRouteGroupsRequest to JSON. + * @returns JSON object */ - type DeleteWebhookCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + public toJSON(): { [k: string]: any }; } - /** Properties of a Webhook. */ - interface IWebhook { - - /** Webhook name */ - name?: (string|null); - - /** Webhook displayName */ - displayName?: (string|null); - - /** Webhook genericWebService */ - genericWebService?: (google.cloud.dialogflow.cx.v3.Webhook.IGenericWebService|null); + /** Properties of a ListTransitionRouteGroupsResponse. */ + interface IListTransitionRouteGroupsResponse { - /** Webhook timeout */ - timeout?: (google.protobuf.IDuration|null); + /** ListTransitionRouteGroupsResponse transitionRouteGroups */ + transitionRouteGroups?: (google.cloud.dialogflow.cx.v3.ITransitionRouteGroup[]|null); - /** Webhook disabled */ - disabled?: (boolean|null); + /** ListTransitionRouteGroupsResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a Webhook. */ - class Webhook implements IWebhook { + /** Represents a ListTransitionRouteGroupsResponse. */ + class ListTransitionRouteGroupsResponse implements IListTransitionRouteGroupsResponse { /** - * Constructs a new Webhook. + * Constructs a new ListTransitionRouteGroupsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IWebhook); - - /** Webhook name. */ - public name: string; - - /** Webhook displayName. */ - public displayName: string; - - /** Webhook genericWebService. */ - public genericWebService?: (google.cloud.dialogflow.cx.v3.Webhook.IGenericWebService|null); - - /** Webhook timeout. */ - public timeout?: (google.protobuf.IDuration|null); + constructor(properties?: google.cloud.dialogflow.cx.v3.IListTransitionRouteGroupsResponse); - /** Webhook disabled. */ - public disabled: boolean; + /** ListTransitionRouteGroupsResponse transitionRouteGroups. */ + public transitionRouteGroups: google.cloud.dialogflow.cx.v3.ITransitionRouteGroup[]; - /** Webhook webhook. */ - public webhook?: "genericWebService"; + /** ListTransitionRouteGroupsResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new Webhook instance using the specified properties. + * Creates a new ListTransitionRouteGroupsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns Webhook instance + * @returns ListTransitionRouteGroupsResponse instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IWebhook): google.cloud.dialogflow.cx.v3.Webhook; + public static create(properties?: google.cloud.dialogflow.cx.v3.IListTransitionRouteGroupsResponse): google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse; /** - * Encodes the specified Webhook message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Webhook.verify|verify} messages. - * @param message Webhook message or plain object to encode + * Encodes the specified ListTransitionRouteGroupsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse.verify|verify} messages. + * @param message ListTransitionRouteGroupsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IWebhook, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IListTransitionRouteGroupsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Webhook message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Webhook.verify|verify} messages. - * @param message Webhook message or plain object to encode + * Encodes the specified ListTransitionRouteGroupsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse.verify|verify} messages. + * @param message ListTransitionRouteGroupsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IWebhook, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListTransitionRouteGroupsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Webhook message from the specified reader or buffer. + * Decodes a ListTransitionRouteGroupsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Webhook + * @returns ListTransitionRouteGroupsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.Webhook; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse; /** - * Decodes a Webhook message from the specified reader or buffer, length delimited. + * Decodes a ListTransitionRouteGroupsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Webhook + * @returns ListTransitionRouteGroupsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.Webhook; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse; /** - * Verifies a Webhook message. + * Verifies a ListTransitionRouteGroupsResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Webhook message from a plain object. Also converts values to their respective internal types. + * Creates a ListTransitionRouteGroupsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Webhook + * @returns ListTransitionRouteGroupsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Webhook; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse; /** - * Creates a plain object from a Webhook message. Also converts values to other types if specified. - * @param message Webhook + * Creates a plain object from a ListTransitionRouteGroupsResponse message. Also converts values to other types if specified. + * @param message ListTransitionRouteGroupsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.Webhook, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Webhook to JSON. + * Converts this ListTransitionRouteGroupsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace Webhook { - - /** Properties of a GenericWebService. */ - interface IGenericWebService { - - /** GenericWebService uri */ - uri?: (string|null); + /** Properties of a GetTransitionRouteGroupRequest. */ + interface IGetTransitionRouteGroupRequest { - /** GenericWebService username */ - username?: (string|null); + /** GetTransitionRouteGroupRequest name */ + name?: (string|null); - /** GenericWebService password */ - password?: (string|null); + /** GetTransitionRouteGroupRequest languageCode */ + languageCode?: (string|null); + } - /** GenericWebService requestHeaders */ - requestHeaders?: ({ [k: string]: string }|null); - } + /** Represents a GetTransitionRouteGroupRequest. */ + class GetTransitionRouteGroupRequest implements IGetTransitionRouteGroupRequest { - /** Represents a GenericWebService. */ - class GenericWebService implements IGenericWebService { + /** + * Constructs a new GetTransitionRouteGroupRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.IGetTransitionRouteGroupRequest); - /** - * Constructs a new GenericWebService. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3.Webhook.IGenericWebService); + /** GetTransitionRouteGroupRequest name. */ + public name: string; - /** GenericWebService uri. */ - public uri: string; + /** GetTransitionRouteGroupRequest languageCode. */ + public languageCode: string; - /** GenericWebService username. */ - public username: string; - - /** GenericWebService password. */ - public password: string; - - /** GenericWebService requestHeaders. */ - public requestHeaders: { [k: string]: string }; - - /** - * Creates a new GenericWebService instance using the specified properties. - * @param [properties] Properties to set - * @returns GenericWebService instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3.Webhook.IGenericWebService): google.cloud.dialogflow.cx.v3.Webhook.GenericWebService; - - /** - * Encodes the specified GenericWebService message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.verify|verify} messages. - * @param message GenericWebService message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.cx.v3.Webhook.IGenericWebService, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GenericWebService message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.verify|verify} messages. - * @param message GenericWebService message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.Webhook.IGenericWebService, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GenericWebService message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GenericWebService - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.Webhook.GenericWebService; - - /** - * Decodes a GenericWebService message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GenericWebService - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.Webhook.GenericWebService; - - /** - * Verifies a GenericWebService message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GenericWebService message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GenericWebService - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Webhook.GenericWebService; - - /** - * Creates a plain object from a GenericWebService message. Also converts values to other types if specified. - * @param message GenericWebService - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.cx.v3.Webhook.GenericWebService, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GenericWebService to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - - /** Properties of a ListWebhooksRequest. */ - interface IListWebhooksRequest { - - /** ListWebhooksRequest parent */ - parent?: (string|null); - - /** ListWebhooksRequest pageSize */ - pageSize?: (number|null); - - /** ListWebhooksRequest pageToken */ - pageToken?: (string|null); - } - - /** Represents a ListWebhooksRequest. */ - class ListWebhooksRequest implements IListWebhooksRequest { - - /** - * Constructs a new ListWebhooksRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IListWebhooksRequest); - - /** ListWebhooksRequest parent. */ - public parent: string; - - /** ListWebhooksRequest pageSize. */ - public pageSize: number; - - /** ListWebhooksRequest pageToken. */ - public pageToken: string; - - /** - * Creates a new ListWebhooksRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListWebhooksRequest instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IListWebhooksRequest): google.cloud.dialogflow.cx.v3.ListWebhooksRequest; + /** + * Creates a new GetTransitionRouteGroupRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetTransitionRouteGroupRequest instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.IGetTransitionRouteGroupRequest): google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest; /** - * Encodes the specified ListWebhooksRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListWebhooksRequest.verify|verify} messages. - * @param message ListWebhooksRequest message or plain object to encode + * Encodes the specified GetTransitionRouteGroupRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest.verify|verify} messages. + * @param message GetTransitionRouteGroupRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IListWebhooksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IGetTransitionRouteGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListWebhooksRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListWebhooksRequest.verify|verify} messages. - * @param message ListWebhooksRequest message or plain object to encode + * Encodes the specified GetTransitionRouteGroupRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest.verify|verify} messages. + * @param message GetTransitionRouteGroupRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListWebhooksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IGetTransitionRouteGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListWebhooksRequest message from the specified reader or buffer. + * Decodes a GetTransitionRouteGroupRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListWebhooksRequest + * @returns GetTransitionRouteGroupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ListWebhooksRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest; /** - * Decodes a ListWebhooksRequest message from the specified reader or buffer, length delimited. + * Decodes a GetTransitionRouteGroupRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListWebhooksRequest + * @returns GetTransitionRouteGroupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ListWebhooksRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest; /** - * Verifies a ListWebhooksRequest message. + * Verifies a GetTransitionRouteGroupRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListWebhooksRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetTransitionRouteGroupRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListWebhooksRequest + * @returns GetTransitionRouteGroupRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListWebhooksRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest; /** - * Creates a plain object from a ListWebhooksRequest message. Also converts values to other types if specified. - * @param message ListWebhooksRequest + * Creates a plain object from a GetTransitionRouteGroupRequest message. Also converts values to other types if specified. + * @param message GetTransitionRouteGroupRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.ListWebhooksRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListWebhooksRequest to JSON. + * Converts this GetTransitionRouteGroupRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListWebhooksResponse. */ - interface IListWebhooksResponse { + /** Properties of a CreateTransitionRouteGroupRequest. */ + interface ICreateTransitionRouteGroupRequest { - /** ListWebhooksResponse webhooks */ - webhooks?: (google.cloud.dialogflow.cx.v3.IWebhook[]|null); + /** CreateTransitionRouteGroupRequest parent */ + parent?: (string|null); - /** ListWebhooksResponse nextPageToken */ - nextPageToken?: (string|null); + /** CreateTransitionRouteGroupRequest transitionRouteGroup */ + transitionRouteGroup?: (google.cloud.dialogflow.cx.v3.ITransitionRouteGroup|null); + + /** CreateTransitionRouteGroupRequest languageCode */ + languageCode?: (string|null); } - /** Represents a ListWebhooksResponse. */ - class ListWebhooksResponse implements IListWebhooksResponse { + /** Represents a CreateTransitionRouteGroupRequest. */ + class CreateTransitionRouteGroupRequest implements ICreateTransitionRouteGroupRequest { /** - * Constructs a new ListWebhooksResponse. + * Constructs a new CreateTransitionRouteGroupRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IListWebhooksResponse); + constructor(properties?: google.cloud.dialogflow.cx.v3.ICreateTransitionRouteGroupRequest); - /** ListWebhooksResponse webhooks. */ - public webhooks: google.cloud.dialogflow.cx.v3.IWebhook[]; + /** CreateTransitionRouteGroupRequest parent. */ + public parent: string; - /** ListWebhooksResponse nextPageToken. */ - public nextPageToken: string; + /** CreateTransitionRouteGroupRequest transitionRouteGroup. */ + public transitionRouteGroup?: (google.cloud.dialogflow.cx.v3.ITransitionRouteGroup|null); + + /** CreateTransitionRouteGroupRequest languageCode. */ + public languageCode: string; /** - * Creates a new ListWebhooksResponse instance using the specified properties. + * Creates a new CreateTransitionRouteGroupRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListWebhooksResponse instance + * @returns CreateTransitionRouteGroupRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IListWebhooksResponse): google.cloud.dialogflow.cx.v3.ListWebhooksResponse; + public static create(properties?: google.cloud.dialogflow.cx.v3.ICreateTransitionRouteGroupRequest): google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest; /** - * Encodes the specified ListWebhooksResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListWebhooksResponse.verify|verify} messages. - * @param message ListWebhooksResponse message or plain object to encode + * Encodes the specified CreateTransitionRouteGroupRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest.verify|verify} messages. + * @param message CreateTransitionRouteGroupRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IListWebhooksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.ICreateTransitionRouteGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListWebhooksResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListWebhooksResponse.verify|verify} messages. - * @param message ListWebhooksResponse message or plain object to encode + * Encodes the specified CreateTransitionRouteGroupRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest.verify|verify} messages. + * @param message CreateTransitionRouteGroupRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListWebhooksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ICreateTransitionRouteGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListWebhooksResponse message from the specified reader or buffer. + * Decodes a CreateTransitionRouteGroupRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListWebhooksResponse + * @returns CreateTransitionRouteGroupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ListWebhooksResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest; /** - * Decodes a ListWebhooksResponse message from the specified reader or buffer, length delimited. + * Decodes a CreateTransitionRouteGroupRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListWebhooksResponse + * @returns CreateTransitionRouteGroupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ListWebhooksResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest; /** - * Verifies a ListWebhooksResponse message. + * Verifies a CreateTransitionRouteGroupRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListWebhooksResponse message from a plain object. Also converts values to their respective internal types. + * Creates a CreateTransitionRouteGroupRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListWebhooksResponse + * @returns CreateTransitionRouteGroupRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListWebhooksResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest; /** - * Creates a plain object from a ListWebhooksResponse message. Also converts values to other types if specified. - * @param message ListWebhooksResponse + * Creates a plain object from a CreateTransitionRouteGroupRequest message. Also converts values to other types if specified. + * @param message CreateTransitionRouteGroupRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.ListWebhooksResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListWebhooksResponse to JSON. + * Converts this CreateTransitionRouteGroupRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetWebhookRequest. */ - interface IGetWebhookRequest { + /** Properties of an UpdateTransitionRouteGroupRequest. */ + interface IUpdateTransitionRouteGroupRequest { - /** GetWebhookRequest name */ - name?: (string|null); + /** UpdateTransitionRouteGroupRequest transitionRouteGroup */ + transitionRouteGroup?: (google.cloud.dialogflow.cx.v3.ITransitionRouteGroup|null); + + /** UpdateTransitionRouteGroupRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateTransitionRouteGroupRequest languageCode */ + languageCode?: (string|null); } - /** Represents a GetWebhookRequest. */ - class GetWebhookRequest implements IGetWebhookRequest { + /** Represents an UpdateTransitionRouteGroupRequest. */ + class UpdateTransitionRouteGroupRequest implements IUpdateTransitionRouteGroupRequest { /** - * Constructs a new GetWebhookRequest. + * Constructs a new UpdateTransitionRouteGroupRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IGetWebhookRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3.IUpdateTransitionRouteGroupRequest); - /** GetWebhookRequest name. */ - public name: string; + /** UpdateTransitionRouteGroupRequest transitionRouteGroup. */ + public transitionRouteGroup?: (google.cloud.dialogflow.cx.v3.ITransitionRouteGroup|null); + + /** UpdateTransitionRouteGroupRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateTransitionRouteGroupRequest languageCode. */ + public languageCode: string; /** - * Creates a new GetWebhookRequest instance using the specified properties. + * Creates a new UpdateTransitionRouteGroupRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetWebhookRequest instance + * @returns UpdateTransitionRouteGroupRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IGetWebhookRequest): google.cloud.dialogflow.cx.v3.GetWebhookRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3.IUpdateTransitionRouteGroupRequest): google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest; /** - * Encodes the specified GetWebhookRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetWebhookRequest.verify|verify} messages. - * @param message GetWebhookRequest message or plain object to encode + * Encodes the specified UpdateTransitionRouteGroupRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest.verify|verify} messages. + * @param message UpdateTransitionRouteGroupRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IGetWebhookRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IUpdateTransitionRouteGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetWebhookRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetWebhookRequest.verify|verify} messages. - * @param message GetWebhookRequest message or plain object to encode + * Encodes the specified UpdateTransitionRouteGroupRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest.verify|verify} messages. + * @param message UpdateTransitionRouteGroupRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IGetWebhookRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IUpdateTransitionRouteGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetWebhookRequest message from the specified reader or buffer. + * Decodes an UpdateTransitionRouteGroupRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetWebhookRequest + * @returns UpdateTransitionRouteGroupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.GetWebhookRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest; /** - * Decodes a GetWebhookRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateTransitionRouteGroupRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetWebhookRequest + * @returns UpdateTransitionRouteGroupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.GetWebhookRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest; /** - * Verifies a GetWebhookRequest message. + * Verifies an UpdateTransitionRouteGroupRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetWebhookRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateTransitionRouteGroupRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetWebhookRequest + * @returns UpdateTransitionRouteGroupRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.GetWebhookRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest; /** - * Creates a plain object from a GetWebhookRequest message. Also converts values to other types if specified. - * @param message GetWebhookRequest + * Creates a plain object from an UpdateTransitionRouteGroupRequest message. Also converts values to other types if specified. + * @param message UpdateTransitionRouteGroupRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.GetWebhookRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetWebhookRequest to JSON. + * Converts this UpdateTransitionRouteGroupRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CreateWebhookRequest. */ - interface ICreateWebhookRequest { + /** Properties of a DeleteTransitionRouteGroupRequest. */ + interface IDeleteTransitionRouteGroupRequest { - /** CreateWebhookRequest parent */ - parent?: (string|null); + /** DeleteTransitionRouteGroupRequest name */ + name?: (string|null); - /** CreateWebhookRequest webhook */ - webhook?: (google.cloud.dialogflow.cx.v3.IWebhook|null); + /** DeleteTransitionRouteGroupRequest force */ + force?: (boolean|null); } - /** Represents a CreateWebhookRequest. */ - class CreateWebhookRequest implements ICreateWebhookRequest { + /** Represents a DeleteTransitionRouteGroupRequest. */ + class DeleteTransitionRouteGroupRequest implements IDeleteTransitionRouteGroupRequest { /** - * Constructs a new CreateWebhookRequest. + * Constructs a new DeleteTransitionRouteGroupRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.ICreateWebhookRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3.IDeleteTransitionRouteGroupRequest); - /** CreateWebhookRequest parent. */ - public parent: string; + /** DeleteTransitionRouteGroupRequest name. */ + public name: string; - /** CreateWebhookRequest webhook. */ - public webhook?: (google.cloud.dialogflow.cx.v3.IWebhook|null); + /** DeleteTransitionRouteGroupRequest force. */ + public force: boolean; /** - * Creates a new CreateWebhookRequest instance using the specified properties. + * Creates a new DeleteTransitionRouteGroupRequest instance using the specified properties. * @param [properties] Properties to set - * @returns CreateWebhookRequest instance + * @returns DeleteTransitionRouteGroupRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.ICreateWebhookRequest): google.cloud.dialogflow.cx.v3.CreateWebhookRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3.IDeleteTransitionRouteGroupRequest): google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest; /** - * Encodes the specified CreateWebhookRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateWebhookRequest.verify|verify} messages. - * @param message CreateWebhookRequest message or plain object to encode + * Encodes the specified DeleteTransitionRouteGroupRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest.verify|verify} messages. + * @param message DeleteTransitionRouteGroupRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.ICreateWebhookRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IDeleteTransitionRouteGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateWebhookRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateWebhookRequest.verify|verify} messages. - * @param message CreateWebhookRequest message or plain object to encode + * Encodes the specified DeleteTransitionRouteGroupRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest.verify|verify} messages. + * @param message DeleteTransitionRouteGroupRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ICreateWebhookRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IDeleteTransitionRouteGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateWebhookRequest message from the specified reader or buffer. + * Decodes a DeleteTransitionRouteGroupRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateWebhookRequest + * @returns DeleteTransitionRouteGroupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.CreateWebhookRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest; /** - * Decodes a CreateWebhookRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteTransitionRouteGroupRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateWebhookRequest + * @returns DeleteTransitionRouteGroupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.CreateWebhookRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest; /** - * Verifies a CreateWebhookRequest message. + * Verifies a DeleteTransitionRouteGroupRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CreateWebhookRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteTransitionRouteGroupRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateWebhookRequest + * @returns DeleteTransitionRouteGroupRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.CreateWebhookRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest; /** - * Creates a plain object from a CreateWebhookRequest message. Also converts values to other types if specified. - * @param message CreateWebhookRequest + * Creates a plain object from a DeleteTransitionRouteGroupRequest message. Also converts values to other types if specified. + * @param message DeleteTransitionRouteGroupRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.CreateWebhookRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateWebhookRequest to JSON. + * Converts this DeleteTransitionRouteGroupRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an UpdateWebhookRequest. */ - interface IUpdateWebhookRequest { - - /** UpdateWebhookRequest webhook */ - webhook?: (google.cloud.dialogflow.cx.v3.IWebhook|null); - - /** UpdateWebhookRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - } + /** Represents a Versions */ + class Versions extends $protobuf.rpc.Service { - /** Represents an UpdateWebhookRequest. */ - class UpdateWebhookRequest implements IUpdateWebhookRequest { + /** + * Constructs a new Versions service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); /** - * Constructs a new UpdateWebhookRequest. - * @param [properties] Properties to set + * Creates new Versions service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IUpdateWebhookRequest); + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Versions; - /** UpdateWebhookRequest webhook. */ - public webhook?: (google.cloud.dialogflow.cx.v3.IWebhook|null); + /** + * Calls ListVersions. + * @param request ListVersionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListVersionsResponse + */ + public listVersions(request: google.cloud.dialogflow.cx.v3.IListVersionsRequest, callback: google.cloud.dialogflow.cx.v3.Versions.ListVersionsCallback): void; - /** UpdateWebhookRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** + * Calls ListVersions. + * @param request ListVersionsRequest message or plain object + * @returns Promise + */ + public listVersions(request: google.cloud.dialogflow.cx.v3.IListVersionsRequest): Promise; /** - * Creates a new UpdateWebhookRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateWebhookRequest instance + * Calls GetVersion. + * @param request GetVersionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Version */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IUpdateWebhookRequest): google.cloud.dialogflow.cx.v3.UpdateWebhookRequest; + public getVersion(request: google.cloud.dialogflow.cx.v3.IGetVersionRequest, callback: google.cloud.dialogflow.cx.v3.Versions.GetVersionCallback): void; /** - * Encodes the specified UpdateWebhookRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateWebhookRequest.verify|verify} messages. - * @param message UpdateWebhookRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls GetVersion. + * @param request GetVersionRequest message or plain object + * @returns Promise */ - public static encode(message: google.cloud.dialogflow.cx.v3.IUpdateWebhookRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public getVersion(request: google.cloud.dialogflow.cx.v3.IGetVersionRequest): Promise; /** - * Encodes the specified UpdateWebhookRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateWebhookRequest.verify|verify} messages. - * @param message UpdateWebhookRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls CreateVersion. + * @param request CreateVersionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IUpdateWebhookRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public createVersion(request: google.cloud.dialogflow.cx.v3.ICreateVersionRequest, callback: google.cloud.dialogflow.cx.v3.Versions.CreateVersionCallback): void; /** - * Decodes an UpdateWebhookRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateWebhookRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls CreateVersion. + * @param request CreateVersionRequest message or plain object + * @returns Promise */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.UpdateWebhookRequest; + public createVersion(request: google.cloud.dialogflow.cx.v3.ICreateVersionRequest): Promise; /** - * Decodes an UpdateWebhookRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateWebhookRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls UpdateVersion. + * @param request UpdateVersionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Version */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.UpdateWebhookRequest; + public updateVersion(request: google.cloud.dialogflow.cx.v3.IUpdateVersionRequest, callback: google.cloud.dialogflow.cx.v3.Versions.UpdateVersionCallback): void; /** - * Verifies an UpdateWebhookRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls UpdateVersion. + * @param request UpdateVersionRequest message or plain object + * @returns Promise */ - public static verify(message: { [k: string]: any }): (string|null); + public updateVersion(request: google.cloud.dialogflow.cx.v3.IUpdateVersionRequest): Promise; /** - * Creates an UpdateWebhookRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateWebhookRequest + * Calls DeleteVersion. + * @param request DeleteVersionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.UpdateWebhookRequest; + public deleteVersion(request: google.cloud.dialogflow.cx.v3.IDeleteVersionRequest, callback: google.cloud.dialogflow.cx.v3.Versions.DeleteVersionCallback): void; /** - * Creates a plain object from an UpdateWebhookRequest message. Also converts values to other types if specified. - * @param message UpdateWebhookRequest - * @param [options] Conversion options - * @returns Plain object + * Calls DeleteVersion. + * @param request DeleteVersionRequest message or plain object + * @returns Promise */ - public static toObject(message: google.cloud.dialogflow.cx.v3.UpdateWebhookRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public deleteVersion(request: google.cloud.dialogflow.cx.v3.IDeleteVersionRequest): Promise; /** - * Converts this UpdateWebhookRequest to JSON. - * @returns JSON object + * Calls LoadVersion. + * @param request LoadVersionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - public toJSON(): { [k: string]: any }; - } + public loadVersion(request: google.cloud.dialogflow.cx.v3.ILoadVersionRequest, callback: google.cloud.dialogflow.cx.v3.Versions.LoadVersionCallback): void; - /** Properties of a DeleteWebhookRequest. */ - interface IDeleteWebhookRequest { + /** + * Calls LoadVersion. + * @param request LoadVersionRequest message or plain object + * @returns Promise + */ + public loadVersion(request: google.cloud.dialogflow.cx.v3.ILoadVersionRequest): Promise; + } - /** DeleteWebhookRequest name */ - name?: (string|null); + namespace Versions { - /** DeleteWebhookRequest force */ - force?: (boolean|null); + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Versions#listVersions}. + * @param error Error, if any + * @param [response] ListVersionsResponse + */ + type ListVersionsCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.ListVersionsResponse) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Versions#getVersion}. + * @param error Error, if any + * @param [response] Version + */ + type GetVersionCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.Version) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Versions#createVersion}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateVersionCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Versions#updateVersion}. + * @param error Error, if any + * @param [response] Version + */ + type UpdateVersionCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.Version) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Versions#deleteVersion}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteVersionCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Versions#loadVersion}. + * @param error Error, if any + * @param [response] Operation + */ + type LoadVersionCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; } - /** Represents a DeleteWebhookRequest. */ - class DeleteWebhookRequest implements IDeleteWebhookRequest { + /** Properties of a CreateVersionOperationMetadata. */ + interface ICreateVersionOperationMetadata { + + /** CreateVersionOperationMetadata version */ + version?: (string|null); + } + + /** Represents a CreateVersionOperationMetadata. */ + class CreateVersionOperationMetadata implements ICreateVersionOperationMetadata { /** - * Constructs a new DeleteWebhookRequest. + * Constructs a new CreateVersionOperationMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IDeleteWebhookRequest); - - /** DeleteWebhookRequest name. */ - public name: string; + constructor(properties?: google.cloud.dialogflow.cx.v3.ICreateVersionOperationMetadata); - /** DeleteWebhookRequest force. */ - public force: boolean; + /** CreateVersionOperationMetadata version. */ + public version: string; /** - * Creates a new DeleteWebhookRequest instance using the specified properties. + * Creates a new CreateVersionOperationMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteWebhookRequest instance + * @returns CreateVersionOperationMetadata instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IDeleteWebhookRequest): google.cloud.dialogflow.cx.v3.DeleteWebhookRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3.ICreateVersionOperationMetadata): google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata; /** - * Encodes the specified DeleteWebhookRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteWebhookRequest.verify|verify} messages. - * @param message DeleteWebhookRequest message or plain object to encode + * Encodes the specified CreateVersionOperationMetadata message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata.verify|verify} messages. + * @param message CreateVersionOperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IDeleteWebhookRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.ICreateVersionOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteWebhookRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteWebhookRequest.verify|verify} messages. - * @param message DeleteWebhookRequest message or plain object to encode + * Encodes the specified CreateVersionOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata.verify|verify} messages. + * @param message CreateVersionOperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IDeleteWebhookRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ICreateVersionOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteWebhookRequest message from the specified reader or buffer. + * Decodes a CreateVersionOperationMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteWebhookRequest + * @returns CreateVersionOperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.DeleteWebhookRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata; /** - * Decodes a DeleteWebhookRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateVersionOperationMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteWebhookRequest + * @returns CreateVersionOperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.DeleteWebhookRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata; /** - * Verifies a DeleteWebhookRequest message. + * Verifies a CreateVersionOperationMetadata message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DeleteWebhookRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateVersionOperationMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteWebhookRequest + * @returns CreateVersionOperationMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.DeleteWebhookRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata; /** - * Creates a plain object from a DeleteWebhookRequest message. Also converts values to other types if specified. - * @param message DeleteWebhookRequest + * Creates a plain object from a CreateVersionOperationMetadata message. Also converts values to other types if specified. + * @param message CreateVersionOperationMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.DeleteWebhookRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteWebhookRequest to JSON. + * Converts this CreateVersionOperationMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a WebhookRequest. */ - interface IWebhookRequest { - - /** WebhookRequest detectIntentResponseId */ - detectIntentResponseId?: (string|null); + /** Properties of a Version. */ + interface IVersion { - /** WebhookRequest fulfillmentInfo */ - fulfillmentInfo?: (google.cloud.dialogflow.cx.v3.WebhookRequest.IFulfillmentInfo|null); + /** Version name */ + name?: (string|null); - /** WebhookRequest intentInfo */ - intentInfo?: (google.cloud.dialogflow.cx.v3.WebhookRequest.IIntentInfo|null); + /** Version displayName */ + displayName?: (string|null); - /** WebhookRequest pageInfo */ - pageInfo?: (google.cloud.dialogflow.cx.v3.IPageInfo|null); + /** Version description */ + description?: (string|null); - /** WebhookRequest sessionInfo */ - sessionInfo?: (google.cloud.dialogflow.cx.v3.ISessionInfo|null); + /** Version nluSettings */ + nluSettings?: (google.cloud.dialogflow.cx.v3.INluSettings|null); - /** WebhookRequest messages */ - messages?: (google.cloud.dialogflow.cx.v3.IResponseMessage[]|null); + /** Version createTime */ + createTime?: (google.protobuf.ITimestamp|null); - /** WebhookRequest payload */ - payload?: (google.protobuf.IStruct|null); + /** Version state */ + state?: (google.cloud.dialogflow.cx.v3.Version.State|keyof typeof google.cloud.dialogflow.cx.v3.Version.State|null); } - /** Represents a WebhookRequest. */ - class WebhookRequest implements IWebhookRequest { + /** Represents a Version. */ + class Version implements IVersion { /** - * Constructs a new WebhookRequest. + * Constructs a new Version. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IWebhookRequest); - - /** WebhookRequest detectIntentResponseId. */ - public detectIntentResponseId: string; + constructor(properties?: google.cloud.dialogflow.cx.v3.IVersion); - /** WebhookRequest fulfillmentInfo. */ - public fulfillmentInfo?: (google.cloud.dialogflow.cx.v3.WebhookRequest.IFulfillmentInfo|null); + /** Version name. */ + public name: string; - /** WebhookRequest intentInfo. */ - public intentInfo?: (google.cloud.dialogflow.cx.v3.WebhookRequest.IIntentInfo|null); + /** Version displayName. */ + public displayName: string; - /** WebhookRequest pageInfo. */ - public pageInfo?: (google.cloud.dialogflow.cx.v3.IPageInfo|null); + /** Version description. */ + public description: string; - /** WebhookRequest sessionInfo. */ - public sessionInfo?: (google.cloud.dialogflow.cx.v3.ISessionInfo|null); + /** Version nluSettings. */ + public nluSettings?: (google.cloud.dialogflow.cx.v3.INluSettings|null); - /** WebhookRequest messages. */ - public messages: google.cloud.dialogflow.cx.v3.IResponseMessage[]; + /** Version createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); - /** WebhookRequest payload. */ - public payload?: (google.protobuf.IStruct|null); + /** Version state. */ + public state: (google.cloud.dialogflow.cx.v3.Version.State|keyof typeof google.cloud.dialogflow.cx.v3.Version.State); /** - * Creates a new WebhookRequest instance using the specified properties. + * Creates a new Version instance using the specified properties. * @param [properties] Properties to set - * @returns WebhookRequest instance + * @returns Version instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IWebhookRequest): google.cloud.dialogflow.cx.v3.WebhookRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3.IVersion): google.cloud.dialogflow.cx.v3.Version; /** - * Encodes the specified WebhookRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.WebhookRequest.verify|verify} messages. - * @param message WebhookRequest message or plain object to encode + * Encodes the specified Version message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Version.verify|verify} messages. + * @param message Version message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IWebhookRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IVersion, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified WebhookRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.WebhookRequest.verify|verify} messages. - * @param message WebhookRequest message or plain object to encode + * Encodes the specified Version message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Version.verify|verify} messages. + * @param message Version message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IWebhookRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IVersion, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a WebhookRequest message from the specified reader or buffer. + * Decodes a Version message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns WebhookRequest + * @returns Version * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.WebhookRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.Version; /** - * Decodes a WebhookRequest message from the specified reader or buffer, length delimited. + * Decodes a Version message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns WebhookRequest + * @returns Version * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.WebhookRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.Version; /** - * Verifies a WebhookRequest message. + * Verifies a Version message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a WebhookRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Version message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns WebhookRequest + * @returns Version */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.WebhookRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Version; /** - * Creates a plain object from a WebhookRequest message. Also converts values to other types if specified. - * @param message WebhookRequest + * Creates a plain object from a Version message. Also converts values to other types if specified. + * @param message Version * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.WebhookRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.Version, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this WebhookRequest to JSON. + * Converts this Version to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace WebhookRequest { - - /** Properties of a FulfillmentInfo. */ - interface IFulfillmentInfo { + namespace Version { - /** FulfillmentInfo tag */ - tag?: (string|null); + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + RUNNING = 1, + SUCCEEDED = 2, + FAILED = 3 } + } - /** Represents a FulfillmentInfo. */ - class FulfillmentInfo implements IFulfillmentInfo { + /** Properties of a ListVersionsRequest. */ + interface IListVersionsRequest { - /** - * Constructs a new FulfillmentInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3.WebhookRequest.IFulfillmentInfo); + /** ListVersionsRequest parent */ + parent?: (string|null); - /** FulfillmentInfo tag. */ - public tag: string; + /** ListVersionsRequest pageSize */ + pageSize?: (number|null); - /** - * Creates a new FulfillmentInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns FulfillmentInfo instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3.WebhookRequest.IFulfillmentInfo): google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo; + /** ListVersionsRequest pageToken */ + pageToken?: (string|null); + } - /** - * Encodes the specified FulfillmentInfo message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo.verify|verify} messages. - * @param message FulfillmentInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.cx.v3.WebhookRequest.IFulfillmentInfo, writer?: $protobuf.Writer): $protobuf.Writer; + /** Represents a ListVersionsRequest. */ + class ListVersionsRequest implements IListVersionsRequest { - /** - * Encodes the specified FulfillmentInfo message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo.verify|verify} messages. - * @param message FulfillmentInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.WebhookRequest.IFulfillmentInfo, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Constructs a new ListVersionsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.IListVersionsRequest); - /** - * Decodes a FulfillmentInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FulfillmentInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo; + /** ListVersionsRequest parent. */ + public parent: string; - /** - * Decodes a FulfillmentInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FulfillmentInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo; + /** ListVersionsRequest pageSize. */ + public pageSize: number; - /** - * Verifies a FulfillmentInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** ListVersionsRequest pageToken. */ + public pageToken: string; - /** - * Creates a FulfillmentInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FulfillmentInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo; + /** + * Creates a new ListVersionsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListVersionsRequest instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.IListVersionsRequest): google.cloud.dialogflow.cx.v3.ListVersionsRequest; - /** - * Creates a plain object from a FulfillmentInfo message. Also converts values to other types if specified. - * @param message FulfillmentInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Encodes the specified ListVersionsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListVersionsRequest.verify|verify} messages. + * @param message ListVersionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.IListVersionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Converts this FulfillmentInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Encodes the specified ListVersionsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListVersionsRequest.verify|verify} messages. + * @param message ListVersionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListVersionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** Properties of an IntentInfo. */ - interface IIntentInfo { + /** + * Decodes a ListVersionsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListVersionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ListVersionsRequest; - /** IntentInfo lastMatchedIntent */ - lastMatchedIntent?: (string|null); + /** + * Decodes a ListVersionsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListVersionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ListVersionsRequest; - /** IntentInfo parameters */ - parameters?: ({ [k: string]: google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IIntentParameterValue }|null); - } + /** + * Verifies a ListVersionsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Represents an IntentInfo. */ - class IntentInfo implements IIntentInfo { + /** + * Creates a ListVersionsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListVersionsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListVersionsRequest; - /** - * Constructs a new IntentInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3.WebhookRequest.IIntentInfo); + /** + * Creates a plain object from a ListVersionsRequest message. Also converts values to other types if specified. + * @param message ListVersionsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.ListVersionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** IntentInfo lastMatchedIntent. */ - public lastMatchedIntent: string; + /** + * Converts this ListVersionsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** IntentInfo parameters. */ - public parameters: { [k: string]: google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IIntentParameterValue }; + /** Properties of a ListVersionsResponse. */ + interface IListVersionsResponse { - /** - * Creates a new IntentInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns IntentInfo instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3.WebhookRequest.IIntentInfo): google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo; + /** ListVersionsResponse versions */ + versions?: (google.cloud.dialogflow.cx.v3.IVersion[]|null); - /** - * Encodes the specified IntentInfo message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.verify|verify} messages. - * @param message IntentInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.cx.v3.WebhookRequest.IIntentInfo, writer?: $protobuf.Writer): $protobuf.Writer; + /** ListVersionsResponse nextPageToken */ + nextPageToken?: (string|null); + } - /** - * Encodes the specified IntentInfo message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.verify|verify} messages. - * @param message IntentInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.WebhookRequest.IIntentInfo, writer?: $protobuf.Writer): $protobuf.Writer; + /** Represents a ListVersionsResponse. */ + class ListVersionsResponse implements IListVersionsResponse { - /** - * Decodes an IntentInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns IntentInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo; + /** + * Constructs a new ListVersionsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.IListVersionsResponse); - /** - * Decodes an IntentInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns IntentInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo; + /** ListVersionsResponse versions. */ + public versions: google.cloud.dialogflow.cx.v3.IVersion[]; - /** - * Verifies an IntentInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** ListVersionsResponse nextPageToken. */ + public nextPageToken: string; - /** - * Creates an IntentInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns IntentInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo; + /** + * Creates a new ListVersionsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListVersionsResponse instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.IListVersionsResponse): google.cloud.dialogflow.cx.v3.ListVersionsResponse; - /** - * Creates a plain object from an IntentInfo message. Also converts values to other types if specified. - * @param message IntentInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Encodes the specified ListVersionsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListVersionsResponse.verify|verify} messages. + * @param message ListVersionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.IListVersionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Converts this IntentInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace IntentInfo { - - /** Properties of an IntentParameterValue. */ - interface IIntentParameterValue { - - /** IntentParameterValue originalValue */ - originalValue?: (string|null); - - /** IntentParameterValue resolvedValue */ - resolvedValue?: (google.protobuf.IValue|null); - } - - /** Represents an IntentParameterValue. */ - class IntentParameterValue implements IIntentParameterValue { - - /** - * Constructs a new IntentParameterValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IIntentParameterValue); - - /** IntentParameterValue originalValue. */ - public originalValue: string; - - /** IntentParameterValue resolvedValue. */ - public resolvedValue?: (google.protobuf.IValue|null); - - /** - * Creates a new IntentParameterValue instance using the specified properties. - * @param [properties] Properties to set - * @returns IntentParameterValue instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IIntentParameterValue): google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue; - - /** - * Encodes the specified IntentParameterValue message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue.verify|verify} messages. - * @param message IntentParameterValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IIntentParameterValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified IntentParameterValue message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue.verify|verify} messages. - * @param message IntentParameterValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IIntentParameterValue, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified ListVersionsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListVersionsResponse.verify|verify} messages. + * @param message ListVersionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListVersionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes an IntentParameterValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns IntentParameterValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue; + /** + * Decodes a ListVersionsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListVersionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ListVersionsResponse; - /** - * Decodes an IntentParameterValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns IntentParameterValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue; + /** + * Decodes a ListVersionsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListVersionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ListVersionsResponse; - /** - * Verifies an IntentParameterValue message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Verifies a ListVersionsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Creates an IntentParameterValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns IntentParameterValue - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue; + /** + * Creates a ListVersionsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListVersionsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListVersionsResponse; - /** - * Creates a plain object from an IntentParameterValue message. Also converts values to other types if specified. - * @param message IntentParameterValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a plain object from a ListVersionsResponse message. Also converts values to other types if specified. + * @param message ListVersionsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.ListVersionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this IntentParameterValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } + /** + * Converts this ListVersionsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; } - /** Properties of a WebhookResponse. */ - interface IWebhookResponse { - - /** WebhookResponse fulfillmentResponse */ - fulfillmentResponse?: (google.cloud.dialogflow.cx.v3.WebhookResponse.IFulfillmentResponse|null); - - /** WebhookResponse pageInfo */ - pageInfo?: (google.cloud.dialogflow.cx.v3.IPageInfo|null); - - /** WebhookResponse sessionInfo */ - sessionInfo?: (google.cloud.dialogflow.cx.v3.ISessionInfo|null); - - /** WebhookResponse payload */ - payload?: (google.protobuf.IStruct|null); - - /** WebhookResponse targetPage */ - targetPage?: (string|null); + /** Properties of a GetVersionRequest. */ + interface IGetVersionRequest { - /** WebhookResponse targetFlow */ - targetFlow?: (string|null); + /** GetVersionRequest name */ + name?: (string|null); } - /** Represents a WebhookResponse. */ - class WebhookResponse implements IWebhookResponse { + /** Represents a GetVersionRequest. */ + class GetVersionRequest implements IGetVersionRequest { /** - * Constructs a new WebhookResponse. + * Constructs a new GetVersionRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IWebhookResponse); - - /** WebhookResponse fulfillmentResponse. */ - public fulfillmentResponse?: (google.cloud.dialogflow.cx.v3.WebhookResponse.IFulfillmentResponse|null); - - /** WebhookResponse pageInfo. */ - public pageInfo?: (google.cloud.dialogflow.cx.v3.IPageInfo|null); - - /** WebhookResponse sessionInfo. */ - public sessionInfo?: (google.cloud.dialogflow.cx.v3.ISessionInfo|null); - - /** WebhookResponse payload. */ - public payload?: (google.protobuf.IStruct|null); - - /** WebhookResponse targetPage. */ - public targetPage: string; - - /** WebhookResponse targetFlow. */ - public targetFlow: string; + constructor(properties?: google.cloud.dialogflow.cx.v3.IGetVersionRequest); - /** WebhookResponse transition. */ - public transition?: ("targetPage"|"targetFlow"); + /** GetVersionRequest name. */ + public name: string; /** - * Creates a new WebhookResponse instance using the specified properties. + * Creates a new GetVersionRequest instance using the specified properties. * @param [properties] Properties to set - * @returns WebhookResponse instance + * @returns GetVersionRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IWebhookResponse): google.cloud.dialogflow.cx.v3.WebhookResponse; + public static create(properties?: google.cloud.dialogflow.cx.v3.IGetVersionRequest): google.cloud.dialogflow.cx.v3.GetVersionRequest; /** - * Encodes the specified WebhookResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.WebhookResponse.verify|verify} messages. - * @param message WebhookResponse message or plain object to encode + * Encodes the specified GetVersionRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetVersionRequest.verify|verify} messages. + * @param message GetVersionRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IWebhookResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IGetVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified WebhookResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.WebhookResponse.verify|verify} messages. - * @param message WebhookResponse message or plain object to encode + * Encodes the specified GetVersionRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetVersionRequest.verify|verify} messages. + * @param message GetVersionRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IWebhookResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IGetVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a WebhookResponse message from the specified reader or buffer. + * Decodes a GetVersionRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns WebhookResponse + * @returns GetVersionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.WebhookResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.GetVersionRequest; /** - * Decodes a WebhookResponse message from the specified reader or buffer, length delimited. + * Decodes a GetVersionRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns WebhookResponse + * @returns GetVersionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.WebhookResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.GetVersionRequest; /** - * Verifies a WebhookResponse message. + * Verifies a GetVersionRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a WebhookResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetVersionRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns WebhookResponse + * @returns GetVersionRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.WebhookResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.GetVersionRequest; /** - * Creates a plain object from a WebhookResponse message. Also converts values to other types if specified. - * @param message WebhookResponse + * Creates a plain object from a GetVersionRequest message. Also converts values to other types if specified. + * @param message GetVersionRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.WebhookResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.GetVersionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this WebhookResponse to JSON. + * Converts this GetVersionRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace WebhookResponse { - - /** Properties of a FulfillmentResponse. */ - interface IFulfillmentResponse { - - /** FulfillmentResponse messages */ - messages?: (google.cloud.dialogflow.cx.v3.IResponseMessage[]|null); - - /** FulfillmentResponse mergeBehavior */ - mergeBehavior?: (google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.MergeBehavior|keyof typeof google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.MergeBehavior|null); - } + /** Properties of a CreateVersionRequest. */ + interface ICreateVersionRequest { - /** Represents a FulfillmentResponse. */ - class FulfillmentResponse implements IFulfillmentResponse { + /** CreateVersionRequest parent */ + parent?: (string|null); - /** - * Constructs a new FulfillmentResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3.WebhookResponse.IFulfillmentResponse); + /** CreateVersionRequest version */ + version?: (google.cloud.dialogflow.cx.v3.IVersion|null); + } - /** FulfillmentResponse messages. */ - public messages: google.cloud.dialogflow.cx.v3.IResponseMessage[]; + /** Represents a CreateVersionRequest. */ + class CreateVersionRequest implements ICreateVersionRequest { - /** FulfillmentResponse mergeBehavior. */ - public mergeBehavior: (google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.MergeBehavior|keyof typeof google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.MergeBehavior); + /** + * Constructs a new CreateVersionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.ICreateVersionRequest); - /** - * Creates a new FulfillmentResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns FulfillmentResponse instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3.WebhookResponse.IFulfillmentResponse): google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse; + /** CreateVersionRequest parent. */ + public parent: string; - /** - * Encodes the specified FulfillmentResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.verify|verify} messages. - * @param message FulfillmentResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.cx.v3.WebhookResponse.IFulfillmentResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** CreateVersionRequest version. */ + public version?: (google.cloud.dialogflow.cx.v3.IVersion|null); - /** - * Encodes the specified FulfillmentResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.verify|verify} messages. - * @param message FulfillmentResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.WebhookResponse.IFulfillmentResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new CreateVersionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateVersionRequest instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.ICreateVersionRequest): google.cloud.dialogflow.cx.v3.CreateVersionRequest; - /** - * Decodes a FulfillmentResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FulfillmentResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse; + /** + * Encodes the specified CreateVersionRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateVersionRequest.verify|verify} messages. + * @param message CreateVersionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.ICreateVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a FulfillmentResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FulfillmentResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse; + /** + * Encodes the specified CreateVersionRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateVersionRequest.verify|verify} messages. + * @param message CreateVersionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ICreateVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Verifies a FulfillmentResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Decodes a CreateVersionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateVersionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.CreateVersionRequest; - /** - * Creates a FulfillmentResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FulfillmentResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse; + /** + * Decodes a CreateVersionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateVersionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.CreateVersionRequest; - /** - * Creates a plain object from a FulfillmentResponse message. Also converts values to other types if specified. - * @param message FulfillmentResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Verifies a CreateVersionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Converts this FulfillmentResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Creates a CreateVersionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateVersionRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.CreateVersionRequest; - namespace FulfillmentResponse { + /** + * Creates a plain object from a CreateVersionRequest message. Also converts values to other types if specified. + * @param message CreateVersionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.CreateVersionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** MergeBehavior enum. */ - enum MergeBehavior { - MERGE_BEHAVIOR_UNSPECIFIED = 0, - APPEND = 1, - REPLACE = 2 - } - } + /** + * Converts this CreateVersionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; } - /** Properties of a PageInfo. */ - interface IPageInfo { + /** Properties of an UpdateVersionRequest. */ + interface IUpdateVersionRequest { - /** PageInfo currentPage */ - currentPage?: (string|null); + /** UpdateVersionRequest version */ + version?: (google.cloud.dialogflow.cx.v3.IVersion|null); - /** PageInfo formInfo */ - formInfo?: (google.cloud.dialogflow.cx.v3.PageInfo.IFormInfo|null); + /** UpdateVersionRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); } - /** Represents a PageInfo. */ - class PageInfo implements IPageInfo { + /** Represents an UpdateVersionRequest. */ + class UpdateVersionRequest implements IUpdateVersionRequest { /** - * Constructs a new PageInfo. + * Constructs a new UpdateVersionRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IPageInfo); + constructor(properties?: google.cloud.dialogflow.cx.v3.IUpdateVersionRequest); - /** PageInfo currentPage. */ - public currentPage: string; + /** UpdateVersionRequest version. */ + public version?: (google.cloud.dialogflow.cx.v3.IVersion|null); - /** PageInfo formInfo. */ - public formInfo?: (google.cloud.dialogflow.cx.v3.PageInfo.IFormInfo|null); + /** UpdateVersionRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); /** - * Creates a new PageInfo instance using the specified properties. + * Creates a new UpdateVersionRequest instance using the specified properties. * @param [properties] Properties to set - * @returns PageInfo instance + * @returns UpdateVersionRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IPageInfo): google.cloud.dialogflow.cx.v3.PageInfo; + public static create(properties?: google.cloud.dialogflow.cx.v3.IUpdateVersionRequest): google.cloud.dialogflow.cx.v3.UpdateVersionRequest; /** - * Encodes the specified PageInfo message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.PageInfo.verify|verify} messages. - * @param message PageInfo message or plain object to encode + * Encodes the specified UpdateVersionRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateVersionRequest.verify|verify} messages. + * @param message UpdateVersionRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IPageInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IUpdateVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified PageInfo message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.PageInfo.verify|verify} messages. - * @param message PageInfo message or plain object to encode + * Encodes the specified UpdateVersionRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateVersionRequest.verify|verify} messages. + * @param message UpdateVersionRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IPageInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IUpdateVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PageInfo message from the specified reader or buffer. + * Decodes an UpdateVersionRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns PageInfo + * @returns UpdateVersionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.PageInfo; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.UpdateVersionRequest; /** - * Decodes a PageInfo message from the specified reader or buffer, length delimited. + * Decodes an UpdateVersionRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns PageInfo + * @returns UpdateVersionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.PageInfo; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.UpdateVersionRequest; /** - * Verifies a PageInfo message. + * Verifies an UpdateVersionRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a PageInfo message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateVersionRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns PageInfo + * @returns UpdateVersionRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.PageInfo; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.UpdateVersionRequest; /** - * Creates a plain object from a PageInfo message. Also converts values to other types if specified. - * @param message PageInfo + * Creates a plain object from an UpdateVersionRequest message. Also converts values to other types if specified. + * @param message UpdateVersionRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.PageInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.UpdateVersionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this PageInfo to JSON. + * Converts this UpdateVersionRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace PageInfo { + /** Properties of a DeleteVersionRequest. */ + interface IDeleteVersionRequest { - /** Properties of a FormInfo. */ - interface IFormInfo { + /** DeleteVersionRequest name */ + name?: (string|null); + } - /** FormInfo parameterInfo */ - parameterInfo?: (google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.IParameterInfo[]|null); - } + /** Represents a DeleteVersionRequest. */ + class DeleteVersionRequest implements IDeleteVersionRequest { - /** Represents a FormInfo. */ - class FormInfo implements IFormInfo { + /** + * Constructs a new DeleteVersionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.IDeleteVersionRequest); - /** - * Constructs a new FormInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3.PageInfo.IFormInfo); - - /** FormInfo parameterInfo. */ - public parameterInfo: google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.IParameterInfo[]; - - /** - * Creates a new FormInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns FormInfo instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3.PageInfo.IFormInfo): google.cloud.dialogflow.cx.v3.PageInfo.FormInfo; - - /** - * Encodes the specified FormInfo message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.verify|verify} messages. - * @param message FormInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.cx.v3.PageInfo.IFormInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FormInfo message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.verify|verify} messages. - * @param message FormInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.PageInfo.IFormInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FormInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FormInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.PageInfo.FormInfo; - - /** - * Decodes a FormInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FormInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.PageInfo.FormInfo; - - /** - * Verifies a FormInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FormInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FormInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.PageInfo.FormInfo; - - /** - * Creates a plain object from a FormInfo message. Also converts values to other types if specified. - * @param message FormInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.cx.v3.PageInfo.FormInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FormInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace FormInfo { - - /** Properties of a ParameterInfo. */ - interface IParameterInfo { - - /** ParameterInfo displayName */ - displayName?: (string|null); - - /** ParameterInfo required */ - required?: (boolean|null); - - /** ParameterInfo state */ - state?: (google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.ParameterState|keyof typeof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.ParameterState|null); - - /** ParameterInfo value */ - value?: (google.protobuf.IValue|null); - - /** ParameterInfo justCollected */ - justCollected?: (boolean|null); - } - - /** Represents a ParameterInfo. */ - class ParameterInfo implements IParameterInfo { - - /** - * Constructs a new ParameterInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.IParameterInfo); - - /** ParameterInfo displayName. */ - public displayName: string; - - /** ParameterInfo required. */ - public required: boolean; - - /** ParameterInfo state. */ - public state: (google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.ParameterState|keyof typeof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.ParameterState); - - /** ParameterInfo value. */ - public value?: (google.protobuf.IValue|null); - - /** ParameterInfo justCollected. */ - public justCollected: boolean; - - /** - * Creates a new ParameterInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns ParameterInfo instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.IParameterInfo): google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo; - - /** - * Encodes the specified ParameterInfo message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.verify|verify} messages. - * @param message ParameterInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.IParameterInfo, writer?: $protobuf.Writer): $protobuf.Writer; + /** DeleteVersionRequest name. */ + public name: string; - /** - * Encodes the specified ParameterInfo message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.verify|verify} messages. - * @param message ParameterInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.IParameterInfo, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new DeleteVersionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteVersionRequest instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.IDeleteVersionRequest): google.cloud.dialogflow.cx.v3.DeleteVersionRequest; - /** - * Decodes a ParameterInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ParameterInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo; + /** + * Encodes the specified DeleteVersionRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteVersionRequest.verify|verify} messages. + * @param message DeleteVersionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.IDeleteVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a ParameterInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ParameterInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo; + /** + * Encodes the specified DeleteVersionRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteVersionRequest.verify|verify} messages. + * @param message DeleteVersionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IDeleteVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Verifies a ParameterInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Decodes a DeleteVersionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteVersionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.DeleteVersionRequest; - /** - * Creates a ParameterInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ParameterInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo; + /** + * Decodes a DeleteVersionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteVersionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.DeleteVersionRequest; - /** - * Creates a plain object from a ParameterInfo message. Also converts values to other types if specified. - * @param message ParameterInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Verifies a DeleteVersionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Converts this ParameterInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Creates a DeleteVersionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteVersionRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.DeleteVersionRequest; - namespace ParameterInfo { + /** + * Creates a plain object from a DeleteVersionRequest message. Also converts values to other types if specified. + * @param message DeleteVersionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.DeleteVersionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** ParameterState enum. */ - enum ParameterState { - PARAMETER_STATE_UNSPECIFIED = 0, - EMPTY = 1, - INVALID = 2, - FILLED = 3 - } - } - } + /** + * Converts this DeleteVersionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; } - /** Properties of a SessionInfo. */ - interface ISessionInfo { + /** Properties of a LoadVersionRequest. */ + interface ILoadVersionRequest { - /** SessionInfo session */ - session?: (string|null); + /** LoadVersionRequest name */ + name?: (string|null); - /** SessionInfo parameters */ - parameters?: ({ [k: string]: google.protobuf.IValue }|null); + /** LoadVersionRequest allowOverrideAgentResources */ + allowOverrideAgentResources?: (boolean|null); } - /** Represents a SessionInfo. */ - class SessionInfo implements ISessionInfo { + /** Represents a LoadVersionRequest. */ + class LoadVersionRequest implements ILoadVersionRequest { /** - * Constructs a new SessionInfo. + * Constructs a new LoadVersionRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.ISessionInfo); + constructor(properties?: google.cloud.dialogflow.cx.v3.ILoadVersionRequest); - /** SessionInfo session. */ - public session: string; + /** LoadVersionRequest name. */ + public name: string; - /** SessionInfo parameters. */ - public parameters: { [k: string]: google.protobuf.IValue }; + /** LoadVersionRequest allowOverrideAgentResources. */ + public allowOverrideAgentResources: boolean; /** - * Creates a new SessionInfo instance using the specified properties. + * Creates a new LoadVersionRequest instance using the specified properties. * @param [properties] Properties to set - * @returns SessionInfo instance + * @returns LoadVersionRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.ISessionInfo): google.cloud.dialogflow.cx.v3.SessionInfo; + public static create(properties?: google.cloud.dialogflow.cx.v3.ILoadVersionRequest): google.cloud.dialogflow.cx.v3.LoadVersionRequest; /** - * Encodes the specified SessionInfo message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SessionInfo.verify|verify} messages. - * @param message SessionInfo message or plain object to encode + * Encodes the specified LoadVersionRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.LoadVersionRequest.verify|verify} messages. + * @param message LoadVersionRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.ISessionInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.ILoadVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SessionInfo message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SessionInfo.verify|verify} messages. - * @param message SessionInfo message or plain object to encode + * Encodes the specified LoadVersionRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.LoadVersionRequest.verify|verify} messages. + * @param message LoadVersionRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ISessionInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ILoadVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SessionInfo message from the specified reader or buffer. + * Decodes a LoadVersionRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SessionInfo + * @returns LoadVersionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.SessionInfo; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.LoadVersionRequest; /** - * Decodes a SessionInfo message from the specified reader or buffer, length delimited. + * Decodes a LoadVersionRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SessionInfo + * @returns LoadVersionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.SessionInfo; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.LoadVersionRequest; /** - * Verifies a SessionInfo message. + * Verifies a LoadVersionRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a SessionInfo message from a plain object. Also converts values to their respective internal types. + * Creates a LoadVersionRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SessionInfo + * @returns LoadVersionRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.SessionInfo; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.LoadVersionRequest; /** - * Creates a plain object from a SessionInfo message. Also converts values to other types if specified. - * @param message SessionInfo + * Creates a plain object from a LoadVersionRequest message. Also converts values to other types if specified. + * @param message LoadVersionRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.SessionInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.LoadVersionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SessionInfo to JSON. + * Converts this LoadVersionRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - } - - /** Namespace v3beta1. */ - namespace v3beta1 { - /** Represents an Agents */ - class Agents extends $protobuf.rpc.Service { + /** Represents a Webhooks */ + class Webhooks extends $protobuf.rpc.Service { /** - * Constructs a new Agents service. + * Constructs a new Webhooks service. * @param rpcImpl RPC implementation * @param [requestDelimited=false] Whether requests are length-delimited * @param [responseDelimited=false] Whether responses are length-delimited @@ -16894,4824 +16809,7102 @@ export namespace google { constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); /** - * Creates new Agents service using the specified rpc implementation. + * Creates new Webhooks service using the specified rpc implementation. * @param rpcImpl RPC implementation * @param [requestDelimited=false] Whether requests are length-delimited * @param [responseDelimited=false] Whether responses are length-delimited * @returns RPC service. Useful where requests and/or responses are streamed. */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Agents; + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Webhooks; /** - * Calls ListAgents. - * @param request ListAgentsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListAgentsResponse + * Calls ListWebhooks. + * @param request ListWebhooksRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListWebhooksResponse */ - public listAgents(request: google.cloud.dialogflow.cx.v3beta1.IListAgentsRequest, callback: google.cloud.dialogflow.cx.v3beta1.Agents.ListAgentsCallback): void; + public listWebhooks(request: google.cloud.dialogflow.cx.v3.IListWebhooksRequest, callback: google.cloud.dialogflow.cx.v3.Webhooks.ListWebhooksCallback): void; /** - * Calls ListAgents. - * @param request ListAgentsRequest message or plain object + * Calls ListWebhooks. + * @param request ListWebhooksRequest message or plain object * @returns Promise */ - public listAgents(request: google.cloud.dialogflow.cx.v3beta1.IListAgentsRequest): Promise; + public listWebhooks(request: google.cloud.dialogflow.cx.v3.IListWebhooksRequest): Promise; /** - * Calls GetAgent. - * @param request GetAgentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Agent + * Calls GetWebhook. + * @param request GetWebhookRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Webhook */ - public getAgent(request: google.cloud.dialogflow.cx.v3beta1.IGetAgentRequest, callback: google.cloud.dialogflow.cx.v3beta1.Agents.GetAgentCallback): void; + public getWebhook(request: google.cloud.dialogflow.cx.v3.IGetWebhookRequest, callback: google.cloud.dialogflow.cx.v3.Webhooks.GetWebhookCallback): void; /** - * Calls GetAgent. - * @param request GetAgentRequest message or plain object + * Calls GetWebhook. + * @param request GetWebhookRequest message or plain object * @returns Promise */ - public getAgent(request: google.cloud.dialogflow.cx.v3beta1.IGetAgentRequest): Promise; + public getWebhook(request: google.cloud.dialogflow.cx.v3.IGetWebhookRequest): Promise; /** - * Calls CreateAgent. - * @param request CreateAgentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Agent + * Calls CreateWebhook. + * @param request CreateWebhookRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Webhook */ - public createAgent(request: google.cloud.dialogflow.cx.v3beta1.ICreateAgentRequest, callback: google.cloud.dialogflow.cx.v3beta1.Agents.CreateAgentCallback): void; + public createWebhook(request: google.cloud.dialogflow.cx.v3.ICreateWebhookRequest, callback: google.cloud.dialogflow.cx.v3.Webhooks.CreateWebhookCallback): void; /** - * Calls CreateAgent. - * @param request CreateAgentRequest message or plain object + * Calls CreateWebhook. + * @param request CreateWebhookRequest message or plain object * @returns Promise */ - public createAgent(request: google.cloud.dialogflow.cx.v3beta1.ICreateAgentRequest): Promise; + public createWebhook(request: google.cloud.dialogflow.cx.v3.ICreateWebhookRequest): Promise; /** - * Calls UpdateAgent. - * @param request UpdateAgentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Agent + * Calls UpdateWebhook. + * @param request UpdateWebhookRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Webhook */ - public updateAgent(request: google.cloud.dialogflow.cx.v3beta1.IUpdateAgentRequest, callback: google.cloud.dialogflow.cx.v3beta1.Agents.UpdateAgentCallback): void; + public updateWebhook(request: google.cloud.dialogflow.cx.v3.IUpdateWebhookRequest, callback: google.cloud.dialogflow.cx.v3.Webhooks.UpdateWebhookCallback): void; /** - * Calls UpdateAgent. - * @param request UpdateAgentRequest message or plain object + * Calls UpdateWebhook. + * @param request UpdateWebhookRequest message or plain object * @returns Promise */ - public updateAgent(request: google.cloud.dialogflow.cx.v3beta1.IUpdateAgentRequest): Promise; + public updateWebhook(request: google.cloud.dialogflow.cx.v3.IUpdateWebhookRequest): Promise; /** - * Calls DeleteAgent. - * @param request DeleteAgentRequest message or plain object + * Calls DeleteWebhook. + * @param request DeleteWebhookRequest message or plain object * @param callback Node-style callback called with the error, if any, and Empty */ - public deleteAgent(request: google.cloud.dialogflow.cx.v3beta1.IDeleteAgentRequest, callback: google.cloud.dialogflow.cx.v3beta1.Agents.DeleteAgentCallback): void; - - /** - * Calls DeleteAgent. - * @param request DeleteAgentRequest message or plain object - * @returns Promise - */ - public deleteAgent(request: google.cloud.dialogflow.cx.v3beta1.IDeleteAgentRequest): Promise; - - /** - * Calls ExportAgent. - * @param request ExportAgentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public exportAgent(request: google.cloud.dialogflow.cx.v3beta1.IExportAgentRequest, callback: google.cloud.dialogflow.cx.v3beta1.Agents.ExportAgentCallback): void; - - /** - * Calls ExportAgent. - * @param request ExportAgentRequest message or plain object - * @returns Promise - */ - public exportAgent(request: google.cloud.dialogflow.cx.v3beta1.IExportAgentRequest): Promise; - - /** - * Calls RestoreAgent. - * @param request RestoreAgentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public restoreAgent(request: google.cloud.dialogflow.cx.v3beta1.IRestoreAgentRequest, callback: google.cloud.dialogflow.cx.v3beta1.Agents.RestoreAgentCallback): void; + public deleteWebhook(request: google.cloud.dialogflow.cx.v3.IDeleteWebhookRequest, callback: google.cloud.dialogflow.cx.v3.Webhooks.DeleteWebhookCallback): void; /** - * Calls RestoreAgent. - * @param request RestoreAgentRequest message or plain object + * Calls DeleteWebhook. + * @param request DeleteWebhookRequest message or plain object * @returns Promise */ - public restoreAgent(request: google.cloud.dialogflow.cx.v3beta1.IRestoreAgentRequest): Promise; + public deleteWebhook(request: google.cloud.dialogflow.cx.v3.IDeleteWebhookRequest): Promise; } - namespace Agents { + namespace Webhooks { /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Agents#listAgents}. + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Webhooks#listWebhooks}. * @param error Error, if any - * @param [response] ListAgentsResponse + * @param [response] ListWebhooksResponse */ - type ListAgentsCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse) => void; + type ListWebhooksCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.ListWebhooksResponse) => void; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Agents#getAgent}. + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Webhooks#getWebhook}. * @param error Error, if any - * @param [response] Agent + * @param [response] Webhook */ - type GetAgentCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.Agent) => void; + type GetWebhookCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.Webhook) => void; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Agents#createAgent}. + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Webhooks#createWebhook}. * @param error Error, if any - * @param [response] Agent + * @param [response] Webhook */ - type CreateAgentCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.Agent) => void; + type CreateWebhookCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.Webhook) => void; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Agents#updateAgent}. + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Webhooks#updateWebhook}. * @param error Error, if any - * @param [response] Agent + * @param [response] Webhook */ - type UpdateAgentCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.Agent) => void; + type UpdateWebhookCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.Webhook) => void; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Agents#deleteAgent}. + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Webhooks#deleteWebhook}. * @param error Error, if any * @param [response] Empty */ - type DeleteAgentCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + type DeleteWebhookCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + } - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Agents#exportAgent}. - * @param error Error, if any - * @param [response] Operation - */ - type ExportAgentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + /** Properties of a Webhook. */ + interface IWebhook { - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Agents#restoreAgent}. - * @param error Error, if any - * @param [response] Operation - */ - type RestoreAgentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - } + /** Webhook name */ + name?: (string|null); - /** Properties of a SpeechToTextSettings. */ - interface ISpeechToTextSettings { + /** Webhook displayName */ + displayName?: (string|null); - /** SpeechToTextSettings enableSpeechAdaptation */ - enableSpeechAdaptation?: (boolean|null); + /** Webhook genericWebService */ + genericWebService?: (google.cloud.dialogflow.cx.v3.Webhook.IGenericWebService|null); + + /** Webhook timeout */ + timeout?: (google.protobuf.IDuration|null); + + /** Webhook disabled */ + disabled?: (boolean|null); } - /** Represents a SpeechToTextSettings. */ - class SpeechToTextSettings implements ISpeechToTextSettings { + /** Represents a Webhook. */ + class Webhook implements IWebhook { /** - * Constructs a new SpeechToTextSettings. + * Constructs a new Webhook. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ISpeechToTextSettings); + constructor(properties?: google.cloud.dialogflow.cx.v3.IWebhook); - /** SpeechToTextSettings enableSpeechAdaptation. */ - public enableSpeechAdaptation: boolean; + /** Webhook name. */ + public name: string; + + /** Webhook displayName. */ + public displayName: string; + + /** Webhook genericWebService. */ + public genericWebService?: (google.cloud.dialogflow.cx.v3.Webhook.IGenericWebService|null); + + /** Webhook timeout. */ + public timeout?: (google.protobuf.IDuration|null); + + /** Webhook disabled. */ + public disabled: boolean; + + /** Webhook webhook. */ + public webhook?: "genericWebService"; /** - * Creates a new SpeechToTextSettings instance using the specified properties. + * Creates a new Webhook instance using the specified properties. * @param [properties] Properties to set - * @returns SpeechToTextSettings instance + * @returns Webhook instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ISpeechToTextSettings): google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings; + public static create(properties?: google.cloud.dialogflow.cx.v3.IWebhook): google.cloud.dialogflow.cx.v3.Webhook; /** - * Encodes the specified SpeechToTextSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings.verify|verify} messages. - * @param message SpeechToTextSettings message or plain object to encode + * Encodes the specified Webhook message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Webhook.verify|verify} messages. + * @param message Webhook message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.ISpeechToTextSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IWebhook, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SpeechToTextSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings.verify|verify} messages. - * @param message SpeechToTextSettings message or plain object to encode + * Encodes the specified Webhook message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Webhook.verify|verify} messages. + * @param message Webhook message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ISpeechToTextSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IWebhook, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SpeechToTextSettings message from the specified reader or buffer. + * Decodes a Webhook message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SpeechToTextSettings + * @returns Webhook * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.Webhook; /** - * Decodes a SpeechToTextSettings message from the specified reader or buffer, length delimited. + * Decodes a Webhook message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SpeechToTextSettings + * @returns Webhook * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.Webhook; /** - * Verifies a SpeechToTextSettings message. + * Verifies a Webhook message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a SpeechToTextSettings message from a plain object. Also converts values to their respective internal types. + * Creates a Webhook message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SpeechToTextSettings + * @returns Webhook */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Webhook; /** - * Creates a plain object from a SpeechToTextSettings message. Also converts values to other types if specified. - * @param message SpeechToTextSettings + * Creates a plain object from a Webhook message. Also converts values to other types if specified. + * @param message Webhook * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.Webhook, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SpeechToTextSettings to JSON. + * Converts this Webhook to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an Agent. */ - interface IAgent { + namespace Webhook { - /** Agent name */ - name?: (string|null); + /** Properties of a GenericWebService. */ + interface IGenericWebService { - /** Agent displayName */ - displayName?: (string|null); + /** GenericWebService uri */ + uri?: (string|null); - /** Agent defaultLanguageCode */ - defaultLanguageCode?: (string|null); + /** GenericWebService username */ + username?: (string|null); - /** Agent timeZone */ - timeZone?: (string|null); + /** GenericWebService password */ + password?: (string|null); - /** Agent description */ - description?: (string|null); + /** GenericWebService requestHeaders */ + requestHeaders?: ({ [k: string]: string }|null); + } - /** Agent avatarUri */ - avatarUri?: (string|null); + /** Represents a GenericWebService. */ + class GenericWebService implements IGenericWebService { - /** Agent speechToTextSettings */ - speechToTextSettings?: (google.cloud.dialogflow.cx.v3beta1.ISpeechToTextSettings|null); + /** + * Constructs a new GenericWebService. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.Webhook.IGenericWebService); - /** Agent startFlow */ - startFlow?: (string|null); + /** GenericWebService uri. */ + public uri: string; - /** Agent enableStackdriverLogging */ - enableStackdriverLogging?: (boolean|null); + /** GenericWebService username. */ + public username: string; - /** Agent enableSpellCorrection */ - enableSpellCorrection?: (boolean|null); - } + /** GenericWebService password. */ + public password: string; - /** Represents an Agent. */ - class Agent implements IAgent { + /** GenericWebService requestHeaders. */ + public requestHeaders: { [k: string]: string }; - /** - * Constructs a new Agent. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IAgent); + /** + * Creates a new GenericWebService instance using the specified properties. + * @param [properties] Properties to set + * @returns GenericWebService instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.Webhook.IGenericWebService): google.cloud.dialogflow.cx.v3.Webhook.GenericWebService; - /** Agent name. */ - public name: string; + /** + * Encodes the specified GenericWebService message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.verify|verify} messages. + * @param message GenericWebService message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.Webhook.IGenericWebService, writer?: $protobuf.Writer): $protobuf.Writer; - /** Agent displayName. */ - public displayName: string; + /** + * Encodes the specified GenericWebService message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.verify|verify} messages. + * @param message GenericWebService message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.Webhook.IGenericWebService, writer?: $protobuf.Writer): $protobuf.Writer; - /** Agent defaultLanguageCode. */ - public defaultLanguageCode: string; + /** + * Decodes a GenericWebService message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GenericWebService + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.Webhook.GenericWebService; - /** Agent timeZone. */ - public timeZone: string; + /** + * Decodes a GenericWebService message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GenericWebService + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.Webhook.GenericWebService; - /** Agent description. */ - public description: string; + /** + * Verifies a GenericWebService message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Agent avatarUri. */ - public avatarUri: string; + /** + * Creates a GenericWebService message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GenericWebService + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Webhook.GenericWebService; - /** Agent speechToTextSettings. */ - public speechToTextSettings?: (google.cloud.dialogflow.cx.v3beta1.ISpeechToTextSettings|null); + /** + * Creates a plain object from a GenericWebService message. Also converts values to other types if specified. + * @param message GenericWebService + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.Webhook.GenericWebService, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Agent startFlow. */ - public startFlow: string; + /** + * Converts this GenericWebService to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } - /** Agent enableStackdriverLogging. */ - public enableStackdriverLogging: boolean; + /** Properties of a ListWebhooksRequest. */ + interface IListWebhooksRequest { - /** Agent enableSpellCorrection. */ - public enableSpellCorrection: boolean; + /** ListWebhooksRequest parent */ + parent?: (string|null); + + /** ListWebhooksRequest pageSize */ + pageSize?: (number|null); + + /** ListWebhooksRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListWebhooksRequest. */ + class ListWebhooksRequest implements IListWebhooksRequest { /** - * Creates a new Agent instance using the specified properties. + * Constructs a new ListWebhooksRequest. * @param [properties] Properties to set - * @returns Agent instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IAgent): google.cloud.dialogflow.cx.v3beta1.Agent; + constructor(properties?: google.cloud.dialogflow.cx.v3.IListWebhooksRequest); + + /** ListWebhooksRequest parent. */ + public parent: string; + + /** ListWebhooksRequest pageSize. */ + public pageSize: number; + + /** ListWebhooksRequest pageToken. */ + public pageToken: string; /** - * Encodes the specified Agent message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Agent.verify|verify} messages. - * @param message Agent message or plain object to encode + * Creates a new ListWebhooksRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListWebhooksRequest instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.IListWebhooksRequest): google.cloud.dialogflow.cx.v3.ListWebhooksRequest; + + /** + * Encodes the specified ListWebhooksRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListWebhooksRequest.verify|verify} messages. + * @param message ListWebhooksRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IAgent, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IListWebhooksRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Agent message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Agent.verify|verify} messages. - * @param message Agent message or plain object to encode + * Encodes the specified ListWebhooksRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListWebhooksRequest.verify|verify} messages. + * @param message ListWebhooksRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IAgent, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListWebhooksRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Agent message from the specified reader or buffer. + * Decodes a ListWebhooksRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Agent + * @returns ListWebhooksRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.Agent; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ListWebhooksRequest; /** - * Decodes an Agent message from the specified reader or buffer, length delimited. + * Decodes a ListWebhooksRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Agent + * @returns ListWebhooksRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.Agent; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ListWebhooksRequest; /** - * Verifies an Agent message. + * Verifies a ListWebhooksRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an Agent message from a plain object. Also converts values to their respective internal types. + * Creates a ListWebhooksRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Agent + * @returns ListWebhooksRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.Agent; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListWebhooksRequest; /** - * Creates a plain object from an Agent message. Also converts values to other types if specified. - * @param message Agent + * Creates a plain object from a ListWebhooksRequest message. Also converts values to other types if specified. + * @param message ListWebhooksRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.Agent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.ListWebhooksRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Agent to JSON. + * Converts this ListWebhooksRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListAgentsRequest. */ - interface IListAgentsRequest { - - /** ListAgentsRequest parent */ - parent?: (string|null); + /** Properties of a ListWebhooksResponse. */ + interface IListWebhooksResponse { - /** ListAgentsRequest pageSize */ - pageSize?: (number|null); + /** ListWebhooksResponse webhooks */ + webhooks?: (google.cloud.dialogflow.cx.v3.IWebhook[]|null); - /** ListAgentsRequest pageToken */ - pageToken?: (string|null); + /** ListWebhooksResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a ListAgentsRequest. */ - class ListAgentsRequest implements IListAgentsRequest { + /** Represents a ListWebhooksResponse. */ + class ListWebhooksResponse implements IListWebhooksResponse { /** - * Constructs a new ListAgentsRequest. + * Constructs a new ListWebhooksResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IListAgentsRequest); - - /** ListAgentsRequest parent. */ - public parent: string; + constructor(properties?: google.cloud.dialogflow.cx.v3.IListWebhooksResponse); - /** ListAgentsRequest pageSize. */ - public pageSize: number; + /** ListWebhooksResponse webhooks. */ + public webhooks: google.cloud.dialogflow.cx.v3.IWebhook[]; - /** ListAgentsRequest pageToken. */ - public pageToken: string; + /** ListWebhooksResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new ListAgentsRequest instance using the specified properties. + * Creates a new ListWebhooksResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ListAgentsRequest instance + * @returns ListWebhooksResponse instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IListAgentsRequest): google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3.IListWebhooksResponse): google.cloud.dialogflow.cx.v3.ListWebhooksResponse; /** - * Encodes the specified ListAgentsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest.verify|verify} messages. - * @param message ListAgentsRequest message or plain object to encode + * Encodes the specified ListWebhooksResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListWebhooksResponse.verify|verify} messages. + * @param message ListWebhooksResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IListAgentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IListWebhooksResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListAgentsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest.verify|verify} messages. - * @param message ListAgentsRequest message or plain object to encode + * Encodes the specified ListWebhooksResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListWebhooksResponse.verify|verify} messages. + * @param message ListWebhooksResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IListAgentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListWebhooksResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListAgentsRequest message from the specified reader or buffer. + * Decodes a ListWebhooksResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListAgentsRequest + * @returns ListWebhooksResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ListWebhooksResponse; /** - * Decodes a ListAgentsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListWebhooksResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListAgentsRequest + * @returns ListWebhooksResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ListWebhooksResponse; /** - * Verifies a ListAgentsRequest message. + * Verifies a ListWebhooksResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListAgentsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListWebhooksResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListAgentsRequest + * @returns ListWebhooksResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListWebhooksResponse; /** - * Creates a plain object from a ListAgentsRequest message. Also converts values to other types if specified. - * @param message ListAgentsRequest + * Creates a plain object from a ListWebhooksResponse message. Also converts values to other types if specified. + * @param message ListWebhooksResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.ListWebhooksResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListAgentsRequest to JSON. + * Converts this ListWebhooksResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListAgentsResponse. */ - interface IListAgentsResponse { - - /** ListAgentsResponse agents */ - agents?: (google.cloud.dialogflow.cx.v3beta1.IAgent[]|null); + /** Properties of a GetWebhookRequest. */ + interface IGetWebhookRequest { - /** ListAgentsResponse nextPageToken */ - nextPageToken?: (string|null); + /** GetWebhookRequest name */ + name?: (string|null); } - /** Represents a ListAgentsResponse. */ - class ListAgentsResponse implements IListAgentsResponse { + /** Represents a GetWebhookRequest. */ + class GetWebhookRequest implements IGetWebhookRequest { /** - * Constructs a new ListAgentsResponse. + * Constructs a new GetWebhookRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IListAgentsResponse); - - /** ListAgentsResponse agents. */ - public agents: google.cloud.dialogflow.cx.v3beta1.IAgent[]; + constructor(properties?: google.cloud.dialogflow.cx.v3.IGetWebhookRequest); - /** ListAgentsResponse nextPageToken. */ - public nextPageToken: string; + /** GetWebhookRequest name. */ + public name: string; /** - * Creates a new ListAgentsResponse instance using the specified properties. + * Creates a new GetWebhookRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListAgentsResponse instance + * @returns GetWebhookRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IListAgentsResponse): google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse; + public static create(properties?: google.cloud.dialogflow.cx.v3.IGetWebhookRequest): google.cloud.dialogflow.cx.v3.GetWebhookRequest; /** - * Encodes the specified ListAgentsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse.verify|verify} messages. - * @param message ListAgentsResponse message or plain object to encode + * Encodes the specified GetWebhookRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetWebhookRequest.verify|verify} messages. + * @param message GetWebhookRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IListAgentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IGetWebhookRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListAgentsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse.verify|verify} messages. - * @param message ListAgentsResponse message or plain object to encode + * Encodes the specified GetWebhookRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetWebhookRequest.verify|verify} messages. + * @param message GetWebhookRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IListAgentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IGetWebhookRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListAgentsResponse message from the specified reader or buffer. + * Decodes a GetWebhookRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListAgentsResponse + * @returns GetWebhookRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.GetWebhookRequest; /** - * Decodes a ListAgentsResponse message from the specified reader or buffer, length delimited. + * Decodes a GetWebhookRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListAgentsResponse + * @returns GetWebhookRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.GetWebhookRequest; /** - * Verifies a ListAgentsResponse message. + * Verifies a GetWebhookRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListAgentsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetWebhookRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListAgentsResponse + * @returns GetWebhookRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.GetWebhookRequest; /** - * Creates a plain object from a ListAgentsResponse message. Also converts values to other types if specified. - * @param message ListAgentsResponse + * Creates a plain object from a GetWebhookRequest message. Also converts values to other types if specified. + * @param message GetWebhookRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.GetWebhookRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListAgentsResponse to JSON. + * Converts this GetWebhookRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetAgentRequest. */ - interface IGetAgentRequest { + /** Properties of a CreateWebhookRequest. */ + interface ICreateWebhookRequest { - /** GetAgentRequest name */ - name?: (string|null); + /** CreateWebhookRequest parent */ + parent?: (string|null); + + /** CreateWebhookRequest webhook */ + webhook?: (google.cloud.dialogflow.cx.v3.IWebhook|null); } - /** Represents a GetAgentRequest. */ - class GetAgentRequest implements IGetAgentRequest { + /** Represents a CreateWebhookRequest. */ + class CreateWebhookRequest implements ICreateWebhookRequest { /** - * Constructs a new GetAgentRequest. + * Constructs a new CreateWebhookRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IGetAgentRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3.ICreateWebhookRequest); - /** GetAgentRequest name. */ - public name: string; + /** CreateWebhookRequest parent. */ + public parent: string; + + /** CreateWebhookRequest webhook. */ + public webhook?: (google.cloud.dialogflow.cx.v3.IWebhook|null); /** - * Creates a new GetAgentRequest instance using the specified properties. + * Creates a new CreateWebhookRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetAgentRequest instance + * @returns CreateWebhookRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IGetAgentRequest): google.cloud.dialogflow.cx.v3beta1.GetAgentRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3.ICreateWebhookRequest): google.cloud.dialogflow.cx.v3.CreateWebhookRequest; /** - * Encodes the specified GetAgentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetAgentRequest.verify|verify} messages. - * @param message GetAgentRequest message or plain object to encode + * Encodes the specified CreateWebhookRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateWebhookRequest.verify|verify} messages. + * @param message CreateWebhookRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IGetAgentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.ICreateWebhookRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetAgentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetAgentRequest.verify|verify} messages. - * @param message GetAgentRequest message or plain object to encode + * Encodes the specified CreateWebhookRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateWebhookRequest.verify|verify} messages. + * @param message CreateWebhookRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IGetAgentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ICreateWebhookRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetAgentRequest message from the specified reader or buffer. + * Decodes a CreateWebhookRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetAgentRequest + * @returns CreateWebhookRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.GetAgentRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.CreateWebhookRequest; /** - * Decodes a GetAgentRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateWebhookRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetAgentRequest + * @returns CreateWebhookRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.GetAgentRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.CreateWebhookRequest; /** - * Verifies a GetAgentRequest message. + * Verifies a CreateWebhookRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetAgentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateWebhookRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetAgentRequest + * @returns CreateWebhookRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.GetAgentRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.CreateWebhookRequest; /** - * Creates a plain object from a GetAgentRequest message. Also converts values to other types if specified. - * @param message GetAgentRequest + * Creates a plain object from a CreateWebhookRequest message. Also converts values to other types if specified. + * @param message CreateWebhookRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.GetAgentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.CreateWebhookRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetAgentRequest to JSON. + * Converts this CreateWebhookRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CreateAgentRequest. */ - interface ICreateAgentRequest { + /** Properties of an UpdateWebhookRequest. */ + interface IUpdateWebhookRequest { - /** CreateAgentRequest parent */ - parent?: (string|null); + /** UpdateWebhookRequest webhook */ + webhook?: (google.cloud.dialogflow.cx.v3.IWebhook|null); - /** CreateAgentRequest agent */ - agent?: (google.cloud.dialogflow.cx.v3beta1.IAgent|null); + /** UpdateWebhookRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); } - /** Represents a CreateAgentRequest. */ - class CreateAgentRequest implements ICreateAgentRequest { + /** Represents an UpdateWebhookRequest. */ + class UpdateWebhookRequest implements IUpdateWebhookRequest { /** - * Constructs a new CreateAgentRequest. + * Constructs a new UpdateWebhookRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ICreateAgentRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3.IUpdateWebhookRequest); - /** CreateAgentRequest parent. */ - public parent: string; + /** UpdateWebhookRequest webhook. */ + public webhook?: (google.cloud.dialogflow.cx.v3.IWebhook|null); - /** CreateAgentRequest agent. */ - public agent?: (google.cloud.dialogflow.cx.v3beta1.IAgent|null); + /** UpdateWebhookRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); /** - * Creates a new CreateAgentRequest instance using the specified properties. + * Creates a new UpdateWebhookRequest instance using the specified properties. * @param [properties] Properties to set - * @returns CreateAgentRequest instance + * @returns UpdateWebhookRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ICreateAgentRequest): google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3.IUpdateWebhookRequest): google.cloud.dialogflow.cx.v3.UpdateWebhookRequest; /** - * Encodes the specified CreateAgentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest.verify|verify} messages. - * @param message CreateAgentRequest message or plain object to encode + * Encodes the specified UpdateWebhookRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateWebhookRequest.verify|verify} messages. + * @param message UpdateWebhookRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.ICreateAgentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IUpdateWebhookRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateAgentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest.verify|verify} messages. - * @param message CreateAgentRequest message or plain object to encode + * Encodes the specified UpdateWebhookRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateWebhookRequest.verify|verify} messages. + * @param message UpdateWebhookRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ICreateAgentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IUpdateWebhookRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateAgentRequest message from the specified reader or buffer. + * Decodes an UpdateWebhookRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateAgentRequest + * @returns UpdateWebhookRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.UpdateWebhookRequest; /** - * Decodes a CreateAgentRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateWebhookRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateAgentRequest + * @returns UpdateWebhookRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.UpdateWebhookRequest; /** - * Verifies a CreateAgentRequest message. + * Verifies an UpdateWebhookRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CreateAgentRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateWebhookRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateAgentRequest + * @returns UpdateWebhookRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.UpdateWebhookRequest; /** - * Creates a plain object from a CreateAgentRequest message. Also converts values to other types if specified. - * @param message CreateAgentRequest + * Creates a plain object from an UpdateWebhookRequest message. Also converts values to other types if specified. + * @param message UpdateWebhookRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.UpdateWebhookRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateAgentRequest to JSON. + * Converts this UpdateWebhookRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an UpdateAgentRequest. */ - interface IUpdateAgentRequest { + /** Properties of a DeleteWebhookRequest. */ + interface IDeleteWebhookRequest { - /** UpdateAgentRequest agent */ - agent?: (google.cloud.dialogflow.cx.v3beta1.IAgent|null); + /** DeleteWebhookRequest name */ + name?: (string|null); - /** UpdateAgentRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** DeleteWebhookRequest force */ + force?: (boolean|null); } - /** Represents an UpdateAgentRequest. */ - class UpdateAgentRequest implements IUpdateAgentRequest { + /** Represents a DeleteWebhookRequest. */ + class DeleteWebhookRequest implements IDeleteWebhookRequest { /** - * Constructs a new UpdateAgentRequest. + * Constructs a new DeleteWebhookRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IUpdateAgentRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3.IDeleteWebhookRequest); - /** UpdateAgentRequest agent. */ - public agent?: (google.cloud.dialogflow.cx.v3beta1.IAgent|null); + /** DeleteWebhookRequest name. */ + public name: string; - /** UpdateAgentRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** DeleteWebhookRequest force. */ + public force: boolean; /** - * Creates a new UpdateAgentRequest instance using the specified properties. + * Creates a new DeleteWebhookRequest instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateAgentRequest instance + * @returns DeleteWebhookRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IUpdateAgentRequest): google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3.IDeleteWebhookRequest): google.cloud.dialogflow.cx.v3.DeleteWebhookRequest; /** - * Encodes the specified UpdateAgentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest.verify|verify} messages. - * @param message UpdateAgentRequest message or plain object to encode + * Encodes the specified DeleteWebhookRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteWebhookRequest.verify|verify} messages. + * @param message DeleteWebhookRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IUpdateAgentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IDeleteWebhookRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateAgentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest.verify|verify} messages. - * @param message UpdateAgentRequest message or plain object to encode + * Encodes the specified DeleteWebhookRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteWebhookRequest.verify|verify} messages. + * @param message DeleteWebhookRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IUpdateAgentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IDeleteWebhookRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateAgentRequest message from the specified reader or buffer. + * Decodes a DeleteWebhookRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateAgentRequest + * @returns DeleteWebhookRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.DeleteWebhookRequest; /** - * Decodes an UpdateAgentRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteWebhookRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateAgentRequest + * @returns DeleteWebhookRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.DeleteWebhookRequest; /** - * Verifies an UpdateAgentRequest message. + * Verifies a DeleteWebhookRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an UpdateAgentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteWebhookRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateAgentRequest + * @returns DeleteWebhookRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.DeleteWebhookRequest; /** - * Creates a plain object from an UpdateAgentRequest message. Also converts values to other types if specified. - * @param message UpdateAgentRequest + * Creates a plain object from a DeleteWebhookRequest message. Also converts values to other types if specified. + * @param message DeleteWebhookRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.DeleteWebhookRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateAgentRequest to JSON. + * Converts this DeleteWebhookRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DeleteAgentRequest. */ - interface IDeleteAgentRequest { - - /** DeleteAgentRequest name */ - name?: (string|null); - } - - /** Represents a DeleteAgentRequest. */ - class DeleteAgentRequest implements IDeleteAgentRequest { - - /** - * Constructs a new DeleteAgentRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IDeleteAgentRequest); - - /** DeleteAgentRequest name. */ - public name: string; + /** Properties of a WebhookRequest. */ + interface IWebhookRequest { - /** - * Creates a new DeleteAgentRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteAgentRequest instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IDeleteAgentRequest): google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest; + /** WebhookRequest detectIntentResponseId */ + detectIntentResponseId?: (string|null); - /** - * Encodes the specified DeleteAgentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest.verify|verify} messages. - * @param message DeleteAgentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IDeleteAgentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** WebhookRequest fulfillmentInfo */ + fulfillmentInfo?: (google.cloud.dialogflow.cx.v3.WebhookRequest.IFulfillmentInfo|null); - /** - * Encodes the specified DeleteAgentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest.verify|verify} messages. - * @param message DeleteAgentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IDeleteAgentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** WebhookRequest intentInfo */ + intentInfo?: (google.cloud.dialogflow.cx.v3.WebhookRequest.IIntentInfo|null); - /** - * Decodes a DeleteAgentRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteAgentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest; + /** WebhookRequest pageInfo */ + pageInfo?: (google.cloud.dialogflow.cx.v3.IPageInfo|null); - /** - * Decodes a DeleteAgentRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteAgentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest; + /** WebhookRequest sessionInfo */ + sessionInfo?: (google.cloud.dialogflow.cx.v3.ISessionInfo|null); - /** - * Verifies a DeleteAgentRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** WebhookRequest messages */ + messages?: (google.cloud.dialogflow.cx.v3.IResponseMessage[]|null); - /** - * Creates a DeleteAgentRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteAgentRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest; + /** WebhookRequest payload */ + payload?: (google.protobuf.IStruct|null); + } - /** - * Creates a plain object from a DeleteAgentRequest message. Also converts values to other types if specified. - * @param message DeleteAgentRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Represents a WebhookRequest. */ + class WebhookRequest implements IWebhookRequest { /** - * Converts this DeleteAgentRequest to JSON. - * @returns JSON object + * Constructs a new WebhookRequest. + * @param [properties] Properties to set */ - public toJSON(): { [k: string]: any }; - } + constructor(properties?: google.cloud.dialogflow.cx.v3.IWebhookRequest); - /** Properties of an ExportAgentRequest. */ - interface IExportAgentRequest { + /** WebhookRequest detectIntentResponseId. */ + public detectIntentResponseId: string; - /** ExportAgentRequest name */ - name?: (string|null); + /** WebhookRequest fulfillmentInfo. */ + public fulfillmentInfo?: (google.cloud.dialogflow.cx.v3.WebhookRequest.IFulfillmentInfo|null); - /** ExportAgentRequest agentUri */ - agentUri?: (string|null); - } + /** WebhookRequest intentInfo. */ + public intentInfo?: (google.cloud.dialogflow.cx.v3.WebhookRequest.IIntentInfo|null); - /** Represents an ExportAgentRequest. */ - class ExportAgentRequest implements IExportAgentRequest { + /** WebhookRequest pageInfo. */ + public pageInfo?: (google.cloud.dialogflow.cx.v3.IPageInfo|null); - /** - * Constructs a new ExportAgentRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IExportAgentRequest); + /** WebhookRequest sessionInfo. */ + public sessionInfo?: (google.cloud.dialogflow.cx.v3.ISessionInfo|null); - /** ExportAgentRequest name. */ - public name: string; + /** WebhookRequest messages. */ + public messages: google.cloud.dialogflow.cx.v3.IResponseMessage[]; - /** ExportAgentRequest agentUri. */ - public agentUri: string; + /** WebhookRequest payload. */ + public payload?: (google.protobuf.IStruct|null); /** - * Creates a new ExportAgentRequest instance using the specified properties. + * Creates a new WebhookRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ExportAgentRequest instance + * @returns WebhookRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IExportAgentRequest): google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3.IWebhookRequest): google.cloud.dialogflow.cx.v3.WebhookRequest; /** - * Encodes the specified ExportAgentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.verify|verify} messages. - * @param message ExportAgentRequest message or plain object to encode + * Encodes the specified WebhookRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.WebhookRequest.verify|verify} messages. + * @param message WebhookRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IExportAgentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IWebhookRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ExportAgentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.verify|verify} messages. - * @param message ExportAgentRequest message or plain object to encode + * Encodes the specified WebhookRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.WebhookRequest.verify|verify} messages. + * @param message WebhookRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IExportAgentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IWebhookRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ExportAgentRequest message from the specified reader or buffer. + * Decodes a WebhookRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ExportAgentRequest + * @returns WebhookRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.WebhookRequest; /** - * Decodes an ExportAgentRequest message from the specified reader or buffer, length delimited. + * Decodes a WebhookRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ExportAgentRequest + * @returns WebhookRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.WebhookRequest; /** - * Verifies an ExportAgentRequest message. + * Verifies a WebhookRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an ExportAgentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a WebhookRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ExportAgentRequest + * @returns WebhookRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.WebhookRequest; /** - * Creates a plain object from an ExportAgentRequest message. Also converts values to other types if specified. - * @param message ExportAgentRequest + * Creates a plain object from a WebhookRequest message. Also converts values to other types if specified. + * @param message WebhookRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.WebhookRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ExportAgentRequest to JSON. + * Converts this WebhookRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an ExportAgentResponse. */ - interface IExportAgentResponse { - - /** ExportAgentResponse agentUri */ - agentUri?: (string|null); + namespace WebhookRequest { - /** ExportAgentResponse agentContent */ - agentContent?: (Uint8Array|string|null); - } + /** Properties of a FulfillmentInfo. */ + interface IFulfillmentInfo { - /** Represents an ExportAgentResponse. */ - class ExportAgentResponse implements IExportAgentResponse { + /** FulfillmentInfo tag */ + tag?: (string|null); + } - /** - * Constructs a new ExportAgentResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IExportAgentResponse); + /** Represents a FulfillmentInfo. */ + class FulfillmentInfo implements IFulfillmentInfo { - /** ExportAgentResponse agentUri. */ - public agentUri: string; + /** + * Constructs a new FulfillmentInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.WebhookRequest.IFulfillmentInfo); - /** ExportAgentResponse agentContent. */ - public agentContent: (Uint8Array|string); + /** FulfillmentInfo tag. */ + public tag: string; - /** ExportAgentResponse agent. */ - public agent?: ("agentUri"|"agentContent"); + /** + * Creates a new FulfillmentInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns FulfillmentInfo instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.WebhookRequest.IFulfillmentInfo): google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo; - /** - * Creates a new ExportAgentResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ExportAgentResponse instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IExportAgentResponse): google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse; + /** + * Encodes the specified FulfillmentInfo message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo.verify|verify} messages. + * @param message FulfillmentInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.WebhookRequest.IFulfillmentInfo, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified ExportAgentResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse.verify|verify} messages. - * @param message ExportAgentResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IExportAgentResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified FulfillmentInfo message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo.verify|verify} messages. + * @param message FulfillmentInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.WebhookRequest.IFulfillmentInfo, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified ExportAgentResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse.verify|verify} messages. - * @param message ExportAgentResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IExportAgentResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a FulfillmentInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FulfillmentInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo; - /** - * Decodes an ExportAgentResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExportAgentResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse; + /** + * Decodes a FulfillmentInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FulfillmentInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo; - /** - * Decodes an ExportAgentResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExportAgentResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse; + /** + * Verifies a FulfillmentInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Verifies an ExportAgentResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Creates a FulfillmentInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FulfillmentInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo; - /** - * Creates an ExportAgentResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExportAgentResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse; + /** + * Creates a plain object from a FulfillmentInfo message. Also converts values to other types if specified. + * @param message FulfillmentInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a plain object from an ExportAgentResponse message. Also converts values to other types if specified. - * @param message ExportAgentResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Converts this FulfillmentInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Converts this ExportAgentResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Properties of an IntentInfo. */ + interface IIntentInfo { - /** Properties of a RestoreAgentRequest. */ - interface IRestoreAgentRequest { + /** IntentInfo lastMatchedIntent */ + lastMatchedIntent?: (string|null); - /** RestoreAgentRequest name */ - name?: (string|null); + /** IntentInfo parameters */ + parameters?: ({ [k: string]: google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IIntentParameterValue }|null); + } - /** RestoreAgentRequest agentUri */ - agentUri?: (string|null); + /** Represents an IntentInfo. */ + class IntentInfo implements IIntentInfo { - /** RestoreAgentRequest agentContent */ - agentContent?: (Uint8Array|string|null); - } + /** + * Constructs a new IntentInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.WebhookRequest.IIntentInfo); - /** Represents a RestoreAgentRequest. */ - class RestoreAgentRequest implements IRestoreAgentRequest { + /** IntentInfo lastMatchedIntent. */ + public lastMatchedIntent: string; - /** - * Constructs a new RestoreAgentRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IRestoreAgentRequest); + /** IntentInfo parameters. */ + public parameters: { [k: string]: google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IIntentParameterValue }; - /** RestoreAgentRequest name. */ - public name: string; - - /** RestoreAgentRequest agentUri. */ - public agentUri: string; - - /** RestoreAgentRequest agentContent. */ - public agentContent: (Uint8Array|string); + /** + * Creates a new IntentInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns IntentInfo instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.WebhookRequest.IIntentInfo): google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo; - /** RestoreAgentRequest agent. */ - public agent?: ("agentUri"|"agentContent"); + /** + * Encodes the specified IntentInfo message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.verify|verify} messages. + * @param message IntentInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.WebhookRequest.IIntentInfo, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a new RestoreAgentRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns RestoreAgentRequest instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IRestoreAgentRequest): google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest; + /** + * Encodes the specified IntentInfo message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.verify|verify} messages. + * @param message IntentInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.WebhookRequest.IIntentInfo, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified RestoreAgentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.verify|verify} messages. - * @param message RestoreAgentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IRestoreAgentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes an IntentInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns IntentInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo; - /** - * Encodes the specified RestoreAgentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.verify|verify} messages. - * @param message RestoreAgentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IRestoreAgentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes an IntentInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns IntentInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo; - /** - * Decodes a RestoreAgentRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RestoreAgentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest; + /** + * Verifies an IntentInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Decodes a RestoreAgentRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RestoreAgentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest; + /** + * Creates an IntentInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IntentInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo; - /** - * Verifies a RestoreAgentRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Creates a plain object from an IntentInfo message. Also converts values to other types if specified. + * @param message IntentInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a RestoreAgentRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RestoreAgentRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest; + /** + * Converts this IntentInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Creates a plain object from a RestoreAgentRequest message. Also converts values to other types if specified. - * @param message RestoreAgentRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + namespace IntentInfo { - /** - * Converts this RestoreAgentRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Properties of an IntentParameterValue. */ + interface IIntentParameterValue { - /** Represents a Flows */ - class Flows extends $protobuf.rpc.Service { + /** IntentParameterValue originalValue */ + originalValue?: (string|null); - /** - * Constructs a new Flows service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + /** IntentParameterValue resolvedValue */ + resolvedValue?: (google.protobuf.IValue|null); + } - /** - * Creates new Flows service using the specified rpc implementation. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - * @returns RPC service. Useful where requests and/or responses are streamed. - */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Flows; + /** Represents an IntentParameterValue. */ + class IntentParameterValue implements IIntentParameterValue { - /** - * Calls CreateFlow. - * @param request CreateFlowRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Flow - */ - public createFlow(request: google.cloud.dialogflow.cx.v3beta1.ICreateFlowRequest, callback: google.cloud.dialogflow.cx.v3beta1.Flows.CreateFlowCallback): void; + /** + * Constructs a new IntentParameterValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IIntentParameterValue); - /** - * Calls CreateFlow. - * @param request CreateFlowRequest message or plain object - * @returns Promise - */ - public createFlow(request: google.cloud.dialogflow.cx.v3beta1.ICreateFlowRequest): Promise; + /** IntentParameterValue originalValue. */ + public originalValue: string; - /** - * Calls DeleteFlow. - * @param request DeleteFlowRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public deleteFlow(request: google.cloud.dialogflow.cx.v3beta1.IDeleteFlowRequest, callback: google.cloud.dialogflow.cx.v3beta1.Flows.DeleteFlowCallback): void; + /** IntentParameterValue resolvedValue. */ + public resolvedValue?: (google.protobuf.IValue|null); - /** - * Calls DeleteFlow. - * @param request DeleteFlowRequest message or plain object - * @returns Promise - */ - public deleteFlow(request: google.cloud.dialogflow.cx.v3beta1.IDeleteFlowRequest): Promise; + /** + * Creates a new IntentParameterValue instance using the specified properties. + * @param [properties] Properties to set + * @returns IntentParameterValue instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IIntentParameterValue): google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue; - /** - * Calls ListFlows. - * @param request ListFlowsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListFlowsResponse - */ - public listFlows(request: google.cloud.dialogflow.cx.v3beta1.IListFlowsRequest, callback: google.cloud.dialogflow.cx.v3beta1.Flows.ListFlowsCallback): void; + /** + * Encodes the specified IntentParameterValue message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue.verify|verify} messages. + * @param message IntentParameterValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IIntentParameterValue, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Calls ListFlows. - * @param request ListFlowsRequest message or plain object - * @returns Promise - */ - public listFlows(request: google.cloud.dialogflow.cx.v3beta1.IListFlowsRequest): Promise; + /** + * Encodes the specified IntentParameterValue message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue.verify|verify} messages. + * @param message IntentParameterValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IIntentParameterValue, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Calls GetFlow. - * @param request GetFlowRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Flow - */ - public getFlow(request: google.cloud.dialogflow.cx.v3beta1.IGetFlowRequest, callback: google.cloud.dialogflow.cx.v3beta1.Flows.GetFlowCallback): void; + /** + * Decodes an IntentParameterValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns IntentParameterValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue; - /** - * Calls GetFlow. - * @param request GetFlowRequest message or plain object - * @returns Promise - */ - public getFlow(request: google.cloud.dialogflow.cx.v3beta1.IGetFlowRequest): Promise; + /** + * Decodes an IntentParameterValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns IntentParameterValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue; - /** - * Calls UpdateFlow. - * @param request UpdateFlowRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Flow - */ - public updateFlow(request: google.cloud.dialogflow.cx.v3beta1.IUpdateFlowRequest, callback: google.cloud.dialogflow.cx.v3beta1.Flows.UpdateFlowCallback): void; + /** + * Verifies an IntentParameterValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Calls UpdateFlow. - * @param request UpdateFlowRequest message or plain object - * @returns Promise - */ - public updateFlow(request: google.cloud.dialogflow.cx.v3beta1.IUpdateFlowRequest): Promise; + /** + * Creates an IntentParameterValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IntentParameterValue + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue; - /** - * Calls TrainFlow. - * @param request TrainFlowRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public trainFlow(request: google.cloud.dialogflow.cx.v3beta1.ITrainFlowRequest, callback: google.cloud.dialogflow.cx.v3beta1.Flows.TrainFlowCallback): void; + /** + * Creates a plain object from an IntentParameterValue message. Also converts values to other types if specified. + * @param message IntentParameterValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Calls TrainFlow. - * @param request TrainFlowRequest message or plain object - * @returns Promise - */ - public trainFlow(request: google.cloud.dialogflow.cx.v3beta1.ITrainFlowRequest): Promise; + /** + * Converts this IntentParameterValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } } - namespace Flows { + /** Properties of a WebhookResponse. */ + interface IWebhookResponse { - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows#createFlow}. - * @param error Error, if any - * @param [response] Flow - */ - type CreateFlowCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.Flow) => void; + /** WebhookResponse fulfillmentResponse */ + fulfillmentResponse?: (google.cloud.dialogflow.cx.v3.WebhookResponse.IFulfillmentResponse|null); - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows#deleteFlow}. - * @param error Error, if any - * @param [response] Empty - */ - type DeleteFlowCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + /** WebhookResponse pageInfo */ + pageInfo?: (google.cloud.dialogflow.cx.v3.IPageInfo|null); - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows#listFlows}. - * @param error Error, if any - * @param [response] ListFlowsResponse - */ - type ListFlowsCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse) => void; + /** WebhookResponse sessionInfo */ + sessionInfo?: (google.cloud.dialogflow.cx.v3.ISessionInfo|null); - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows#getFlow}. - * @param error Error, if any - * @param [response] Flow - */ - type GetFlowCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.Flow) => void; + /** WebhookResponse payload */ + payload?: (google.protobuf.IStruct|null); - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows#updateFlow}. - * @param error Error, if any - * @param [response] Flow - */ - type UpdateFlowCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.Flow) => void; + /** WebhookResponse targetPage */ + targetPage?: (string|null); - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows#trainFlow}. - * @param error Error, if any - * @param [response] Operation - */ - type TrainFlowCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + /** WebhookResponse targetFlow */ + targetFlow?: (string|null); } - /** Properties of a NluSettings. */ - interface INluSettings { + /** Represents a WebhookResponse. */ + class WebhookResponse implements IWebhookResponse { - /** NluSettings modelType */ - modelType?: (google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelType|keyof typeof google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelType|null); + /** + * Constructs a new WebhookResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.IWebhookResponse); - /** NluSettings classificationThreshold */ - classificationThreshold?: (number|null); + /** WebhookResponse fulfillmentResponse. */ + public fulfillmentResponse?: (google.cloud.dialogflow.cx.v3.WebhookResponse.IFulfillmentResponse|null); - /** NluSettings modelTrainingMode */ - modelTrainingMode?: (google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelTrainingMode|keyof typeof google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelTrainingMode|null); - } + /** WebhookResponse pageInfo. */ + public pageInfo?: (google.cloud.dialogflow.cx.v3.IPageInfo|null); - /** Represents a NluSettings. */ - class NluSettings implements INluSettings { + /** WebhookResponse sessionInfo. */ + public sessionInfo?: (google.cloud.dialogflow.cx.v3.ISessionInfo|null); - /** - * Constructs a new NluSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.INluSettings); + /** WebhookResponse payload. */ + public payload?: (google.protobuf.IStruct|null); - /** NluSettings modelType. */ - public modelType: (google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelType|keyof typeof google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelType); + /** WebhookResponse targetPage. */ + public targetPage: string; - /** NluSettings classificationThreshold. */ - public classificationThreshold: number; + /** WebhookResponse targetFlow. */ + public targetFlow: string; - /** NluSettings modelTrainingMode. */ - public modelTrainingMode: (google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelTrainingMode|keyof typeof google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelTrainingMode); + /** WebhookResponse transition. */ + public transition?: ("targetPage"|"targetFlow"); /** - * Creates a new NluSettings instance using the specified properties. + * Creates a new WebhookResponse instance using the specified properties. * @param [properties] Properties to set - * @returns NluSettings instance + * @returns WebhookResponse instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.INluSettings): google.cloud.dialogflow.cx.v3beta1.NluSettings; + public static create(properties?: google.cloud.dialogflow.cx.v3.IWebhookResponse): google.cloud.dialogflow.cx.v3.WebhookResponse; /** - * Encodes the specified NluSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.NluSettings.verify|verify} messages. - * @param message NluSettings message or plain object to encode + * Encodes the specified WebhookResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.WebhookResponse.verify|verify} messages. + * @param message WebhookResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.INluSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IWebhookResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified NluSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.NluSettings.verify|verify} messages. - * @param message NluSettings message or plain object to encode + * Encodes the specified WebhookResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.WebhookResponse.verify|verify} messages. + * @param message WebhookResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.INluSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IWebhookResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a NluSettings message from the specified reader or buffer. + * Decodes a WebhookResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns NluSettings + * @returns WebhookResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.NluSettings; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.WebhookResponse; /** - * Decodes a NluSettings message from the specified reader or buffer, length delimited. + * Decodes a WebhookResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns NluSettings + * @returns WebhookResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.NluSettings; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.WebhookResponse; /** - * Verifies a NluSettings message. + * Verifies a WebhookResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a NluSettings message from a plain object. Also converts values to their respective internal types. + * Creates a WebhookResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns NluSettings + * @returns WebhookResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.NluSettings; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.WebhookResponse; /** - * Creates a plain object from a NluSettings message. Also converts values to other types if specified. - * @param message NluSettings + * Creates a plain object from a WebhookResponse message. Also converts values to other types if specified. + * @param message WebhookResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.NluSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.WebhookResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this NluSettings to JSON. + * Converts this WebhookResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace NluSettings { + namespace WebhookResponse { - /** ModelType enum. */ - enum ModelType { - MODEL_TYPE_UNSPECIFIED = 0, - MODEL_TYPE_STANDARD = 1, - MODEL_TYPE_ADVANCED = 3 - } + /** Properties of a FulfillmentResponse. */ + interface IFulfillmentResponse { - /** ModelTrainingMode enum. */ - enum ModelTrainingMode { - MODEL_TRAINING_MODE_UNSPECIFIED = 0, - MODEL_TRAINING_MODE_AUTOMATIC = 1, - MODEL_TRAINING_MODE_MANUAL = 2 + /** FulfillmentResponse messages */ + messages?: (google.cloud.dialogflow.cx.v3.IResponseMessage[]|null); + + /** FulfillmentResponse mergeBehavior */ + mergeBehavior?: (google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.MergeBehavior|keyof typeof google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.MergeBehavior|null); } - } - /** Properties of a Flow. */ - interface IFlow { + /** Represents a FulfillmentResponse. */ + class FulfillmentResponse implements IFulfillmentResponse { - /** Flow name */ - name?: (string|null); + /** + * Constructs a new FulfillmentResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.WebhookResponse.IFulfillmentResponse); - /** Flow displayName */ - displayName?: (string|null); + /** FulfillmentResponse messages. */ + public messages: google.cloud.dialogflow.cx.v3.IResponseMessage[]; - /** Flow description */ - description?: (string|null); + /** FulfillmentResponse mergeBehavior. */ + public mergeBehavior: (google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.MergeBehavior|keyof typeof google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.MergeBehavior); - /** Flow transitionRoutes */ - transitionRoutes?: (google.cloud.dialogflow.cx.v3beta1.ITransitionRoute[]|null); + /** + * Creates a new FulfillmentResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns FulfillmentResponse instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.WebhookResponse.IFulfillmentResponse): google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse; - /** Flow eventHandlers */ - eventHandlers?: (google.cloud.dialogflow.cx.v3beta1.IEventHandler[]|null); + /** + * Encodes the specified FulfillmentResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.verify|verify} messages. + * @param message FulfillmentResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.WebhookResponse.IFulfillmentResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** Flow nluSettings */ - nluSettings?: (google.cloud.dialogflow.cx.v3beta1.INluSettings|null); - } + /** + * Encodes the specified FulfillmentResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.verify|verify} messages. + * @param message FulfillmentResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.WebhookResponse.IFulfillmentResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** Represents a Flow. */ - class Flow implements IFlow { + /** + * Decodes a FulfillmentResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FulfillmentResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse; - /** - * Constructs a new Flow. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IFlow); + /** + * Decodes a FulfillmentResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FulfillmentResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse; - /** Flow name. */ - public name: string; + /** + * Verifies a FulfillmentResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Flow displayName. */ - public displayName: string; + /** + * Creates a FulfillmentResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FulfillmentResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse; - /** Flow description. */ - public description: string; + /** + * Creates a plain object from a FulfillmentResponse message. Also converts values to other types if specified. + * @param message FulfillmentResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Flow transitionRoutes. */ - public transitionRoutes: google.cloud.dialogflow.cx.v3beta1.ITransitionRoute[]; + /** + * Converts this FulfillmentResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Flow eventHandlers. */ - public eventHandlers: google.cloud.dialogflow.cx.v3beta1.IEventHandler[]; + namespace FulfillmentResponse { - /** Flow nluSettings. */ - public nluSettings?: (google.cloud.dialogflow.cx.v3beta1.INluSettings|null); + /** MergeBehavior enum. */ + enum MergeBehavior { + MERGE_BEHAVIOR_UNSPECIFIED = 0, + APPEND = 1, + REPLACE = 2 + } + } + } + + /** Properties of a PageInfo. */ + interface IPageInfo { + + /** PageInfo currentPage */ + currentPage?: (string|null); + + /** PageInfo formInfo */ + formInfo?: (google.cloud.dialogflow.cx.v3.PageInfo.IFormInfo|null); + } + + /** Represents a PageInfo. */ + class PageInfo implements IPageInfo { /** - * Creates a new Flow instance using the specified properties. + * Constructs a new PageInfo. * @param [properties] Properties to set - * @returns Flow instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IFlow): google.cloud.dialogflow.cx.v3beta1.Flow; + constructor(properties?: google.cloud.dialogflow.cx.v3.IPageInfo); + + /** PageInfo currentPage. */ + public currentPage: string; + + /** PageInfo formInfo. */ + public formInfo?: (google.cloud.dialogflow.cx.v3.PageInfo.IFormInfo|null); /** - * Encodes the specified Flow message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Flow.verify|verify} messages. - * @param message Flow message or plain object to encode + * Creates a new PageInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns PageInfo instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.IPageInfo): google.cloud.dialogflow.cx.v3.PageInfo; + + /** + * Encodes the specified PageInfo message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.PageInfo.verify|verify} messages. + * @param message PageInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IFlow, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IPageInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Flow message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Flow.verify|verify} messages. - * @param message Flow message or plain object to encode + * Encodes the specified PageInfo message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.PageInfo.verify|verify} messages. + * @param message PageInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IFlow, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IPageInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Flow message from the specified reader or buffer. + * Decodes a PageInfo message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Flow + * @returns PageInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.Flow; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.PageInfo; /** - * Decodes a Flow message from the specified reader or buffer, length delimited. + * Decodes a PageInfo message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Flow + * @returns PageInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.Flow; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.PageInfo; /** - * Verifies a Flow message. + * Verifies a PageInfo message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Flow message from a plain object. Also converts values to their respective internal types. + * Creates a PageInfo message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Flow + * @returns PageInfo */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.Flow; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.PageInfo; /** - * Creates a plain object from a Flow message. Also converts values to other types if specified. - * @param message Flow + * Creates a plain object from a PageInfo message. Also converts values to other types if specified. + * @param message PageInfo * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.Flow, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.PageInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Flow to JSON. + * Converts this PageInfo to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CreateFlowRequest. */ - interface ICreateFlowRequest { + namespace PageInfo { - /** CreateFlowRequest parent */ - parent?: (string|null); + /** Properties of a FormInfo. */ + interface IFormInfo { - /** CreateFlowRequest flow */ - flow?: (google.cloud.dialogflow.cx.v3beta1.IFlow|null); + /** FormInfo parameterInfo */ + parameterInfo?: (google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.IParameterInfo[]|null); + } - /** CreateFlowRequest languageCode */ - languageCode?: (string|null); - } + /** Represents a FormInfo. */ + class FormInfo implements IFormInfo { - /** Represents a CreateFlowRequest. */ - class CreateFlowRequest implements ICreateFlowRequest { + /** + * Constructs a new FormInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.PageInfo.IFormInfo); - /** - * Constructs a new CreateFlowRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ICreateFlowRequest); + /** FormInfo parameterInfo. */ + public parameterInfo: google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.IParameterInfo[]; - /** CreateFlowRequest parent. */ - public parent: string; + /** + * Creates a new FormInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns FormInfo instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.PageInfo.IFormInfo): google.cloud.dialogflow.cx.v3.PageInfo.FormInfo; - /** CreateFlowRequest flow. */ - public flow?: (google.cloud.dialogflow.cx.v3beta1.IFlow|null); + /** + * Encodes the specified FormInfo message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.verify|verify} messages. + * @param message FormInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.PageInfo.IFormInfo, writer?: $protobuf.Writer): $protobuf.Writer; - /** CreateFlowRequest languageCode. */ - public languageCode: string; + /** + * Encodes the specified FormInfo message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.verify|verify} messages. + * @param message FormInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.PageInfo.IFormInfo, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a new CreateFlowRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateFlowRequest instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ICreateFlowRequest): google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest; + /** + * Decodes a FormInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FormInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.PageInfo.FormInfo; - /** - * Encodes the specified CreateFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest.verify|verify} messages. - * @param message CreateFlowRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.ICreateFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a FormInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FormInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.PageInfo.FormInfo; - /** - * Encodes the specified CreateFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest.verify|verify} messages. - * @param message CreateFlowRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ICreateFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Verifies a FormInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Decodes a CreateFlowRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateFlowRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest; + /** + * Creates a FormInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FormInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.PageInfo.FormInfo; - /** - * Decodes a CreateFlowRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateFlowRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest; + /** + * Creates a plain object from a FormInfo message. Also converts values to other types if specified. + * @param message FormInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.PageInfo.FormInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Verifies a CreateFlowRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Converts this FormInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Creates a CreateFlowRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateFlowRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest; + namespace FormInfo { - /** - * Creates a plain object from a CreateFlowRequest message. Also converts values to other types if specified. - * @param message CreateFlowRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Properties of a ParameterInfo. */ + interface IParameterInfo { - /** - * Converts this CreateFlowRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** ParameterInfo displayName */ + displayName?: (string|null); + + /** ParameterInfo required */ + required?: (boolean|null); + + /** ParameterInfo state */ + state?: (google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.ParameterState|keyof typeof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.ParameterState|null); + + /** ParameterInfo value */ + value?: (google.protobuf.IValue|null); + + /** ParameterInfo justCollected */ + justCollected?: (boolean|null); + } + + /** Represents a ParameterInfo. */ + class ParameterInfo implements IParameterInfo { + + /** + * Constructs a new ParameterInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.IParameterInfo); + + /** ParameterInfo displayName. */ + public displayName: string; + + /** ParameterInfo required. */ + public required: boolean; + + /** ParameterInfo state. */ + public state: (google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.ParameterState|keyof typeof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.ParameterState); + + /** ParameterInfo value. */ + public value?: (google.protobuf.IValue|null); + + /** ParameterInfo justCollected. */ + public justCollected: boolean; + + /** + * Creates a new ParameterInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns ParameterInfo instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.IParameterInfo): google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo; + + /** + * Encodes the specified ParameterInfo message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.verify|verify} messages. + * @param message ParameterInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.IParameterInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ParameterInfo message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.verify|verify} messages. + * @param message ParameterInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.IParameterInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ParameterInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ParameterInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo; + + /** + * Decodes a ParameterInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ParameterInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo; + + /** + * Verifies a ParameterInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ParameterInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ParameterInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo; + + /** + * Creates a plain object from a ParameterInfo message. Also converts values to other types if specified. + * @param message ParameterInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ParameterInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace ParameterInfo { + + /** ParameterState enum. */ + enum ParameterState { + PARAMETER_STATE_UNSPECIFIED = 0, + EMPTY = 1, + INVALID = 2, + FILLED = 3 + } + } + } } - /** Properties of a DeleteFlowRequest. */ - interface IDeleteFlowRequest { + /** Properties of a SessionInfo. */ + interface ISessionInfo { - /** DeleteFlowRequest name */ - name?: (string|null); + /** SessionInfo session */ + session?: (string|null); - /** DeleteFlowRequest force */ - force?: (boolean|null); + /** SessionInfo parameters */ + parameters?: ({ [k: string]: google.protobuf.IValue }|null); } - /** Represents a DeleteFlowRequest. */ - class DeleteFlowRequest implements IDeleteFlowRequest { + /** Represents a SessionInfo. */ + class SessionInfo implements ISessionInfo { /** - * Constructs a new DeleteFlowRequest. + * Constructs a new SessionInfo. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IDeleteFlowRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3.ISessionInfo); - /** DeleteFlowRequest name. */ - public name: string; + /** SessionInfo session. */ + public session: string; - /** DeleteFlowRequest force. */ - public force: boolean; + /** SessionInfo parameters. */ + public parameters: { [k: string]: google.protobuf.IValue }; /** - * Creates a new DeleteFlowRequest instance using the specified properties. + * Creates a new SessionInfo instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteFlowRequest instance + * @returns SessionInfo instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IDeleteFlowRequest): google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3.ISessionInfo): google.cloud.dialogflow.cx.v3.SessionInfo; /** - * Encodes the specified DeleteFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest.verify|verify} messages. - * @param message DeleteFlowRequest message or plain object to encode + * Encodes the specified SessionInfo message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SessionInfo.verify|verify} messages. + * @param message SessionInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IDeleteFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.ISessionInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest.verify|verify} messages. - * @param message DeleteFlowRequest message or plain object to encode + * Encodes the specified SessionInfo message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SessionInfo.verify|verify} messages. + * @param message SessionInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IDeleteFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ISessionInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteFlowRequest message from the specified reader or buffer. + * Decodes a SessionInfo message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteFlowRequest + * @returns SessionInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.SessionInfo; /** - * Decodes a DeleteFlowRequest message from the specified reader or buffer, length delimited. + * Decodes a SessionInfo message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteFlowRequest + * @returns SessionInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.SessionInfo; /** - * Verifies a DeleteFlowRequest message. + * Verifies a SessionInfo message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DeleteFlowRequest message from a plain object. Also converts values to their respective internal types. + * Creates a SessionInfo message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteFlowRequest + * @returns SessionInfo */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.SessionInfo; /** - * Creates a plain object from a DeleteFlowRequest message. Also converts values to other types if specified. - * @param message DeleteFlowRequest + * Creates a plain object from a SessionInfo message. Also converts values to other types if specified. + * @param message SessionInfo * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.SessionInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteFlowRequest to JSON. + * Converts this SessionInfo to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } + } - /** Properties of a ListFlowsRequest. */ - interface IListFlowsRequest { - - /** ListFlowsRequest parent */ - parent?: (string|null); + /** Namespace v3beta1. */ + namespace v3beta1 { - /** ListFlowsRequest pageSize */ - pageSize?: (number|null); + /** Represents an Agents */ + class Agents extends $protobuf.rpc.Service { - /** ListFlowsRequest pageToken */ - pageToken?: (string|null); - - /** ListFlowsRequest languageCode */ - languageCode?: (string|null); - } + /** + * Constructs a new Agents service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); - /** Represents a ListFlowsRequest. */ - class ListFlowsRequest implements IListFlowsRequest { + /** + * Creates new Agents service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Agents; /** - * Constructs a new ListFlowsRequest. - * @param [properties] Properties to set + * Calls ListAgents. + * @param request ListAgentsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListAgentsResponse */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IListFlowsRequest); + public listAgents(request: google.cloud.dialogflow.cx.v3beta1.IListAgentsRequest, callback: google.cloud.dialogflow.cx.v3beta1.Agents.ListAgentsCallback): void; - /** ListFlowsRequest parent. */ - public parent: string; + /** + * Calls ListAgents. + * @param request ListAgentsRequest message or plain object + * @returns Promise + */ + public listAgents(request: google.cloud.dialogflow.cx.v3beta1.IListAgentsRequest): Promise; - /** ListFlowsRequest pageSize. */ - public pageSize: number; + /** + * Calls GetAgent. + * @param request GetAgentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Agent + */ + public getAgent(request: google.cloud.dialogflow.cx.v3beta1.IGetAgentRequest, callback: google.cloud.dialogflow.cx.v3beta1.Agents.GetAgentCallback): void; - /** ListFlowsRequest pageToken. */ - public pageToken: string; + /** + * Calls GetAgent. + * @param request GetAgentRequest message or plain object + * @returns Promise + */ + public getAgent(request: google.cloud.dialogflow.cx.v3beta1.IGetAgentRequest): Promise; - /** ListFlowsRequest languageCode. */ - public languageCode: string; + /** + * Calls CreateAgent. + * @param request CreateAgentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Agent + */ + public createAgent(request: google.cloud.dialogflow.cx.v3beta1.ICreateAgentRequest, callback: google.cloud.dialogflow.cx.v3beta1.Agents.CreateAgentCallback): void; /** - * Creates a new ListFlowsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListFlowsRequest instance + * Calls CreateAgent. + * @param request CreateAgentRequest message or plain object + * @returns Promise */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IListFlowsRequest): google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest; + public createAgent(request: google.cloud.dialogflow.cx.v3beta1.ICreateAgentRequest): Promise; /** - * Encodes the specified ListFlowsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest.verify|verify} messages. - * @param message ListFlowsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls UpdateAgent. + * @param request UpdateAgentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Agent */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IListFlowsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public updateAgent(request: google.cloud.dialogflow.cx.v3beta1.IUpdateAgentRequest, callback: google.cloud.dialogflow.cx.v3beta1.Agents.UpdateAgentCallback): void; /** - * Encodes the specified ListFlowsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest.verify|verify} messages. - * @param message ListFlowsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls UpdateAgent. + * @param request UpdateAgentRequest message or plain object + * @returns Promise */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IListFlowsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public updateAgent(request: google.cloud.dialogflow.cx.v3beta1.IUpdateAgentRequest): Promise; /** - * Decodes a ListFlowsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListFlowsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls DeleteAgent. + * @param request DeleteAgentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest; + public deleteAgent(request: google.cloud.dialogflow.cx.v3beta1.IDeleteAgentRequest, callback: google.cloud.dialogflow.cx.v3beta1.Agents.DeleteAgentCallback): void; /** - * Decodes a ListFlowsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListFlowsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls DeleteAgent. + * @param request DeleteAgentRequest message or plain object + * @returns Promise */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest; + public deleteAgent(request: google.cloud.dialogflow.cx.v3beta1.IDeleteAgentRequest): Promise; /** - * Verifies a ListFlowsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls ExportAgent. + * @param request ExportAgentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - public static verify(message: { [k: string]: any }): (string|null); + public exportAgent(request: google.cloud.dialogflow.cx.v3beta1.IExportAgentRequest, callback: google.cloud.dialogflow.cx.v3beta1.Agents.ExportAgentCallback): void; /** - * Creates a ListFlowsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListFlowsRequest + * Calls ExportAgent. + * @param request ExportAgentRequest message or plain object + * @returns Promise */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest; + public exportAgent(request: google.cloud.dialogflow.cx.v3beta1.IExportAgentRequest): Promise; /** - * Creates a plain object from a ListFlowsRequest message. Also converts values to other types if specified. - * @param message ListFlowsRequest - * @param [options] Conversion options - * @returns Plain object + * Calls RestoreAgent. + * @param request RestoreAgentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public restoreAgent(request: google.cloud.dialogflow.cx.v3beta1.IRestoreAgentRequest, callback: google.cloud.dialogflow.cx.v3beta1.Agents.RestoreAgentCallback): void; /** - * Converts this ListFlowsRequest to JSON. - * @returns JSON object + * Calls RestoreAgent. + * @param request RestoreAgentRequest message or plain object + * @returns Promise */ - public toJSON(): { [k: string]: any }; + public restoreAgent(request: google.cloud.dialogflow.cx.v3beta1.IRestoreAgentRequest): Promise; } - /** Properties of a ListFlowsResponse. */ - interface IListFlowsResponse { + namespace Agents { - /** ListFlowsResponse flows */ - flows?: (google.cloud.dialogflow.cx.v3beta1.IFlow[]|null); + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Agents#listAgents}. + * @param error Error, if any + * @param [response] ListAgentsResponse + */ + type ListAgentsCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse) => void; - /** ListFlowsResponse nextPageToken */ - nextPageToken?: (string|null); + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Agents#getAgent}. + * @param error Error, if any + * @param [response] Agent + */ + type GetAgentCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.Agent) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Agents#createAgent}. + * @param error Error, if any + * @param [response] Agent + */ + type CreateAgentCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.Agent) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Agents#updateAgent}. + * @param error Error, if any + * @param [response] Agent + */ + type UpdateAgentCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.Agent) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Agents#deleteAgent}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteAgentCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Agents#exportAgent}. + * @param error Error, if any + * @param [response] Operation + */ + type ExportAgentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Agents#restoreAgent}. + * @param error Error, if any + * @param [response] Operation + */ + type RestoreAgentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; } - /** Represents a ListFlowsResponse. */ - class ListFlowsResponse implements IListFlowsResponse { + /** Properties of a SpeechToTextSettings. */ + interface ISpeechToTextSettings { + + /** SpeechToTextSettings enableSpeechAdaptation */ + enableSpeechAdaptation?: (boolean|null); + } + + /** Represents a SpeechToTextSettings. */ + class SpeechToTextSettings implements ISpeechToTextSettings { /** - * Constructs a new ListFlowsResponse. + * Constructs a new SpeechToTextSettings. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IListFlowsResponse); - - /** ListFlowsResponse flows. */ - public flows: google.cloud.dialogflow.cx.v3beta1.IFlow[]; + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ISpeechToTextSettings); - /** ListFlowsResponse nextPageToken. */ - public nextPageToken: string; + /** SpeechToTextSettings enableSpeechAdaptation. */ + public enableSpeechAdaptation: boolean; /** - * Creates a new ListFlowsResponse instance using the specified properties. + * Creates a new SpeechToTextSettings instance using the specified properties. * @param [properties] Properties to set - * @returns ListFlowsResponse instance + * @returns SpeechToTextSettings instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IListFlowsResponse): google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ISpeechToTextSettings): google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings; /** - * Encodes the specified ListFlowsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse.verify|verify} messages. - * @param message ListFlowsResponse message or plain object to encode + * Encodes the specified SpeechToTextSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings.verify|verify} messages. + * @param message SpeechToTextSettings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IListFlowsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.ISpeechToTextSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListFlowsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse.verify|verify} messages. - * @param message ListFlowsResponse message or plain object to encode + * Encodes the specified SpeechToTextSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings.verify|verify} messages. + * @param message SpeechToTextSettings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IListFlowsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ISpeechToTextSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListFlowsResponse message from the specified reader or buffer. + * Decodes a SpeechToTextSettings message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListFlowsResponse + * @returns SpeechToTextSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings; /** - * Decodes a ListFlowsResponse message from the specified reader or buffer, length delimited. + * Decodes a SpeechToTextSettings message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListFlowsResponse + * @returns SpeechToTextSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings; /** - * Verifies a ListFlowsResponse message. + * Verifies a SpeechToTextSettings message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListFlowsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a SpeechToTextSettings message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListFlowsResponse + * @returns SpeechToTextSettings */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings; /** - * Creates a plain object from a ListFlowsResponse message. Also converts values to other types if specified. - * @param message ListFlowsResponse + * Creates a plain object from a SpeechToTextSettings message. Also converts values to other types if specified. + * @param message SpeechToTextSettings * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListFlowsResponse to JSON. + * Converts this SpeechToTextSettings to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetFlowRequest. */ - interface IGetFlowRequest { + /** Properties of an Agent. */ + interface IAgent { - /** GetFlowRequest name */ + /** Agent name */ name?: (string|null); - /** GetFlowRequest languageCode */ - languageCode?: (string|null); + /** Agent displayName */ + displayName?: (string|null); + + /** Agent defaultLanguageCode */ + defaultLanguageCode?: (string|null); + + /** Agent timeZone */ + timeZone?: (string|null); + + /** Agent description */ + description?: (string|null); + + /** Agent avatarUri */ + avatarUri?: (string|null); + + /** Agent speechToTextSettings */ + speechToTextSettings?: (google.cloud.dialogflow.cx.v3beta1.ISpeechToTextSettings|null); + + /** Agent startFlow */ + startFlow?: (string|null); + + /** Agent enableStackdriverLogging */ + enableStackdriverLogging?: (boolean|null); + + /** Agent enableSpellCorrection */ + enableSpellCorrection?: (boolean|null); } - /** Represents a GetFlowRequest. */ - class GetFlowRequest implements IGetFlowRequest { + /** Represents an Agent. */ + class Agent implements IAgent { /** - * Constructs a new GetFlowRequest. + * Constructs a new Agent. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IGetFlowRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IAgent); - /** GetFlowRequest name. */ + /** Agent name. */ public name: string; - /** GetFlowRequest languageCode. */ - public languageCode: string; + /** Agent displayName. */ + public displayName: string; + + /** Agent defaultLanguageCode. */ + public defaultLanguageCode: string; + + /** Agent timeZone. */ + public timeZone: string; + + /** Agent description. */ + public description: string; + + /** Agent avatarUri. */ + public avatarUri: string; + + /** Agent speechToTextSettings. */ + public speechToTextSettings?: (google.cloud.dialogflow.cx.v3beta1.ISpeechToTextSettings|null); + + /** Agent startFlow. */ + public startFlow: string; + + /** Agent enableStackdriverLogging. */ + public enableStackdriverLogging: boolean; + + /** Agent enableSpellCorrection. */ + public enableSpellCorrection: boolean; /** - * Creates a new GetFlowRequest instance using the specified properties. + * Creates a new Agent instance using the specified properties. * @param [properties] Properties to set - * @returns GetFlowRequest instance + * @returns Agent instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IGetFlowRequest): google.cloud.dialogflow.cx.v3beta1.GetFlowRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IAgent): google.cloud.dialogflow.cx.v3beta1.Agent; /** - * Encodes the specified GetFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetFlowRequest.verify|verify} messages. - * @param message GetFlowRequest message or plain object to encode + * Encodes the specified Agent message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Agent.verify|verify} messages. + * @param message Agent message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IGetFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IAgent, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetFlowRequest.verify|verify} messages. - * @param message GetFlowRequest message or plain object to encode + * Encodes the specified Agent message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Agent.verify|verify} messages. + * @param message Agent message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IGetFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IAgent, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetFlowRequest message from the specified reader or buffer. + * Decodes an Agent message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetFlowRequest + * @returns Agent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.GetFlowRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.Agent; /** - * Decodes a GetFlowRequest message from the specified reader or buffer, length delimited. + * Decodes an Agent message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetFlowRequest + * @returns Agent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.GetFlowRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.Agent; /** - * Verifies a GetFlowRequest message. + * Verifies an Agent message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetFlowRequest message from a plain object. Also converts values to their respective internal types. + * Creates an Agent message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetFlowRequest + * @returns Agent */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.GetFlowRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.Agent; /** - * Creates a plain object from a GetFlowRequest message. Also converts values to other types if specified. - * @param message GetFlowRequest + * Creates a plain object from an Agent message. Also converts values to other types if specified. + * @param message Agent * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.GetFlowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.Agent, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetFlowRequest to JSON. + * Converts this Agent to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an UpdateFlowRequest. */ - interface IUpdateFlowRequest { + /** Properties of a ListAgentsRequest. */ + interface IListAgentsRequest { - /** UpdateFlowRequest flow */ - flow?: (google.cloud.dialogflow.cx.v3beta1.IFlow|null); + /** ListAgentsRequest parent */ + parent?: (string|null); - /** UpdateFlowRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** ListAgentsRequest pageSize */ + pageSize?: (number|null); - /** UpdateFlowRequest languageCode */ - languageCode?: (string|null); + /** ListAgentsRequest pageToken */ + pageToken?: (string|null); } - /** Represents an UpdateFlowRequest. */ - class UpdateFlowRequest implements IUpdateFlowRequest { + /** Represents a ListAgentsRequest. */ + class ListAgentsRequest implements IListAgentsRequest { /** - * Constructs a new UpdateFlowRequest. + * Constructs a new ListAgentsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IUpdateFlowRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IListAgentsRequest); - /** UpdateFlowRequest flow. */ - public flow?: (google.cloud.dialogflow.cx.v3beta1.IFlow|null); + /** ListAgentsRequest parent. */ + public parent: string; - /** UpdateFlowRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** ListAgentsRequest pageSize. */ + public pageSize: number; - /** UpdateFlowRequest languageCode. */ - public languageCode: string; + /** ListAgentsRequest pageToken. */ + public pageToken: string; /** - * Creates a new UpdateFlowRequest instance using the specified properties. + * Creates a new ListAgentsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateFlowRequest instance + * @returns ListAgentsRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IUpdateFlowRequest): google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IListAgentsRequest): google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest; /** - * Encodes the specified UpdateFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest.verify|verify} messages. - * @param message UpdateFlowRequest message or plain object to encode + * Encodes the specified ListAgentsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest.verify|verify} messages. + * @param message ListAgentsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IUpdateFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IListAgentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest.verify|verify} messages. - * @param message UpdateFlowRequest message or plain object to encode + * Encodes the specified ListAgentsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest.verify|verify} messages. + * @param message ListAgentsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IUpdateFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IListAgentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateFlowRequest message from the specified reader or buffer. + * Decodes a ListAgentsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateFlowRequest + * @returns ListAgentsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest; /** - * Decodes an UpdateFlowRequest message from the specified reader or buffer, length delimited. + * Decodes a ListAgentsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateFlowRequest + * @returns ListAgentsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest; /** - * Verifies an UpdateFlowRequest message. + * Verifies a ListAgentsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an UpdateFlowRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListAgentsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateFlowRequest + * @returns ListAgentsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest; /** - * Creates a plain object from an UpdateFlowRequest message. Also converts values to other types if specified. - * @param message UpdateFlowRequest + * Creates a plain object from a ListAgentsRequest message. Also converts values to other types if specified. + * @param message ListAgentsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateFlowRequest to JSON. + * Converts this ListAgentsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a TrainFlowRequest. */ - interface ITrainFlowRequest { + /** Properties of a ListAgentsResponse. */ + interface IListAgentsResponse { - /** TrainFlowRequest name */ - name?: (string|null); + /** ListAgentsResponse agents */ + agents?: (google.cloud.dialogflow.cx.v3beta1.IAgent[]|null); + + /** ListAgentsResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a TrainFlowRequest. */ - class TrainFlowRequest implements ITrainFlowRequest { + /** Represents a ListAgentsResponse. */ + class ListAgentsResponse implements IListAgentsResponse { /** - * Constructs a new TrainFlowRequest. + * Constructs a new ListAgentsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ITrainFlowRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IListAgentsResponse); - /** TrainFlowRequest name. */ - public name: string; + /** ListAgentsResponse agents. */ + public agents: google.cloud.dialogflow.cx.v3beta1.IAgent[]; + + /** ListAgentsResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new TrainFlowRequest instance using the specified properties. + * Creates a new ListAgentsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns TrainFlowRequest instance + * @returns ListAgentsResponse instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ITrainFlowRequest): google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IListAgentsResponse): google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse; /** - * Encodes the specified TrainFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest.verify|verify} messages. - * @param message TrainFlowRequest message or plain object to encode + * Encodes the specified ListAgentsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse.verify|verify} messages. + * @param message ListAgentsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.ITrainFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IListAgentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TrainFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest.verify|verify} messages. - * @param message TrainFlowRequest message or plain object to encode + * Encodes the specified ListAgentsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse.verify|verify} messages. + * @param message ListAgentsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ITrainFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IListAgentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TrainFlowRequest message from the specified reader or buffer. + * Decodes a ListAgentsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TrainFlowRequest + * @returns ListAgentsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse; /** - * Decodes a TrainFlowRequest message from the specified reader or buffer, length delimited. + * Decodes a ListAgentsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TrainFlowRequest + * @returns ListAgentsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse; /** - * Verifies a TrainFlowRequest message. + * Verifies a ListAgentsResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a TrainFlowRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListAgentsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TrainFlowRequest + * @returns ListAgentsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse; /** - * Creates a plain object from a TrainFlowRequest message. Also converts values to other types if specified. - * @param message TrainFlowRequest + * Creates a plain object from a ListAgentsResponse message. Also converts values to other types if specified. + * @param message ListAgentsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TrainFlowRequest to JSON. + * Converts this ListAgentsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Represents a Pages */ - class Pages extends $protobuf.rpc.Service { + /** Properties of a GetAgentRequest. */ + interface IGetAgentRequest { - /** - * Constructs a new Pages service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + /** GetAgentRequest name */ + name?: (string|null); + } - /** - * Creates new Pages service using the specified rpc implementation. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - * @returns RPC service. Useful where requests and/or responses are streamed. - */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Pages; + /** Represents a GetAgentRequest. */ + class GetAgentRequest implements IGetAgentRequest { /** - * Calls ListPages. - * @param request ListPagesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListPagesResponse + * Constructs a new GetAgentRequest. + * @param [properties] Properties to set */ - public listPages(request: google.cloud.dialogflow.cx.v3beta1.IListPagesRequest, callback: google.cloud.dialogflow.cx.v3beta1.Pages.ListPagesCallback): void; + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IGetAgentRequest); + + /** GetAgentRequest name. */ + public name: string; /** - * Calls ListPages. - * @param request ListPagesRequest message or plain object - * @returns Promise + * Creates a new GetAgentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetAgentRequest instance */ - public listPages(request: google.cloud.dialogflow.cx.v3beta1.IListPagesRequest): Promise; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IGetAgentRequest): google.cloud.dialogflow.cx.v3beta1.GetAgentRequest; /** - * Calls GetPage. - * @param request GetPageRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Page + * Encodes the specified GetAgentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetAgentRequest.verify|verify} messages. + * @param message GetAgentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public getPage(request: google.cloud.dialogflow.cx.v3beta1.IGetPageRequest, callback: google.cloud.dialogflow.cx.v3beta1.Pages.GetPageCallback): void; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IGetAgentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls GetPage. - * @param request GetPageRequest message or plain object - * @returns Promise + * Encodes the specified GetAgentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetAgentRequest.verify|verify} messages. + * @param message GetAgentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public getPage(request: google.cloud.dialogflow.cx.v3beta1.IGetPageRequest): Promise; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IGetAgentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls CreatePage. - * @param request CreatePageRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Page + * Decodes a GetAgentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetAgentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public createPage(request: google.cloud.dialogflow.cx.v3beta1.ICreatePageRequest, callback: google.cloud.dialogflow.cx.v3beta1.Pages.CreatePageCallback): void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.GetAgentRequest; /** - * Calls CreatePage. - * @param request CreatePageRequest message or plain object - * @returns Promise + * Decodes a GetAgentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetAgentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public createPage(request: google.cloud.dialogflow.cx.v3beta1.ICreatePageRequest): Promise; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.GetAgentRequest; /** - * Calls UpdatePage. - * @param request UpdatePageRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Page + * Verifies a GetAgentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public updatePage(request: google.cloud.dialogflow.cx.v3beta1.IUpdatePageRequest, callback: google.cloud.dialogflow.cx.v3beta1.Pages.UpdatePageCallback): void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls UpdatePage. - * @param request UpdatePageRequest message or plain object - * @returns Promise + * Creates a GetAgentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetAgentRequest */ - public updatePage(request: google.cloud.dialogflow.cx.v3beta1.IUpdatePageRequest): Promise; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.GetAgentRequest; /** - * Calls DeletePage. - * @param request DeletePageRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty + * Creates a plain object from a GetAgentRequest message. Also converts values to other types if specified. + * @param message GetAgentRequest + * @param [options] Conversion options + * @returns Plain object */ - public deletePage(request: google.cloud.dialogflow.cx.v3beta1.IDeletePageRequest, callback: google.cloud.dialogflow.cx.v3beta1.Pages.DeletePageCallback): void; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.GetAgentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls DeletePage. - * @param request DeletePageRequest message or plain object - * @returns Promise + * Converts this GetAgentRequest to JSON. + * @returns JSON object */ - public deletePage(request: google.cloud.dialogflow.cx.v3beta1.IDeletePageRequest): Promise; + public toJSON(): { [k: string]: any }; } - namespace Pages { + /** Properties of a CreateAgentRequest. */ + interface ICreateAgentRequest { + + /** CreateAgentRequest parent */ + parent?: (string|null); + + /** CreateAgentRequest agent */ + agent?: (google.cloud.dialogflow.cx.v3beta1.IAgent|null); + } + + /** Represents a CreateAgentRequest. */ + class CreateAgentRequest implements ICreateAgentRequest { /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Pages#listPages}. - * @param error Error, if any - * @param [response] ListPagesResponse + * Constructs a new CreateAgentRequest. + * @param [properties] Properties to set */ - type ListPagesCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.ListPagesResponse) => void; + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ICreateAgentRequest); + + /** CreateAgentRequest parent. */ + public parent: string; + + /** CreateAgentRequest agent. */ + public agent?: (google.cloud.dialogflow.cx.v3beta1.IAgent|null); /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Pages#getPage}. - * @param error Error, if any - * @param [response] Page + * Creates a new CreateAgentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateAgentRequest instance */ - type GetPageCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.Page) => void; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ICreateAgentRequest): google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Pages#createPage}. - * @param error Error, if any - * @param [response] Page + * Encodes the specified CreateAgentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest.verify|verify} messages. + * @param message CreateAgentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type CreatePageCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.Page) => void; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.ICreateAgentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Pages#updatePage}. - * @param error Error, if any - * @param [response] Page + * Encodes the specified CreateAgentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest.verify|verify} messages. + * @param message CreateAgentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type UpdatePageCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.Page) => void; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ICreateAgentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Pages#deletePage}. - * @param error Error, if any - * @param [response] Empty + * Decodes a CreateAgentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateAgentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type DeletePageCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - } + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest; - /** Properties of a Page. */ - interface IPage { + /** + * Decodes a CreateAgentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateAgentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest; - /** Page name */ - name?: (string|null); + /** + * Verifies a CreateAgentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Page displayName */ - displayName?: (string|null); + /** + * Creates a CreateAgentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateAgentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest; - /** Page entryFulfillment */ - entryFulfillment?: (google.cloud.dialogflow.cx.v3beta1.IFulfillment|null); + /** + * Creates a plain object from a CreateAgentRequest message. Also converts values to other types if specified. + * @param message CreateAgentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Page form */ - form?: (google.cloud.dialogflow.cx.v3beta1.IForm|null); + /** + * Converts this CreateAgentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Page transitionRouteGroups */ - transitionRouteGroups?: (string[]|null); + /** Properties of an UpdateAgentRequest. */ + interface IUpdateAgentRequest { - /** Page transitionRoutes */ - transitionRoutes?: (google.cloud.dialogflow.cx.v3beta1.ITransitionRoute[]|null); + /** UpdateAgentRequest agent */ + agent?: (google.cloud.dialogflow.cx.v3beta1.IAgent|null); - /** Page eventHandlers */ - eventHandlers?: (google.cloud.dialogflow.cx.v3beta1.IEventHandler[]|null); + /** UpdateAgentRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); } - /** Represents a Page. */ - class Page implements IPage { + /** Represents an UpdateAgentRequest. */ + class UpdateAgentRequest implements IUpdateAgentRequest { /** - * Constructs a new Page. + * Constructs a new UpdateAgentRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IPage); - - /** Page name. */ - public name: string; - - /** Page displayName. */ - public displayName: string; - - /** Page entryFulfillment. */ - public entryFulfillment?: (google.cloud.dialogflow.cx.v3beta1.IFulfillment|null); - - /** Page form. */ - public form?: (google.cloud.dialogflow.cx.v3beta1.IForm|null); - - /** Page transitionRouteGroups. */ - public transitionRouteGroups: string[]; + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IUpdateAgentRequest); - /** Page transitionRoutes. */ - public transitionRoutes: google.cloud.dialogflow.cx.v3beta1.ITransitionRoute[]; + /** UpdateAgentRequest agent. */ + public agent?: (google.cloud.dialogflow.cx.v3beta1.IAgent|null); - /** Page eventHandlers. */ - public eventHandlers: google.cloud.dialogflow.cx.v3beta1.IEventHandler[]; + /** UpdateAgentRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); /** - * Creates a new Page instance using the specified properties. + * Creates a new UpdateAgentRequest instance using the specified properties. * @param [properties] Properties to set - * @returns Page instance + * @returns UpdateAgentRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IPage): google.cloud.dialogflow.cx.v3beta1.Page; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IUpdateAgentRequest): google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest; /** - * Encodes the specified Page message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Page.verify|verify} messages. - * @param message Page message or plain object to encode + * Encodes the specified UpdateAgentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest.verify|verify} messages. + * @param message UpdateAgentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IPage, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IUpdateAgentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Page message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Page.verify|verify} messages. - * @param message Page message or plain object to encode + * Encodes the specified UpdateAgentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest.verify|verify} messages. + * @param message UpdateAgentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IPage, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IUpdateAgentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Page message from the specified reader or buffer. + * Decodes an UpdateAgentRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Page + * @returns UpdateAgentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.Page; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest; /** - * Decodes a Page message from the specified reader or buffer, length delimited. + * Decodes an UpdateAgentRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Page + * @returns UpdateAgentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.Page; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest; /** - * Verifies a Page message. + * Verifies an UpdateAgentRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Page message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateAgentRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Page + * @returns UpdateAgentRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.Page; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest; /** - * Creates a plain object from a Page message. Also converts values to other types if specified. - * @param message Page + * Creates a plain object from an UpdateAgentRequest message. Also converts values to other types if specified. + * @param message UpdateAgentRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.Page, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Page to JSON. + * Converts this UpdateAgentRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a Form. */ - interface IForm { + /** Properties of a DeleteAgentRequest. */ + interface IDeleteAgentRequest { - /** Form parameters */ - parameters?: (google.cloud.dialogflow.cx.v3beta1.Form.IParameter[]|null); + /** DeleteAgentRequest name */ + name?: (string|null); } - /** Represents a Form. */ - class Form implements IForm { + /** Represents a DeleteAgentRequest. */ + class DeleteAgentRequest implements IDeleteAgentRequest { /** - * Constructs a new Form. + * Constructs a new DeleteAgentRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IForm); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IDeleteAgentRequest); - /** Form parameters. */ - public parameters: google.cloud.dialogflow.cx.v3beta1.Form.IParameter[]; + /** DeleteAgentRequest name. */ + public name: string; /** - * Creates a new Form instance using the specified properties. + * Creates a new DeleteAgentRequest instance using the specified properties. * @param [properties] Properties to set - * @returns Form instance + * @returns DeleteAgentRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IForm): google.cloud.dialogflow.cx.v3beta1.Form; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IDeleteAgentRequest): google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest; /** - * Encodes the specified Form message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Form.verify|verify} messages. - * @param message Form message or plain object to encode + * Encodes the specified DeleteAgentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest.verify|verify} messages. + * @param message DeleteAgentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IForm, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IDeleteAgentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Form message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Form.verify|verify} messages. - * @param message Form message or plain object to encode + * Encodes the specified DeleteAgentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest.verify|verify} messages. + * @param message DeleteAgentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IForm, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IDeleteAgentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Form message from the specified reader or buffer. + * Decodes a DeleteAgentRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Form + * @returns DeleteAgentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.Form; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest; /** - * Decodes a Form message from the specified reader or buffer, length delimited. + * Decodes a DeleteAgentRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Form + * @returns DeleteAgentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.Form; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest; /** - * Verifies a Form message. + * Verifies a DeleteAgentRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Form message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteAgentRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Form + * @returns DeleteAgentRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.Form; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest; /** - * Creates a plain object from a Form message. Also converts values to other types if specified. - * @param message Form + * Creates a plain object from a DeleteAgentRequest message. Also converts values to other types if specified. + * @param message DeleteAgentRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.Form, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Form to JSON. + * Converts this DeleteAgentRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace Form { + /** Properties of an ExportAgentRequest. */ + interface IExportAgentRequest { - /** Properties of a Parameter. */ - interface IParameter { + /** ExportAgentRequest name */ + name?: (string|null); - /** Parameter displayName */ - displayName?: (string|null); + /** ExportAgentRequest agentUri */ + agentUri?: (string|null); + } - /** Parameter required */ - required?: (boolean|null); + /** Represents an ExportAgentRequest. */ + class ExportAgentRequest implements IExportAgentRequest { - /** Parameter entityType */ - entityType?: (string|null); + /** + * Constructs a new ExportAgentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IExportAgentRequest); - /** Parameter isList */ - isList?: (boolean|null); + /** ExportAgentRequest name. */ + public name: string; - /** Parameter fillBehavior */ - fillBehavior?: (google.cloud.dialogflow.cx.v3beta1.Form.Parameter.IFillBehavior|null); + /** ExportAgentRequest agentUri. */ + public agentUri: string; - /** Parameter defaultValue */ - defaultValue?: (google.protobuf.IValue|null); + /** + * Creates a new ExportAgentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ExportAgentRequest instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IExportAgentRequest): google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest; - /** Parameter redact */ - redact?: (boolean|null); - } + /** + * Encodes the specified ExportAgentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.verify|verify} messages. + * @param message ExportAgentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IExportAgentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** Represents a Parameter. */ - class Parameter implements IParameter { + /** + * Encodes the specified ExportAgentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.verify|verify} messages. + * @param message ExportAgentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IExportAgentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Constructs a new Parameter. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.Form.IParameter); + /** + * Decodes an ExportAgentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExportAgentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest; - /** Parameter displayName. */ - public displayName: string; + /** + * Decodes an ExportAgentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExportAgentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest; - /** Parameter required. */ - public required: boolean; + /** + * Verifies an ExportAgentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Parameter entityType. */ - public entityType: string; + /** + * Creates an ExportAgentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExportAgentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest; - /** Parameter isList. */ - public isList: boolean; + /** + * Creates a plain object from an ExportAgentRequest message. Also converts values to other types if specified. + * @param message ExportAgentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Parameter fillBehavior. */ - public fillBehavior?: (google.cloud.dialogflow.cx.v3beta1.Form.Parameter.IFillBehavior|null); + /** + * Converts this ExportAgentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Parameter defaultValue. */ - public defaultValue?: (google.protobuf.IValue|null); - - /** Parameter redact. */ - public redact: boolean; - - /** - * Creates a new Parameter instance using the specified properties. - * @param [properties] Properties to set - * @returns Parameter instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.Form.IParameter): google.cloud.dialogflow.cx.v3beta1.Form.Parameter; - - /** - * Encodes the specified Parameter message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Form.Parameter.verify|verify} messages. - * @param message Parameter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.Form.IParameter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Parameter message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Form.Parameter.verify|verify} messages. - * @param message Parameter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.Form.IParameter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Parameter message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Parameter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.Form.Parameter; - - /** - * Decodes a Parameter message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Parameter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.Form.Parameter; - - /** - * Verifies a Parameter message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Parameter message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Parameter - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.Form.Parameter; - - /** - * Creates a plain object from a Parameter message. Also converts values to other types if specified. - * @param message Parameter - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.Form.Parameter, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Parameter to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace Parameter { - - /** Properties of a FillBehavior. */ - interface IFillBehavior { - - /** FillBehavior initialPromptFulfillment */ - initialPromptFulfillment?: (google.cloud.dialogflow.cx.v3beta1.IFulfillment|null); - - /** FillBehavior repromptEventHandlers */ - repromptEventHandlers?: (google.cloud.dialogflow.cx.v3beta1.IEventHandler[]|null); - } - - /** Represents a FillBehavior. */ - class FillBehavior implements IFillBehavior { - - /** - * Constructs a new FillBehavior. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.Form.Parameter.IFillBehavior); - - /** FillBehavior initialPromptFulfillment. */ - public initialPromptFulfillment?: (google.cloud.dialogflow.cx.v3beta1.IFulfillment|null); - - /** FillBehavior repromptEventHandlers. */ - public repromptEventHandlers: google.cloud.dialogflow.cx.v3beta1.IEventHandler[]; - - /** - * Creates a new FillBehavior instance using the specified properties. - * @param [properties] Properties to set - * @returns FillBehavior instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.Form.Parameter.IFillBehavior): google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior; - - /** - * Encodes the specified FillBehavior message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.verify|verify} messages. - * @param message FillBehavior message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.Form.Parameter.IFillBehavior, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FillBehavior message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.verify|verify} messages. - * @param message FillBehavior message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.Form.Parameter.IFillBehavior, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FillBehavior message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FillBehavior - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior; - - /** - * Decodes a FillBehavior message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FillBehavior - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior; - - /** - * Verifies a FillBehavior message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FillBehavior message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FillBehavior - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior; - - /** - * Creates a plain object from a FillBehavior message. Also converts values to other types if specified. - * @param message FillBehavior - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FillBehavior to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - } - - /** Properties of an EventHandler. */ - interface IEventHandler { - - /** EventHandler name */ - name?: (string|null); - - /** EventHandler event */ - event?: (string|null); - - /** EventHandler triggerFulfillment */ - triggerFulfillment?: (google.cloud.dialogflow.cx.v3beta1.IFulfillment|null); + /** Properties of an ExportAgentResponse. */ + interface IExportAgentResponse { - /** EventHandler targetPage */ - targetPage?: (string|null); + /** ExportAgentResponse agentUri */ + agentUri?: (string|null); - /** EventHandler targetFlow */ - targetFlow?: (string|null); + /** ExportAgentResponse agentContent */ + agentContent?: (Uint8Array|string|null); } - /** Represents an EventHandler. */ - class EventHandler implements IEventHandler { + /** Represents an ExportAgentResponse. */ + class ExportAgentResponse implements IExportAgentResponse { /** - * Constructs a new EventHandler. + * Constructs a new ExportAgentResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IEventHandler); - - /** EventHandler name. */ - public name: string; - - /** EventHandler event. */ - public event: string; - - /** EventHandler triggerFulfillment. */ - public triggerFulfillment?: (google.cloud.dialogflow.cx.v3beta1.IFulfillment|null); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IExportAgentResponse); - /** EventHandler targetPage. */ - public targetPage: string; + /** ExportAgentResponse agentUri. */ + public agentUri: string; - /** EventHandler targetFlow. */ - public targetFlow: string; + /** ExportAgentResponse agentContent. */ + public agentContent: (Uint8Array|string); - /** EventHandler target. */ - public target?: ("targetPage"|"targetFlow"); + /** ExportAgentResponse agent. */ + public agent?: ("agentUri"|"agentContent"); /** - * Creates a new EventHandler instance using the specified properties. + * Creates a new ExportAgentResponse instance using the specified properties. * @param [properties] Properties to set - * @returns EventHandler instance + * @returns ExportAgentResponse instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IEventHandler): google.cloud.dialogflow.cx.v3beta1.EventHandler; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IExportAgentResponse): google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse; /** - * Encodes the specified EventHandler message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.EventHandler.verify|verify} messages. - * @param message EventHandler message or plain object to encode + * Encodes the specified ExportAgentResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse.verify|verify} messages. + * @param message ExportAgentResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IEventHandler, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IExportAgentResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified EventHandler message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.EventHandler.verify|verify} messages. - * @param message EventHandler message or plain object to encode + * Encodes the specified ExportAgentResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse.verify|verify} messages. + * @param message ExportAgentResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IEventHandler, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IExportAgentResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an EventHandler message from the specified reader or buffer. + * Decodes an ExportAgentResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns EventHandler + * @returns ExportAgentResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.EventHandler; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse; /** - * Decodes an EventHandler message from the specified reader or buffer, length delimited. + * Decodes an ExportAgentResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns EventHandler + * @returns ExportAgentResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.EventHandler; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse; /** - * Verifies an EventHandler message. + * Verifies an ExportAgentResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an EventHandler message from a plain object. Also converts values to their respective internal types. + * Creates an ExportAgentResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns EventHandler + * @returns ExportAgentResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.EventHandler; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse; /** - * Creates a plain object from an EventHandler message. Also converts values to other types if specified. - * @param message EventHandler + * Creates a plain object from an ExportAgentResponse message. Also converts values to other types if specified. + * @param message ExportAgentResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.EventHandler, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this EventHandler to JSON. + * Converts this ExportAgentResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a TransitionRoute. */ - interface ITransitionRoute { + /** Properties of a RestoreAgentRequest. */ + interface IRestoreAgentRequest { - /** TransitionRoute name */ + /** RestoreAgentRequest name */ name?: (string|null); - /** TransitionRoute intent */ - intent?: (string|null); - - /** TransitionRoute condition */ - condition?: (string|null); - - /** TransitionRoute triggerFulfillment */ - triggerFulfillment?: (google.cloud.dialogflow.cx.v3beta1.IFulfillment|null); - - /** TransitionRoute targetPage */ - targetPage?: (string|null); + /** RestoreAgentRequest agentUri */ + agentUri?: (string|null); - /** TransitionRoute targetFlow */ - targetFlow?: (string|null); + /** RestoreAgentRequest agentContent */ + agentContent?: (Uint8Array|string|null); } - /** Represents a TransitionRoute. */ - class TransitionRoute implements ITransitionRoute { + /** Represents a RestoreAgentRequest. */ + class RestoreAgentRequest implements IRestoreAgentRequest { /** - * Constructs a new TransitionRoute. + * Constructs a new RestoreAgentRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ITransitionRoute); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IRestoreAgentRequest); - /** TransitionRoute name. */ + /** RestoreAgentRequest name. */ public name: string; - /** TransitionRoute intent. */ - public intent: string; - - /** TransitionRoute condition. */ - public condition: string; - - /** TransitionRoute triggerFulfillment. */ - public triggerFulfillment?: (google.cloud.dialogflow.cx.v3beta1.IFulfillment|null); - - /** TransitionRoute targetPage. */ - public targetPage: string; + /** RestoreAgentRequest agentUri. */ + public agentUri: string; - /** TransitionRoute targetFlow. */ - public targetFlow: string; + /** RestoreAgentRequest agentContent. */ + public agentContent: (Uint8Array|string); - /** TransitionRoute target. */ - public target?: ("targetPage"|"targetFlow"); + /** RestoreAgentRequest agent. */ + public agent?: ("agentUri"|"agentContent"); /** - * Creates a new TransitionRoute instance using the specified properties. + * Creates a new RestoreAgentRequest instance using the specified properties. * @param [properties] Properties to set - * @returns TransitionRoute instance + * @returns RestoreAgentRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ITransitionRoute): google.cloud.dialogflow.cx.v3beta1.TransitionRoute; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IRestoreAgentRequest): google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest; /** - * Encodes the specified TransitionRoute message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TransitionRoute.verify|verify} messages. - * @param message TransitionRoute message or plain object to encode + * Encodes the specified RestoreAgentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.verify|verify} messages. + * @param message RestoreAgentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.ITransitionRoute, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IRestoreAgentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TransitionRoute message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TransitionRoute.verify|verify} messages. - * @param message TransitionRoute message or plain object to encode + * Encodes the specified RestoreAgentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.verify|verify} messages. + * @param message RestoreAgentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ITransitionRoute, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IRestoreAgentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TransitionRoute message from the specified reader or buffer. + * Decodes a RestoreAgentRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TransitionRoute + * @returns RestoreAgentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.TransitionRoute; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest; /** - * Decodes a TransitionRoute message from the specified reader or buffer, length delimited. + * Decodes a RestoreAgentRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TransitionRoute + * @returns RestoreAgentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.TransitionRoute; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest; /** - * Verifies a TransitionRoute message. + * Verifies a RestoreAgentRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a TransitionRoute message from a plain object. Also converts values to their respective internal types. + * Creates a RestoreAgentRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TransitionRoute + * @returns RestoreAgentRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.TransitionRoute; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest; /** - * Creates a plain object from a TransitionRoute message. Also converts values to other types if specified. - * @param message TransitionRoute + * Creates a plain object from a RestoreAgentRequest message. Also converts values to other types if specified. + * @param message RestoreAgentRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.TransitionRoute, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TransitionRoute to JSON. + * Converts this RestoreAgentRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListPagesRequest. */ - interface IListPagesRequest { - - /** ListPagesRequest parent */ - parent?: (string|null); - - /** ListPagesRequest languageCode */ - languageCode?: (string|null); - - /** ListPagesRequest pageSize */ - pageSize?: (number|null); - - /** ListPagesRequest pageToken */ - pageToken?: (string|null); - } - - /** Represents a ListPagesRequest. */ - class ListPagesRequest implements IListPagesRequest { + /** Represents a Flows */ + class Flows extends $protobuf.rpc.Service { /** - * Constructs a new ListPagesRequest. - * @param [properties] Properties to set + * Constructs a new Flows service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IListPagesRequest); - - /** ListPagesRequest parent. */ - public parent: string; - - /** ListPagesRequest languageCode. */ - public languageCode: string; + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); - /** ListPagesRequest pageSize. */ - public pageSize: number; + /** + * Creates new Flows service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Flows; - /** ListPagesRequest pageToken. */ - public pageToken: string; + /** + * Calls CreateFlow. + * @param request CreateFlowRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Flow + */ + public createFlow(request: google.cloud.dialogflow.cx.v3beta1.ICreateFlowRequest, callback: google.cloud.dialogflow.cx.v3beta1.Flows.CreateFlowCallback): void; /** - * Creates a new ListPagesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListPagesRequest instance + * Calls CreateFlow. + * @param request CreateFlowRequest message or plain object + * @returns Promise */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IListPagesRequest): google.cloud.dialogflow.cx.v3beta1.ListPagesRequest; + public createFlow(request: google.cloud.dialogflow.cx.v3beta1.ICreateFlowRequest): Promise; /** - * Encodes the specified ListPagesRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListPagesRequest.verify|verify} messages. - * @param message ListPagesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls DeleteFlow. + * @param request DeleteFlowRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IListPagesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public deleteFlow(request: google.cloud.dialogflow.cx.v3beta1.IDeleteFlowRequest, callback: google.cloud.dialogflow.cx.v3beta1.Flows.DeleteFlowCallback): void; /** - * Encodes the specified ListPagesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListPagesRequest.verify|verify} messages. - * @param message ListPagesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls DeleteFlow. + * @param request DeleteFlowRequest message or plain object + * @returns Promise */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IListPagesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public deleteFlow(request: google.cloud.dialogflow.cx.v3beta1.IDeleteFlowRequest): Promise; /** - * Decodes a ListPagesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListPagesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls ListFlows. + * @param request ListFlowsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListFlowsResponse */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ListPagesRequest; + public listFlows(request: google.cloud.dialogflow.cx.v3beta1.IListFlowsRequest, callback: google.cloud.dialogflow.cx.v3beta1.Flows.ListFlowsCallback): void; /** - * Decodes a ListPagesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListPagesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls ListFlows. + * @param request ListFlowsRequest message or plain object + * @returns Promise */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ListPagesRequest; + public listFlows(request: google.cloud.dialogflow.cx.v3beta1.IListFlowsRequest): Promise; /** - * Verifies a ListPagesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls GetFlow. + * @param request GetFlowRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Flow */ - public static verify(message: { [k: string]: any }): (string|null); + public getFlow(request: google.cloud.dialogflow.cx.v3beta1.IGetFlowRequest, callback: google.cloud.dialogflow.cx.v3beta1.Flows.GetFlowCallback): void; /** - * Creates a ListPagesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListPagesRequest + * Calls GetFlow. + * @param request GetFlowRequest message or plain object + * @returns Promise */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ListPagesRequest; + public getFlow(request: google.cloud.dialogflow.cx.v3beta1.IGetFlowRequest): Promise; /** - * Creates a plain object from a ListPagesRequest message. Also converts values to other types if specified. - * @param message ListPagesRequest - * @param [options] Conversion options - * @returns Plain object + * Calls UpdateFlow. + * @param request UpdateFlowRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Flow */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ListPagesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public updateFlow(request: google.cloud.dialogflow.cx.v3beta1.IUpdateFlowRequest, callback: google.cloud.dialogflow.cx.v3beta1.Flows.UpdateFlowCallback): void; /** - * Converts this ListPagesRequest to JSON. - * @returns JSON object + * Calls UpdateFlow. + * @param request UpdateFlowRequest message or plain object + * @returns Promise */ - public toJSON(): { [k: string]: any }; - } + public updateFlow(request: google.cloud.dialogflow.cx.v3beta1.IUpdateFlowRequest): Promise; - /** Properties of a ListPagesResponse. */ - interface IListPagesResponse { + /** + * Calls TrainFlow. + * @param request TrainFlowRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public trainFlow(request: google.cloud.dialogflow.cx.v3beta1.ITrainFlowRequest, callback: google.cloud.dialogflow.cx.v3beta1.Flows.TrainFlowCallback): void; - /** ListPagesResponse pages */ - pages?: (google.cloud.dialogflow.cx.v3beta1.IPage[]|null); + /** + * Calls TrainFlow. + * @param request TrainFlowRequest message or plain object + * @returns Promise + */ + public trainFlow(request: google.cloud.dialogflow.cx.v3beta1.ITrainFlowRequest): Promise; + } - /** ListPagesResponse nextPageToken */ - nextPageToken?: (string|null); + namespace Flows { + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows#createFlow}. + * @param error Error, if any + * @param [response] Flow + */ + type CreateFlowCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.Flow) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows#deleteFlow}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteFlowCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows#listFlows}. + * @param error Error, if any + * @param [response] ListFlowsResponse + */ + type ListFlowsCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows#getFlow}. + * @param error Error, if any + * @param [response] Flow + */ + type GetFlowCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.Flow) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows#updateFlow}. + * @param error Error, if any + * @param [response] Flow + */ + type UpdateFlowCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.Flow) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows#trainFlow}. + * @param error Error, if any + * @param [response] Operation + */ + type TrainFlowCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; } - /** Represents a ListPagesResponse. */ - class ListPagesResponse implements IListPagesResponse { + /** Properties of a NluSettings. */ + interface INluSettings { + + /** NluSettings modelType */ + modelType?: (google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelType|keyof typeof google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelType|null); + + /** NluSettings classificationThreshold */ + classificationThreshold?: (number|null); + + /** NluSettings modelTrainingMode */ + modelTrainingMode?: (google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelTrainingMode|keyof typeof google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelTrainingMode|null); + } + + /** Represents a NluSettings. */ + class NluSettings implements INluSettings { /** - * Constructs a new ListPagesResponse. + * Constructs a new NluSettings. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IListPagesResponse); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.INluSettings); - /** ListPagesResponse pages. */ - public pages: google.cloud.dialogflow.cx.v3beta1.IPage[]; + /** NluSettings modelType. */ + public modelType: (google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelType|keyof typeof google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelType); - /** ListPagesResponse nextPageToken. */ - public nextPageToken: string; + /** NluSettings classificationThreshold. */ + public classificationThreshold: number; + + /** NluSettings modelTrainingMode. */ + public modelTrainingMode: (google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelTrainingMode|keyof typeof google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelTrainingMode); /** - * Creates a new ListPagesResponse instance using the specified properties. + * Creates a new NluSettings instance using the specified properties. * @param [properties] Properties to set - * @returns ListPagesResponse instance + * @returns NluSettings instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IListPagesResponse): google.cloud.dialogflow.cx.v3beta1.ListPagesResponse; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.INluSettings): google.cloud.dialogflow.cx.v3beta1.NluSettings; /** - * Encodes the specified ListPagesResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListPagesResponse.verify|verify} messages. - * @param message ListPagesResponse message or plain object to encode + * Encodes the specified NluSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.NluSettings.verify|verify} messages. + * @param message NluSettings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IListPagesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.INluSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListPagesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListPagesResponse.verify|verify} messages. - * @param message ListPagesResponse message or plain object to encode + * Encodes the specified NluSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.NluSettings.verify|verify} messages. + * @param message NluSettings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IListPagesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.INluSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListPagesResponse message from the specified reader or buffer. + * Decodes a NluSettings message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListPagesResponse + * @returns NluSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ListPagesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.NluSettings; /** - * Decodes a ListPagesResponse message from the specified reader or buffer, length delimited. + * Decodes a NluSettings message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListPagesResponse + * @returns NluSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ListPagesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.NluSettings; /** - * Verifies a ListPagesResponse message. + * Verifies a NluSettings message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListPagesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a NluSettings message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListPagesResponse + * @returns NluSettings */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ListPagesResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.NluSettings; /** - * Creates a plain object from a ListPagesResponse message. Also converts values to other types if specified. - * @param message ListPagesResponse + * Creates a plain object from a NluSettings message. Also converts values to other types if specified. + * @param message NluSettings * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ListPagesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.NluSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListPagesResponse to JSON. + * Converts this NluSettings to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetPageRequest. */ - interface IGetPageRequest { + namespace NluSettings { - /** GetPageRequest name */ + /** ModelType enum. */ + enum ModelType { + MODEL_TYPE_UNSPECIFIED = 0, + MODEL_TYPE_STANDARD = 1, + MODEL_TYPE_ADVANCED = 3 + } + + /** ModelTrainingMode enum. */ + enum ModelTrainingMode { + MODEL_TRAINING_MODE_UNSPECIFIED = 0, + MODEL_TRAINING_MODE_AUTOMATIC = 1, + MODEL_TRAINING_MODE_MANUAL = 2 + } + } + + /** Properties of a Flow. */ + interface IFlow { + + /** Flow name */ name?: (string|null); - /** GetPageRequest languageCode */ - languageCode?: (string|null); + /** Flow displayName */ + displayName?: (string|null); + + /** Flow description */ + description?: (string|null); + + /** Flow transitionRoutes */ + transitionRoutes?: (google.cloud.dialogflow.cx.v3beta1.ITransitionRoute[]|null); + + /** Flow eventHandlers */ + eventHandlers?: (google.cloud.dialogflow.cx.v3beta1.IEventHandler[]|null); + + /** Flow nluSettings */ + nluSettings?: (google.cloud.dialogflow.cx.v3beta1.INluSettings|null); } - /** Represents a GetPageRequest. */ - class GetPageRequest implements IGetPageRequest { + /** Represents a Flow. */ + class Flow implements IFlow { /** - * Constructs a new GetPageRequest. + * Constructs a new Flow. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IGetPageRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IFlow); - /** GetPageRequest name. */ + /** Flow name. */ public name: string; - /** GetPageRequest languageCode. */ - public languageCode: string; + /** Flow displayName. */ + public displayName: string; + + /** Flow description. */ + public description: string; + + /** Flow transitionRoutes. */ + public transitionRoutes: google.cloud.dialogflow.cx.v3beta1.ITransitionRoute[]; + + /** Flow eventHandlers. */ + public eventHandlers: google.cloud.dialogflow.cx.v3beta1.IEventHandler[]; + + /** Flow nluSettings. */ + public nluSettings?: (google.cloud.dialogflow.cx.v3beta1.INluSettings|null); /** - * Creates a new GetPageRequest instance using the specified properties. + * Creates a new Flow instance using the specified properties. * @param [properties] Properties to set - * @returns GetPageRequest instance + * @returns Flow instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IGetPageRequest): google.cloud.dialogflow.cx.v3beta1.GetPageRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IFlow): google.cloud.dialogflow.cx.v3beta1.Flow; /** - * Encodes the specified GetPageRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetPageRequest.verify|verify} messages. - * @param message GetPageRequest message or plain object to encode + * Encodes the specified Flow message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Flow.verify|verify} messages. + * @param message Flow message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IGetPageRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IFlow, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetPageRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetPageRequest.verify|verify} messages. - * @param message GetPageRequest message or plain object to encode + * Encodes the specified Flow message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Flow.verify|verify} messages. + * @param message Flow message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IGetPageRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IFlow, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetPageRequest message from the specified reader or buffer. + * Decodes a Flow message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetPageRequest + * @returns Flow * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.GetPageRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.Flow; /** - * Decodes a GetPageRequest message from the specified reader or buffer, length delimited. + * Decodes a Flow message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetPageRequest + * @returns Flow * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.GetPageRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.Flow; /** - * Verifies a GetPageRequest message. + * Verifies a Flow message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetPageRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Flow message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetPageRequest + * @returns Flow */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.GetPageRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.Flow; /** - * Creates a plain object from a GetPageRequest message. Also converts values to other types if specified. - * @param message GetPageRequest + * Creates a plain object from a Flow message. Also converts values to other types if specified. + * @param message Flow * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.GetPageRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.Flow, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetPageRequest to JSON. + * Converts this Flow to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CreatePageRequest. */ - interface ICreatePageRequest { + /** Properties of a CreateFlowRequest. */ + interface ICreateFlowRequest { - /** CreatePageRequest parent */ + /** CreateFlowRequest parent */ parent?: (string|null); - /** CreatePageRequest page */ - page?: (google.cloud.dialogflow.cx.v3beta1.IPage|null); + /** CreateFlowRequest flow */ + flow?: (google.cloud.dialogflow.cx.v3beta1.IFlow|null); - /** CreatePageRequest languageCode */ + /** CreateFlowRequest languageCode */ languageCode?: (string|null); } - /** Represents a CreatePageRequest. */ - class CreatePageRequest implements ICreatePageRequest { + /** Represents a CreateFlowRequest. */ + class CreateFlowRequest implements ICreateFlowRequest { /** - * Constructs a new CreatePageRequest. + * Constructs a new CreateFlowRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ICreatePageRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ICreateFlowRequest); - /** CreatePageRequest parent. */ + /** CreateFlowRequest parent. */ public parent: string; - /** CreatePageRequest page. */ - public page?: (google.cloud.dialogflow.cx.v3beta1.IPage|null); + /** CreateFlowRequest flow. */ + public flow?: (google.cloud.dialogflow.cx.v3beta1.IFlow|null); - /** CreatePageRequest languageCode. */ + /** CreateFlowRequest languageCode. */ public languageCode: string; /** - * Creates a new CreatePageRequest instance using the specified properties. + * Creates a new CreateFlowRequest instance using the specified properties. * @param [properties] Properties to set - * @returns CreatePageRequest instance + * @returns CreateFlowRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ICreatePageRequest): google.cloud.dialogflow.cx.v3beta1.CreatePageRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ICreateFlowRequest): google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest; /** - * Encodes the specified CreatePageRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreatePageRequest.verify|verify} messages. - * @param message CreatePageRequest message or plain object to encode + * Encodes the specified CreateFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest.verify|verify} messages. + * @param message CreateFlowRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.ICreatePageRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.ICreateFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreatePageRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreatePageRequest.verify|verify} messages. - * @param message CreatePageRequest message or plain object to encode + * Encodes the specified CreateFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest.verify|verify} messages. + * @param message CreateFlowRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ICreatePageRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ICreateFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreatePageRequest message from the specified reader or buffer. + * Decodes a CreateFlowRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreatePageRequest + * @returns CreateFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.CreatePageRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest; /** - * Decodes a CreatePageRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateFlowRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreatePageRequest + * @returns CreateFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.CreatePageRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest; /** - * Verifies a CreatePageRequest message. + * Verifies a CreateFlowRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CreatePageRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateFlowRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreatePageRequest + * @returns CreateFlowRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.CreatePageRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest; /** - * Creates a plain object from a CreatePageRequest message. Also converts values to other types if specified. - * @param message CreatePageRequest + * Creates a plain object from a CreateFlowRequest message. Also converts values to other types if specified. + * @param message CreateFlowRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.CreatePageRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreatePageRequest to JSON. + * Converts this CreateFlowRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an UpdatePageRequest. */ - interface IUpdatePageRequest { - - /** UpdatePageRequest page */ - page?: (google.cloud.dialogflow.cx.v3beta1.IPage|null); + /** Properties of a DeleteFlowRequest. */ + interface IDeleteFlowRequest { - /** UpdatePageRequest languageCode */ - languageCode?: (string|null); + /** DeleteFlowRequest name */ + name?: (string|null); - /** UpdatePageRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** DeleteFlowRequest force */ + force?: (boolean|null); } - /** Represents an UpdatePageRequest. */ - class UpdatePageRequest implements IUpdatePageRequest { + /** Represents a DeleteFlowRequest. */ + class DeleteFlowRequest implements IDeleteFlowRequest { /** - * Constructs a new UpdatePageRequest. + * Constructs a new DeleteFlowRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IUpdatePageRequest); - - /** UpdatePageRequest page. */ - public page?: (google.cloud.dialogflow.cx.v3beta1.IPage|null); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IDeleteFlowRequest); - /** UpdatePageRequest languageCode. */ - public languageCode: string; + /** DeleteFlowRequest name. */ + public name: string; - /** UpdatePageRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** DeleteFlowRequest force. */ + public force: boolean; /** - * Creates a new UpdatePageRequest instance using the specified properties. + * Creates a new DeleteFlowRequest instance using the specified properties. * @param [properties] Properties to set - * @returns UpdatePageRequest instance + * @returns DeleteFlowRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IUpdatePageRequest): google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IDeleteFlowRequest): google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest; /** - * Encodes the specified UpdatePageRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest.verify|verify} messages. - * @param message UpdatePageRequest message or plain object to encode + * Encodes the specified DeleteFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest.verify|verify} messages. + * @param message DeleteFlowRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IUpdatePageRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IDeleteFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdatePageRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest.verify|verify} messages. - * @param message UpdatePageRequest message or plain object to encode + * Encodes the specified DeleteFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest.verify|verify} messages. + * @param message DeleteFlowRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IUpdatePageRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IDeleteFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdatePageRequest message from the specified reader or buffer. + * Decodes a DeleteFlowRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdatePageRequest + * @returns DeleteFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest; /** - * Decodes an UpdatePageRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteFlowRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdatePageRequest + * @returns DeleteFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest; /** - * Verifies an UpdatePageRequest message. + * Verifies a DeleteFlowRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an UpdatePageRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteFlowRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdatePageRequest + * @returns DeleteFlowRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest; /** - * Creates a plain object from an UpdatePageRequest message. Also converts values to other types if specified. - * @param message UpdatePageRequest + * Creates a plain object from a DeleteFlowRequest message. Also converts values to other types if specified. + * @param message DeleteFlowRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdatePageRequest to JSON. + * Converts this DeleteFlowRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DeletePageRequest. */ - interface IDeletePageRequest { + /** Properties of a ListFlowsRequest. */ + interface IListFlowsRequest { - /** DeletePageRequest name */ - name?: (string|null); + /** ListFlowsRequest parent */ + parent?: (string|null); - /** DeletePageRequest force */ - force?: (boolean|null); + /** ListFlowsRequest pageSize */ + pageSize?: (number|null); + + /** ListFlowsRequest pageToken */ + pageToken?: (string|null); + + /** ListFlowsRequest languageCode */ + languageCode?: (string|null); } - /** Represents a DeletePageRequest. */ - class DeletePageRequest implements IDeletePageRequest { + /** Represents a ListFlowsRequest. */ + class ListFlowsRequest implements IListFlowsRequest { /** - * Constructs a new DeletePageRequest. + * Constructs a new ListFlowsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IDeletePageRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IListFlowsRequest); - /** DeletePageRequest name. */ - public name: string; + /** ListFlowsRequest parent. */ + public parent: string; - /** DeletePageRequest force. */ - public force: boolean; + /** ListFlowsRequest pageSize. */ + public pageSize: number; + + /** ListFlowsRequest pageToken. */ + public pageToken: string; + + /** ListFlowsRequest languageCode. */ + public languageCode: string; /** - * Creates a new DeletePageRequest instance using the specified properties. + * Creates a new ListFlowsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns DeletePageRequest instance + * @returns ListFlowsRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IDeletePageRequest): google.cloud.dialogflow.cx.v3beta1.DeletePageRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IListFlowsRequest): google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest; /** - * Encodes the specified DeletePageRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeletePageRequest.verify|verify} messages. - * @param message DeletePageRequest message or plain object to encode + * Encodes the specified ListFlowsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest.verify|verify} messages. + * @param message ListFlowsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IDeletePageRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IListFlowsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeletePageRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeletePageRequest.verify|verify} messages. - * @param message DeletePageRequest message or plain object to encode + * Encodes the specified ListFlowsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest.verify|verify} messages. + * @param message ListFlowsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IDeletePageRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IListFlowsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeletePageRequest message from the specified reader or buffer. + * Decodes a ListFlowsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeletePageRequest + * @returns ListFlowsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.DeletePageRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest; /** - * Decodes a DeletePageRequest message from the specified reader or buffer, length delimited. + * Decodes a ListFlowsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeletePageRequest + * @returns ListFlowsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.DeletePageRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest; /** - * Verifies a DeletePageRequest message. + * Verifies a ListFlowsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DeletePageRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListFlowsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeletePageRequest + * @returns ListFlowsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.DeletePageRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest; /** - * Creates a plain object from a DeletePageRequest message. Also converts values to other types if specified. - * @param message DeletePageRequest + * Creates a plain object from a ListFlowsRequest message. Also converts values to other types if specified. + * @param message ListFlowsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.DeletePageRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeletePageRequest to JSON. + * Converts this ListFlowsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a Fulfillment. */ - interface IFulfillment { - - /** Fulfillment messages */ - messages?: (google.cloud.dialogflow.cx.v3beta1.IResponseMessage[]|null); - - /** Fulfillment webhook */ - webhook?: (string|null); - - /** Fulfillment tag */ - tag?: (string|null); + /** Properties of a ListFlowsResponse. */ + interface IListFlowsResponse { - /** Fulfillment setParameterActions */ - setParameterActions?: (google.cloud.dialogflow.cx.v3beta1.Fulfillment.ISetParameterAction[]|null); + /** ListFlowsResponse flows */ + flows?: (google.cloud.dialogflow.cx.v3beta1.IFlow[]|null); - /** Fulfillment conditionalCases */ - conditionalCases?: (google.cloud.dialogflow.cx.v3beta1.Fulfillment.IConditionalCases[]|null); + /** ListFlowsResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a Fulfillment. */ - class Fulfillment implements IFulfillment { + /** Represents a ListFlowsResponse. */ + class ListFlowsResponse implements IListFlowsResponse { /** - * Constructs a new Fulfillment. + * Constructs a new ListFlowsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IFulfillment); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IListFlowsResponse); - /** Fulfillment messages. */ - public messages: google.cloud.dialogflow.cx.v3beta1.IResponseMessage[]; - - /** Fulfillment webhook. */ - public webhook: string; - - /** Fulfillment tag. */ - public tag: string; - - /** Fulfillment setParameterActions. */ - public setParameterActions: google.cloud.dialogflow.cx.v3beta1.Fulfillment.ISetParameterAction[]; + /** ListFlowsResponse flows. */ + public flows: google.cloud.dialogflow.cx.v3beta1.IFlow[]; - /** Fulfillment conditionalCases. */ - public conditionalCases: google.cloud.dialogflow.cx.v3beta1.Fulfillment.IConditionalCases[]; + /** ListFlowsResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new Fulfillment instance using the specified properties. + * Creates a new ListFlowsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns Fulfillment instance + * @returns ListFlowsResponse instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IFulfillment): google.cloud.dialogflow.cx.v3beta1.Fulfillment; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IListFlowsResponse): google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse; /** - * Encodes the specified Fulfillment message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.verify|verify} messages. - * @param message Fulfillment message or plain object to encode + * Encodes the specified ListFlowsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse.verify|verify} messages. + * @param message ListFlowsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IFulfillment, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IListFlowsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Fulfillment message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.verify|verify} messages. - * @param message Fulfillment message or plain object to encode + * Encodes the specified ListFlowsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse.verify|verify} messages. + * @param message ListFlowsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IFulfillment, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IListFlowsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Fulfillment message from the specified reader or buffer. + * Decodes a ListFlowsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Fulfillment + * @returns ListFlowsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.Fulfillment; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse; /** - * Decodes a Fulfillment message from the specified reader or buffer, length delimited. + * Decodes a ListFlowsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Fulfillment + * @returns ListFlowsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.Fulfillment; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse; /** - * Verifies a Fulfillment message. + * Verifies a ListFlowsResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Fulfillment message from a plain object. Also converts values to their respective internal types. + * Creates a ListFlowsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Fulfillment + * @returns ListFlowsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.Fulfillment; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse; /** - * Creates a plain object from a Fulfillment message. Also converts values to other types if specified. - * @param message Fulfillment + * Creates a plain object from a ListFlowsResponse message. Also converts values to other types if specified. + * @param message ListFlowsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.Fulfillment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Fulfillment to JSON. + * Converts this ListFlowsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace Fulfillment { - - /** Properties of a SetParameterAction. */ - interface ISetParameterAction { + /** Properties of a GetFlowRequest. */ + interface IGetFlowRequest { - /** SetParameterAction parameter */ - parameter?: (string|null); + /** GetFlowRequest name */ + name?: (string|null); - /** SetParameterAction value */ - value?: (google.protobuf.IValue|null); - } + /** GetFlowRequest languageCode */ + languageCode?: (string|null); + } - /** Represents a SetParameterAction. */ - class SetParameterAction implements ISetParameterAction { + /** Represents a GetFlowRequest. */ + class GetFlowRequest implements IGetFlowRequest { - /** - * Constructs a new SetParameterAction. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.Fulfillment.ISetParameterAction); + /** + * Constructs a new GetFlowRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IGetFlowRequest); - /** SetParameterAction parameter. */ - public parameter: string; + /** GetFlowRequest name. */ + public name: string; - /** SetParameterAction value. */ - public value?: (google.protobuf.IValue|null); + /** GetFlowRequest languageCode. */ + public languageCode: string; - /** - * Creates a new SetParameterAction instance using the specified properties. - * @param [properties] Properties to set - * @returns SetParameterAction instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.Fulfillment.ISetParameterAction): google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction; + /** + * Creates a new GetFlowRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetFlowRequest instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IGetFlowRequest): google.cloud.dialogflow.cx.v3beta1.GetFlowRequest; - /** - * Encodes the specified SetParameterAction message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction.verify|verify} messages. - * @param message SetParameterAction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.Fulfillment.ISetParameterAction, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified GetFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetFlowRequest.verify|verify} messages. + * @param message GetFlowRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IGetFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified SetParameterAction message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction.verify|verify} messages. - * @param message SetParameterAction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.Fulfillment.ISetParameterAction, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified GetFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetFlowRequest.verify|verify} messages. + * @param message GetFlowRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IGetFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a SetParameterAction message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetParameterAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction; + /** + * Decodes a GetFlowRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetFlowRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.GetFlowRequest; - /** - * Decodes a SetParameterAction message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetParameterAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction; + /** + * Decodes a GetFlowRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetFlowRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.GetFlowRequest; - /** - * Verifies a SetParameterAction message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Verifies a GetFlowRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Creates a SetParameterAction message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetParameterAction - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction; + /** + * Creates a GetFlowRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetFlowRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.GetFlowRequest; - /** - * Creates a plain object from a SetParameterAction message. Also converts values to other types if specified. - * @param message SetParameterAction - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a plain object from a GetFlowRequest message. Also converts values to other types if specified. + * @param message GetFlowRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.GetFlowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this SetParameterAction to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Converts this GetFlowRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Properties of a ConditionalCases. */ - interface IConditionalCases { + /** Properties of an UpdateFlowRequest. */ + interface IUpdateFlowRequest { - /** ConditionalCases cases */ - cases?: (google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.ICase[]|null); - } + /** UpdateFlowRequest flow */ + flow?: (google.cloud.dialogflow.cx.v3beta1.IFlow|null); - /** Represents a ConditionalCases. */ - class ConditionalCases implements IConditionalCases { + /** UpdateFlowRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); - /** - * Constructs a new ConditionalCases. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.Fulfillment.IConditionalCases); + /** UpdateFlowRequest languageCode */ + languageCode?: (string|null); + } - /** ConditionalCases cases. */ - public cases: google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.ICase[]; + /** Represents an UpdateFlowRequest. */ + class UpdateFlowRequest implements IUpdateFlowRequest { - /** - * Creates a new ConditionalCases instance using the specified properties. - * @param [properties] Properties to set - * @returns ConditionalCases instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.Fulfillment.IConditionalCases): google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases; + /** + * Constructs a new UpdateFlowRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IUpdateFlowRequest); - /** - * Encodes the specified ConditionalCases message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.verify|verify} messages. - * @param message ConditionalCases message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.Fulfillment.IConditionalCases, writer?: $protobuf.Writer): $protobuf.Writer; + /** UpdateFlowRequest flow. */ + public flow?: (google.cloud.dialogflow.cx.v3beta1.IFlow|null); - /** - * Encodes the specified ConditionalCases message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.verify|verify} messages. - * @param message ConditionalCases message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.Fulfillment.IConditionalCases, writer?: $protobuf.Writer): $protobuf.Writer; + /** UpdateFlowRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); - /** - * Decodes a ConditionalCases message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ConditionalCases - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases; + /** UpdateFlowRequest languageCode. */ + public languageCode: string; - /** - * Decodes a ConditionalCases message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ConditionalCases - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases; + /** + * Creates a new UpdateFlowRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateFlowRequest instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IUpdateFlowRequest): google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest; - /** - * Verifies a ConditionalCases message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Encodes the specified UpdateFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest.verify|verify} messages. + * @param message UpdateFlowRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IUpdateFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a ConditionalCases message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ConditionalCases - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases; + /** + * Encodes the specified UpdateFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest.verify|verify} messages. + * @param message UpdateFlowRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IUpdateFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a plain object from a ConditionalCases message. Also converts values to other types if specified. - * @param message ConditionalCases - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Decodes an UpdateFlowRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateFlowRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest; - /** - * Converts this ConditionalCases to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Decodes an UpdateFlowRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateFlowRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest; - namespace ConditionalCases { + /** + * Verifies an UpdateFlowRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Properties of a Case. */ - interface ICase { + /** + * Creates an UpdateFlowRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateFlowRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest; - /** Case condition */ - condition?: (string|null); + /** + * Creates a plain object from an UpdateFlowRequest message. Also converts values to other types if specified. + * @param message UpdateFlowRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Case caseContent */ - caseContent?: (google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.ICaseContent[]|null); - } + /** + * Converts this UpdateFlowRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Represents a Case. */ - class Case implements ICase { + /** Properties of a TrainFlowRequest. */ + interface ITrainFlowRequest { - /** - * Constructs a new Case. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.ICase); + /** TrainFlowRequest name */ + name?: (string|null); + } - /** Case condition. */ - public condition: string; + /** Represents a TrainFlowRequest. */ + class TrainFlowRequest implements ITrainFlowRequest { - /** Case caseContent. */ - public caseContent: google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.ICaseContent[]; + /** + * Constructs a new TrainFlowRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ITrainFlowRequest); - /** - * Creates a new Case instance using the specified properties. - * @param [properties] Properties to set - * @returns Case instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.ICase): google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case; + /** TrainFlowRequest name. */ + public name: string; - /** - * Encodes the specified Case message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.verify|verify} messages. - * @param message Case message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.ICase, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new TrainFlowRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns TrainFlowRequest instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ITrainFlowRequest): google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest; - /** - * Encodes the specified Case message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.verify|verify} messages. - * @param message Case message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.ICase, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified TrainFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest.verify|verify} messages. + * @param message TrainFlowRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.ITrainFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a Case message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Case - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case; + /** + * Encodes the specified TrainFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest.verify|verify} messages. + * @param message TrainFlowRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ITrainFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a Case message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Case - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case; + /** + * Decodes a TrainFlowRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TrainFlowRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest; - /** - * Verifies a Case message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Decodes a TrainFlowRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TrainFlowRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest; - /** - * Creates a Case message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Case - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case; + /** + * Verifies a TrainFlowRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Creates a plain object from a Case message. Also converts values to other types if specified. - * @param message Case - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a TrainFlowRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TrainFlowRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest; - /** - * Converts this Case to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Creates a plain object from a TrainFlowRequest message. Also converts values to other types if specified. + * @param message TrainFlowRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - namespace Case { + /** + * Converts this TrainFlowRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Properties of a CaseContent. */ - interface ICaseContent { + /** Represents a Pages */ + class Pages extends $protobuf.rpc.Service { - /** CaseContent message */ - message?: (google.cloud.dialogflow.cx.v3beta1.IResponseMessage|null); + /** + * Constructs a new Pages service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); - /** CaseContent additionalCases */ - additionalCases?: (google.cloud.dialogflow.cx.v3beta1.Fulfillment.IConditionalCases|null); - } + /** + * Creates new Pages service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Pages; - /** Represents a CaseContent. */ - class CaseContent implements ICaseContent { + /** + * Calls ListPages. + * @param request ListPagesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListPagesResponse + */ + public listPages(request: google.cloud.dialogflow.cx.v3beta1.IListPagesRequest, callback: google.cloud.dialogflow.cx.v3beta1.Pages.ListPagesCallback): void; - /** - * Constructs a new CaseContent. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.ICaseContent); + /** + * Calls ListPages. + * @param request ListPagesRequest message or plain object + * @returns Promise + */ + public listPages(request: google.cloud.dialogflow.cx.v3beta1.IListPagesRequest): Promise; - /** CaseContent message. */ - public message?: (google.cloud.dialogflow.cx.v3beta1.IResponseMessage|null); + /** + * Calls GetPage. + * @param request GetPageRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Page + */ + public getPage(request: google.cloud.dialogflow.cx.v3beta1.IGetPageRequest, callback: google.cloud.dialogflow.cx.v3beta1.Pages.GetPageCallback): void; - /** CaseContent additionalCases. */ - public additionalCases?: (google.cloud.dialogflow.cx.v3beta1.Fulfillment.IConditionalCases|null); + /** + * Calls GetPage. + * @param request GetPageRequest message or plain object + * @returns Promise + */ + public getPage(request: google.cloud.dialogflow.cx.v3beta1.IGetPageRequest): Promise; - /** CaseContent casesOrMessage. */ - public casesOrMessage?: ("message"|"additionalCases"); + /** + * Calls CreatePage. + * @param request CreatePageRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Page + */ + public createPage(request: google.cloud.dialogflow.cx.v3beta1.ICreatePageRequest, callback: google.cloud.dialogflow.cx.v3beta1.Pages.CreatePageCallback): void; - /** - * Creates a new CaseContent instance using the specified properties. - * @param [properties] Properties to set - * @returns CaseContent instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.ICaseContent): google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent; + /** + * Calls CreatePage. + * @param request CreatePageRequest message or plain object + * @returns Promise + */ + public createPage(request: google.cloud.dialogflow.cx.v3beta1.ICreatePageRequest): Promise; - /** - * Encodes the specified CaseContent message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent.verify|verify} messages. - * @param message CaseContent message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.ICaseContent, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Calls UpdatePage. + * @param request UpdatePageRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Page + */ + public updatePage(request: google.cloud.dialogflow.cx.v3beta1.IUpdatePageRequest, callback: google.cloud.dialogflow.cx.v3beta1.Pages.UpdatePageCallback): void; - /** - * Encodes the specified CaseContent message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent.verify|verify} messages. - * @param message CaseContent message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.ICaseContent, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Calls UpdatePage. + * @param request UpdatePageRequest message or plain object + * @returns Promise + */ + public updatePage(request: google.cloud.dialogflow.cx.v3beta1.IUpdatePageRequest): Promise; - /** - * Decodes a CaseContent message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CaseContent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent; + /** + * Calls DeletePage. + * @param request DeletePageRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deletePage(request: google.cloud.dialogflow.cx.v3beta1.IDeletePageRequest, callback: google.cloud.dialogflow.cx.v3beta1.Pages.DeletePageCallback): void; - /** - * Decodes a CaseContent message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CaseContent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent; + /** + * Calls DeletePage. + * @param request DeletePageRequest message or plain object + * @returns Promise + */ + public deletePage(request: google.cloud.dialogflow.cx.v3beta1.IDeletePageRequest): Promise; + } - /** - * Verifies a CaseContent message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + namespace Pages { - /** - * Creates a CaseContent message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CaseContent - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent; + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Pages#listPages}. + * @param error Error, if any + * @param [response] ListPagesResponse + */ + type ListPagesCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.ListPagesResponse) => void; - /** - * Creates a plain object from a CaseContent message. Also converts values to other types if specified. - * @param message CaseContent - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Pages#getPage}. + * @param error Error, if any + * @param [response] Page + */ + type GetPageCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.Page) => void; - /** - * Converts this CaseContent to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - } - } + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Pages#createPage}. + * @param error Error, if any + * @param [response] Page + */ + type CreatePageCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.Page) => void; - /** Properties of a ResponseMessage. */ - interface IResponseMessage { + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Pages#updatePage}. + * @param error Error, if any + * @param [response] Page + */ + type UpdatePageCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.Page) => void; - /** ResponseMessage text */ - text?: (google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IText|null); + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Pages#deletePage}. + * @param error Error, if any + * @param [response] Empty + */ + type DeletePageCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + } - /** ResponseMessage payload */ - payload?: (google.protobuf.IStruct|null); + /** Properties of a Page. */ + interface IPage { - /** ResponseMessage conversationSuccess */ - conversationSuccess?: (google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IConversationSuccess|null); + /** Page name */ + name?: (string|null); - /** ResponseMessage outputAudioText */ - outputAudioText?: (google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IOutputAudioText|null); + /** Page displayName */ + displayName?: (string|null); - /** ResponseMessage liveAgentHandoff */ - liveAgentHandoff?: (google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ILiveAgentHandoff|null); + /** Page entryFulfillment */ + entryFulfillment?: (google.cloud.dialogflow.cx.v3beta1.IFulfillment|null); - /** ResponseMessage endInteraction */ - endInteraction?: (google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IEndInteraction|null); + /** Page form */ + form?: (google.cloud.dialogflow.cx.v3beta1.IForm|null); - /** ResponseMessage playAudio */ - playAudio?: (google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IPlayAudio|null); + /** Page transitionRouteGroups */ + transitionRouteGroups?: (string[]|null); - /** ResponseMessage mixedAudio */ - mixedAudio?: (google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IMixedAudio|null); + /** Page transitionRoutes */ + transitionRoutes?: (google.cloud.dialogflow.cx.v3beta1.ITransitionRoute[]|null); + + /** Page eventHandlers */ + eventHandlers?: (google.cloud.dialogflow.cx.v3beta1.IEventHandler[]|null); } - /** Represents a ResponseMessage. */ - class ResponseMessage implements IResponseMessage { + /** Represents a Page. */ + class Page implements IPage { /** - * Constructs a new ResponseMessage. + * Constructs a new Page. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IResponseMessage); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IPage); - /** ResponseMessage text. */ - public text?: (google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IText|null); + /** Page name. */ + public name: string; - /** ResponseMessage payload. */ - public payload?: (google.protobuf.IStruct|null); + /** Page displayName. */ + public displayName: string; - /** ResponseMessage conversationSuccess. */ - public conversationSuccess?: (google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IConversationSuccess|null); + /** Page entryFulfillment. */ + public entryFulfillment?: (google.cloud.dialogflow.cx.v3beta1.IFulfillment|null); - /** ResponseMessage outputAudioText. */ - public outputAudioText?: (google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IOutputAudioText|null); + /** Page form. */ + public form?: (google.cloud.dialogflow.cx.v3beta1.IForm|null); - /** ResponseMessage liveAgentHandoff. */ - public liveAgentHandoff?: (google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ILiveAgentHandoff|null); + /** Page transitionRouteGroups. */ + public transitionRouteGroups: string[]; - /** ResponseMessage endInteraction. */ - public endInteraction?: (google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IEndInteraction|null); + /** Page transitionRoutes. */ + public transitionRoutes: google.cloud.dialogflow.cx.v3beta1.ITransitionRoute[]; - /** ResponseMessage playAudio. */ - public playAudio?: (google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IPlayAudio|null); + /** Page eventHandlers. */ + public eventHandlers: google.cloud.dialogflow.cx.v3beta1.IEventHandler[]; - /** ResponseMessage mixedAudio. */ - public mixedAudio?: (google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IMixedAudio|null); + /** + * Creates a new Page instance using the specified properties. + * @param [properties] Properties to set + * @returns Page instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IPage): google.cloud.dialogflow.cx.v3beta1.Page; - /** ResponseMessage message. */ - public message?: ("text"|"payload"|"conversationSuccess"|"outputAudioText"|"liveAgentHandoff"|"endInteraction"|"playAudio"|"mixedAudio"); + /** + * Encodes the specified Page message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Page.verify|verify} messages. + * @param message Page message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IPage, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Creates a new ResponseMessage instance using the specified properties. + * Encodes the specified Page message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Page.verify|verify} messages. + * @param message Page message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IPage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Page message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Page + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.Page; + + /** + * Decodes a Page message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Page + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.Page; + + /** + * Verifies a Page message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Page message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Page + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.Page; + + /** + * Creates a plain object from a Page message. Also converts values to other types if specified. + * @param message Page + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.Page, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Page to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Form. */ + interface IForm { + + /** Form parameters */ + parameters?: (google.cloud.dialogflow.cx.v3beta1.Form.IParameter[]|null); + } + + /** Represents a Form. */ + class Form implements IForm { + + /** + * Constructs a new Form. * @param [properties] Properties to set - * @returns ResponseMessage instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IResponseMessage): google.cloud.dialogflow.cx.v3beta1.ResponseMessage; + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IForm); + + /** Form parameters. */ + public parameters: google.cloud.dialogflow.cx.v3beta1.Form.IParameter[]; /** - * Encodes the specified ResponseMessage message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.verify|verify} messages. - * @param message ResponseMessage message or plain object to encode + * Creates a new Form instance using the specified properties. + * @param [properties] Properties to set + * @returns Form instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IForm): google.cloud.dialogflow.cx.v3beta1.Form; + + /** + * Encodes the specified Form message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Form.verify|verify} messages. + * @param message Form message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IResponseMessage, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IForm, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ResponseMessage message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.verify|verify} messages. - * @param message ResponseMessage message or plain object to encode + * Encodes the specified Form message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Form.verify|verify} messages. + * @param message Form message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IResponseMessage, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IForm, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ResponseMessage message from the specified reader or buffer. + * Decodes a Form message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ResponseMessage + * @returns Form * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ResponseMessage; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.Form; /** - * Decodes a ResponseMessage message from the specified reader or buffer, length delimited. + * Decodes a Form message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ResponseMessage + * @returns Form * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ResponseMessage; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.Form; /** - * Verifies a ResponseMessage message. + * Verifies a Form message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ResponseMessage message from a plain object. Also converts values to their respective internal types. + * Creates a Form message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ResponseMessage + * @returns Form */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ResponseMessage; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.Form; /** - * Creates a plain object from a ResponseMessage message. Also converts values to other types if specified. - * @param message ResponseMessage + * Creates a plain object from a Form message. Also converts values to other types if specified. + * @param message Form * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.Form, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ResponseMessage to JSON. + * Converts this Form to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace ResponseMessage { + namespace Form { - /** Properties of a Text. */ - interface IText { + /** Properties of a Parameter. */ + interface IParameter { - /** Text text */ - text?: (string[]|null); + /** Parameter displayName */ + displayName?: (string|null); - /** Text allowPlaybackInterruption */ - allowPlaybackInterruption?: (boolean|null); + /** Parameter required */ + required?: (boolean|null); + + /** Parameter entityType */ + entityType?: (string|null); + + /** Parameter isList */ + isList?: (boolean|null); + + /** Parameter fillBehavior */ + fillBehavior?: (google.cloud.dialogflow.cx.v3beta1.Form.Parameter.IFillBehavior|null); + + /** Parameter defaultValue */ + defaultValue?: (google.protobuf.IValue|null); + + /** Parameter redact */ + redact?: (boolean|null); } - /** Represents a Text. */ - class Text implements IText { + /** Represents a Parameter. */ + class Parameter implements IParameter { /** - * Constructs a new Text. + * Constructs a new Parameter. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IText); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.Form.IParameter); - /** Text text. */ - public text: string[]; + /** Parameter displayName. */ + public displayName: string; - /** Text allowPlaybackInterruption. */ - public allowPlaybackInterruption: boolean; + /** Parameter required. */ + public required: boolean; + + /** Parameter entityType. */ + public entityType: string; + + /** Parameter isList. */ + public isList: boolean; + + /** Parameter fillBehavior. */ + public fillBehavior?: (google.cloud.dialogflow.cx.v3beta1.Form.Parameter.IFillBehavior|null); + + /** Parameter defaultValue. */ + public defaultValue?: (google.protobuf.IValue|null); + + /** Parameter redact. */ + public redact: boolean; /** - * Creates a new Text instance using the specified properties. + * Creates a new Parameter instance using the specified properties. * @param [properties] Properties to set - * @returns Text instance + * @returns Parameter instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IText): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.Form.IParameter): google.cloud.dialogflow.cx.v3beta1.Form.Parameter; /** - * Encodes the specified Text message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text.verify|verify} messages. - * @param message Text message or plain object to encode + * Encodes the specified Parameter message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Form.Parameter.verify|verify} messages. + * @param message Parameter message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IText, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.Form.IParameter, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Text message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text.verify|verify} messages. - * @param message Text message or plain object to encode + * Encodes the specified Parameter message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Form.Parameter.verify|verify} messages. + * @param message Parameter message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IText, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.Form.IParameter, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Text message from the specified reader or buffer. + * Decodes a Parameter message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Text + * @returns Parameter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.Form.Parameter; /** - * Decodes a Text message from the specified reader or buffer, length delimited. + * Decodes a Parameter message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Text + * @returns Parameter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.Form.Parameter; /** - * Verifies a Text message. + * Verifies a Parameter message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Text message from a plain object. Also converts values to their respective internal types. + * Creates a Parameter message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Text + * @returns Parameter */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.Form.Parameter; /** - * Creates a plain object from a Text message. Also converts values to other types if specified. - * @param message Text + * Creates a plain object from a Parameter message. Also converts values to other types if specified. + * @param message Parameter * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.Form.Parameter, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Text to JSON. + * Converts this Parameter to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a LiveAgentHandoff. */ - interface ILiveAgentHandoff { + namespace Parameter { - /** LiveAgentHandoff metadata */ - metadata?: (google.protobuf.IStruct|null); - } + /** Properties of a FillBehavior. */ + interface IFillBehavior { - /** Represents a LiveAgentHandoff. */ - class LiveAgentHandoff implements ILiveAgentHandoff { + /** FillBehavior initialPromptFulfillment */ + initialPromptFulfillment?: (google.cloud.dialogflow.cx.v3beta1.IFulfillment|null); - /** - * Constructs a new LiveAgentHandoff. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ILiveAgentHandoff); + /** FillBehavior repromptEventHandlers */ + repromptEventHandlers?: (google.cloud.dialogflow.cx.v3beta1.IEventHandler[]|null); + } - /** LiveAgentHandoff metadata. */ - public metadata?: (google.protobuf.IStruct|null); + /** Represents a FillBehavior. */ + class FillBehavior implements IFillBehavior { - /** - * Creates a new LiveAgentHandoff instance using the specified properties. - * @param [properties] Properties to set - * @returns LiveAgentHandoff instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ILiveAgentHandoff): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff; + /** + * Constructs a new FillBehavior. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.Form.Parameter.IFillBehavior); - /** - * Encodes the specified LiveAgentHandoff message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff.verify|verify} messages. - * @param message LiveAgentHandoff message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ILiveAgentHandoff, writer?: $protobuf.Writer): $protobuf.Writer; + /** FillBehavior initialPromptFulfillment. */ + public initialPromptFulfillment?: (google.cloud.dialogflow.cx.v3beta1.IFulfillment|null); - /** - * Encodes the specified LiveAgentHandoff message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff.verify|verify} messages. - * @param message LiveAgentHandoff message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ILiveAgentHandoff, writer?: $protobuf.Writer): $protobuf.Writer; + /** FillBehavior repromptEventHandlers. */ + public repromptEventHandlers: google.cloud.dialogflow.cx.v3beta1.IEventHandler[]; - /** - * Decodes a LiveAgentHandoff message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LiveAgentHandoff - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff; + /** + * Creates a new FillBehavior instance using the specified properties. + * @param [properties] Properties to set + * @returns FillBehavior instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.Form.Parameter.IFillBehavior): google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior; - /** - * Decodes a LiveAgentHandoff message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LiveAgentHandoff - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff; + /** + * Encodes the specified FillBehavior message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.verify|verify} messages. + * @param message FillBehavior message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.Form.Parameter.IFillBehavior, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Verifies a LiveAgentHandoff message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Encodes the specified FillBehavior message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.verify|verify} messages. + * @param message FillBehavior message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.Form.Parameter.IFillBehavior, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a LiveAgentHandoff message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LiveAgentHandoff - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff; + /** + * Decodes a FillBehavior message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FillBehavior + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior; - /** - * Creates a plain object from a LiveAgentHandoff message. Also converts values to other types if specified. - * @param message LiveAgentHandoff - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Decodes a FillBehavior message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FillBehavior + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior; - /** - * Converts this LiveAgentHandoff to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Verifies a FillBehavior message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Properties of a ConversationSuccess. */ - interface IConversationSuccess { + /** + * Creates a FillBehavior message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FillBehavior + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior; - /** ConversationSuccess metadata */ - metadata?: (google.protobuf.IStruct|null); - } + /** + * Creates a plain object from a FillBehavior message. Also converts values to other types if specified. + * @param message FillBehavior + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Represents a ConversationSuccess. */ - class ConversationSuccess implements IConversationSuccess { + /** + * Converts this FillBehavior to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + } - /** - * Constructs a new ConversationSuccess. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IConversationSuccess); + /** Properties of an EventHandler. */ + interface IEventHandler { - /** ConversationSuccess metadata. */ - public metadata?: (google.protobuf.IStruct|null); + /** EventHandler name */ + name?: (string|null); - /** - * Creates a new ConversationSuccess instance using the specified properties. - * @param [properties] Properties to set - * @returns ConversationSuccess instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IConversationSuccess): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess; + /** EventHandler event */ + event?: (string|null); - /** - * Encodes the specified ConversationSuccess message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess.verify|verify} messages. - * @param message ConversationSuccess message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IConversationSuccess, writer?: $protobuf.Writer): $protobuf.Writer; + /** EventHandler triggerFulfillment */ + triggerFulfillment?: (google.cloud.dialogflow.cx.v3beta1.IFulfillment|null); - /** - * Encodes the specified ConversationSuccess message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess.verify|verify} messages. - * @param message ConversationSuccess message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IConversationSuccess, writer?: $protobuf.Writer): $protobuf.Writer; + /** EventHandler targetPage */ + targetPage?: (string|null); - /** - * Decodes a ConversationSuccess message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ConversationSuccess - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess; + /** EventHandler targetFlow */ + targetFlow?: (string|null); + } - /** - * Decodes a ConversationSuccess message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ConversationSuccess - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess; + /** Represents an EventHandler. */ + class EventHandler implements IEventHandler { - /** - * Verifies a ConversationSuccess message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Constructs a new EventHandler. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IEventHandler); - /** - * Creates a ConversationSuccess message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ConversationSuccess - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess; + /** EventHandler name. */ + public name: string; - /** - * Creates a plain object from a ConversationSuccess message. Also converts values to other types if specified. - * @param message ConversationSuccess - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** EventHandler event. */ + public event: string; - /** - * Converts this ConversationSuccess to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** EventHandler triggerFulfillment. */ + public triggerFulfillment?: (google.cloud.dialogflow.cx.v3beta1.IFulfillment|null); - /** Properties of an OutputAudioText. */ - interface IOutputAudioText { + /** EventHandler targetPage. */ + public targetPage: string; - /** OutputAudioText text */ - text?: (string|null); + /** EventHandler targetFlow. */ + public targetFlow: string; - /** OutputAudioText ssml */ - ssml?: (string|null); + /** EventHandler target. */ + public target?: ("targetPage"|"targetFlow"); - /** OutputAudioText allowPlaybackInterruption */ - allowPlaybackInterruption?: (boolean|null); - } + /** + * Creates a new EventHandler instance using the specified properties. + * @param [properties] Properties to set + * @returns EventHandler instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IEventHandler): google.cloud.dialogflow.cx.v3beta1.EventHandler; - /** Represents an OutputAudioText. */ - class OutputAudioText implements IOutputAudioText { + /** + * Encodes the specified EventHandler message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.EventHandler.verify|verify} messages. + * @param message EventHandler message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IEventHandler, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Constructs a new OutputAudioText. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IOutputAudioText); + /** + * Encodes the specified EventHandler message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.EventHandler.verify|verify} messages. + * @param message EventHandler message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IEventHandler, writer?: $protobuf.Writer): $protobuf.Writer; - /** OutputAudioText text. */ - public text: string; + /** + * Decodes an EventHandler message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EventHandler + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.EventHandler; - /** OutputAudioText ssml. */ - public ssml: string; + /** + * Decodes an EventHandler message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EventHandler + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.EventHandler; - /** OutputAudioText allowPlaybackInterruption. */ - public allowPlaybackInterruption: boolean; + /** + * Verifies an EventHandler message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** OutputAudioText source. */ - public source?: ("text"|"ssml"); + /** + * Creates an EventHandler message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EventHandler + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.EventHandler; - /** - * Creates a new OutputAudioText instance using the specified properties. - * @param [properties] Properties to set - * @returns OutputAudioText instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IOutputAudioText): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText; + /** + * Creates a plain object from an EventHandler message. Also converts values to other types if specified. + * @param message EventHandler + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.EventHandler, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Encodes the specified OutputAudioText message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText.verify|verify} messages. - * @param message OutputAudioText message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IOutputAudioText, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Converts this EventHandler to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Encodes the specified OutputAudioText message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText.verify|verify} messages. - * @param message OutputAudioText message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IOutputAudioText, writer?: $protobuf.Writer): $protobuf.Writer; + /** Properties of a TransitionRoute. */ + interface ITransitionRoute { - /** - * Decodes an OutputAudioText message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OutputAudioText - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText; + /** TransitionRoute name */ + name?: (string|null); - /** - * Decodes an OutputAudioText message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OutputAudioText - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText; + /** TransitionRoute intent */ + intent?: (string|null); - /** - * Verifies an OutputAudioText message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** TransitionRoute condition */ + condition?: (string|null); - /** - * Creates an OutputAudioText message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OutputAudioText - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText; + /** TransitionRoute triggerFulfillment */ + triggerFulfillment?: (google.cloud.dialogflow.cx.v3beta1.IFulfillment|null); - /** - * Creates a plain object from an OutputAudioText message. Also converts values to other types if specified. - * @param message OutputAudioText - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** TransitionRoute targetPage */ + targetPage?: (string|null); - /** - * Converts this OutputAudioText to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** TransitionRoute targetFlow */ + targetFlow?: (string|null); + } - /** Properties of a PlayAudio. */ - interface IPlayAudio { + /** Represents a TransitionRoute. */ + class TransitionRoute implements ITransitionRoute { - /** PlayAudio audioUri */ - audioUri?: (string|null); + /** + * Constructs a new TransitionRoute. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ITransitionRoute); - /** PlayAudio allowPlaybackInterruption */ - allowPlaybackInterruption?: (boolean|null); - } + /** TransitionRoute name. */ + public name: string; - /** Represents a PlayAudio. */ - class PlayAudio implements IPlayAudio { + /** TransitionRoute intent. */ + public intent: string; - /** - * Constructs a new PlayAudio. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IPlayAudio); + /** TransitionRoute condition. */ + public condition: string; - /** PlayAudio audioUri. */ - public audioUri: string; + /** TransitionRoute triggerFulfillment. */ + public triggerFulfillment?: (google.cloud.dialogflow.cx.v3beta1.IFulfillment|null); - /** PlayAudio allowPlaybackInterruption. */ - public allowPlaybackInterruption: boolean; + /** TransitionRoute targetPage. */ + public targetPage: string; - /** - * Creates a new PlayAudio instance using the specified properties. - * @param [properties] Properties to set - * @returns PlayAudio instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IPlayAudio): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio; + /** TransitionRoute targetFlow. */ + public targetFlow: string; - /** - * Encodes the specified PlayAudio message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio.verify|verify} messages. - * @param message PlayAudio message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IPlayAudio, writer?: $protobuf.Writer): $protobuf.Writer; + /** TransitionRoute target. */ + public target?: ("targetPage"|"targetFlow"); - /** + /** + * Creates a new TransitionRoute instance using the specified properties. + * @param [properties] Properties to set + * @returns TransitionRoute instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ITransitionRoute): google.cloud.dialogflow.cx.v3beta1.TransitionRoute; + + /** + * Encodes the specified TransitionRoute message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TransitionRoute.verify|verify} messages. + * @param message TransitionRoute message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.ITransitionRoute, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TransitionRoute message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TransitionRoute.verify|verify} messages. + * @param message TransitionRoute message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ITransitionRoute, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TransitionRoute message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TransitionRoute + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.TransitionRoute; + + /** + * Decodes a TransitionRoute message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TransitionRoute + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.TransitionRoute; + + /** + * Verifies a TransitionRoute message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TransitionRoute message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TransitionRoute + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.TransitionRoute; + + /** + * Creates a plain object from a TransitionRoute message. Also converts values to other types if specified. + * @param message TransitionRoute + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.TransitionRoute, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TransitionRoute to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListPagesRequest. */ + interface IListPagesRequest { + + /** ListPagesRequest parent */ + parent?: (string|null); + + /** ListPagesRequest languageCode */ + languageCode?: (string|null); + + /** ListPagesRequest pageSize */ + pageSize?: (number|null); + + /** ListPagesRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListPagesRequest. */ + class ListPagesRequest implements IListPagesRequest { + + /** + * Constructs a new ListPagesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IListPagesRequest); + + /** ListPagesRequest parent. */ + public parent: string; + + /** ListPagesRequest languageCode. */ + public languageCode: string; + + /** ListPagesRequest pageSize. */ + public pageSize: number; + + /** ListPagesRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListPagesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListPagesRequest instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IListPagesRequest): google.cloud.dialogflow.cx.v3beta1.ListPagesRequest; + + /** + * Encodes the specified ListPagesRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListPagesRequest.verify|verify} messages. + * @param message ListPagesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IListPagesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListPagesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListPagesRequest.verify|verify} messages. + * @param message ListPagesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IListPagesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListPagesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListPagesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ListPagesRequest; + + /** + * Decodes a ListPagesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListPagesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ListPagesRequest; + + /** + * Verifies a ListPagesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListPagesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListPagesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ListPagesRequest; + + /** + * Creates a plain object from a ListPagesRequest message. Also converts values to other types if specified. + * @param message ListPagesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ListPagesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListPagesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListPagesResponse. */ + interface IListPagesResponse { + + /** ListPagesResponse pages */ + pages?: (google.cloud.dialogflow.cx.v3beta1.IPage[]|null); + + /** ListPagesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListPagesResponse. */ + class ListPagesResponse implements IListPagesResponse { + + /** + * Constructs a new ListPagesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IListPagesResponse); + + /** ListPagesResponse pages. */ + public pages: google.cloud.dialogflow.cx.v3beta1.IPage[]; + + /** ListPagesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListPagesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListPagesResponse instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IListPagesResponse): google.cloud.dialogflow.cx.v3beta1.ListPagesResponse; + + /** + * Encodes the specified ListPagesResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListPagesResponse.verify|verify} messages. + * @param message ListPagesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IListPagesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListPagesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListPagesResponse.verify|verify} messages. + * @param message ListPagesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IListPagesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListPagesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListPagesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ListPagesResponse; + + /** + * Decodes a ListPagesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListPagesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ListPagesResponse; + + /** + * Verifies a ListPagesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListPagesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListPagesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ListPagesResponse; + + /** + * Creates a plain object from a ListPagesResponse message. Also converts values to other types if specified. + * @param message ListPagesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ListPagesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListPagesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetPageRequest. */ + interface IGetPageRequest { + + /** GetPageRequest name */ + name?: (string|null); + + /** GetPageRequest languageCode */ + languageCode?: (string|null); + } + + /** Represents a GetPageRequest. */ + class GetPageRequest implements IGetPageRequest { + + /** + * Constructs a new GetPageRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IGetPageRequest); + + /** GetPageRequest name. */ + public name: string; + + /** GetPageRequest languageCode. */ + public languageCode: string; + + /** + * Creates a new GetPageRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetPageRequest instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IGetPageRequest): google.cloud.dialogflow.cx.v3beta1.GetPageRequest; + + /** + * Encodes the specified GetPageRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetPageRequest.verify|verify} messages. + * @param message GetPageRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IGetPageRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetPageRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetPageRequest.verify|verify} messages. + * @param message GetPageRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IGetPageRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetPageRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetPageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.GetPageRequest; + + /** + * Decodes a GetPageRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetPageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.GetPageRequest; + + /** + * Verifies a GetPageRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetPageRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetPageRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.GetPageRequest; + + /** + * Creates a plain object from a GetPageRequest message. Also converts values to other types if specified. + * @param message GetPageRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.GetPageRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetPageRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CreatePageRequest. */ + interface ICreatePageRequest { + + /** CreatePageRequest parent */ + parent?: (string|null); + + /** CreatePageRequest page */ + page?: (google.cloud.dialogflow.cx.v3beta1.IPage|null); + + /** CreatePageRequest languageCode */ + languageCode?: (string|null); + } + + /** Represents a CreatePageRequest. */ + class CreatePageRequest implements ICreatePageRequest { + + /** + * Constructs a new CreatePageRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ICreatePageRequest); + + /** CreatePageRequest parent. */ + public parent: string; + + /** CreatePageRequest page. */ + public page?: (google.cloud.dialogflow.cx.v3beta1.IPage|null); + + /** CreatePageRequest languageCode. */ + public languageCode: string; + + /** + * Creates a new CreatePageRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreatePageRequest instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ICreatePageRequest): google.cloud.dialogflow.cx.v3beta1.CreatePageRequest; + + /** + * Encodes the specified CreatePageRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreatePageRequest.verify|verify} messages. + * @param message CreatePageRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.ICreatePageRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreatePageRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreatePageRequest.verify|verify} messages. + * @param message CreatePageRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ICreatePageRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreatePageRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreatePageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.CreatePageRequest; + + /** + * Decodes a CreatePageRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreatePageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.CreatePageRequest; + + /** + * Verifies a CreatePageRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreatePageRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreatePageRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.CreatePageRequest; + + /** + * Creates a plain object from a CreatePageRequest message. Also converts values to other types if specified. + * @param message CreatePageRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.CreatePageRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreatePageRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UpdatePageRequest. */ + interface IUpdatePageRequest { + + /** UpdatePageRequest page */ + page?: (google.cloud.dialogflow.cx.v3beta1.IPage|null); + + /** UpdatePageRequest languageCode */ + languageCode?: (string|null); + + /** UpdatePageRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdatePageRequest. */ + class UpdatePageRequest implements IUpdatePageRequest { + + /** + * Constructs a new UpdatePageRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IUpdatePageRequest); + + /** UpdatePageRequest page. */ + public page?: (google.cloud.dialogflow.cx.v3beta1.IPage|null); + + /** UpdatePageRequest languageCode. */ + public languageCode: string; + + /** UpdatePageRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdatePageRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdatePageRequest instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IUpdatePageRequest): google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest; + + /** + * Encodes the specified UpdatePageRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest.verify|verify} messages. + * @param message UpdatePageRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IUpdatePageRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdatePageRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest.verify|verify} messages. + * @param message UpdatePageRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IUpdatePageRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdatePageRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdatePageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest; + + /** + * Decodes an UpdatePageRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdatePageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest; + + /** + * Verifies an UpdatePageRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdatePageRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdatePageRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest; + + /** + * Creates a plain object from an UpdatePageRequest message. Also converts values to other types if specified. + * @param message UpdatePageRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdatePageRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeletePageRequest. */ + interface IDeletePageRequest { + + /** DeletePageRequest name */ + name?: (string|null); + + /** DeletePageRequest force */ + force?: (boolean|null); + } + + /** Represents a DeletePageRequest. */ + class DeletePageRequest implements IDeletePageRequest { + + /** + * Constructs a new DeletePageRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IDeletePageRequest); + + /** DeletePageRequest name. */ + public name: string; + + /** DeletePageRequest force. */ + public force: boolean; + + /** + * Creates a new DeletePageRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeletePageRequest instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IDeletePageRequest): google.cloud.dialogflow.cx.v3beta1.DeletePageRequest; + + /** + * Encodes the specified DeletePageRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeletePageRequest.verify|verify} messages. + * @param message DeletePageRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IDeletePageRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeletePageRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeletePageRequest.verify|verify} messages. + * @param message DeletePageRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IDeletePageRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeletePageRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeletePageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.DeletePageRequest; + + /** + * Decodes a DeletePageRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeletePageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.DeletePageRequest; + + /** + * Verifies a DeletePageRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeletePageRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeletePageRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.DeletePageRequest; + + /** + * Creates a plain object from a DeletePageRequest message. Also converts values to other types if specified. + * @param message DeletePageRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.DeletePageRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeletePageRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Fulfillment. */ + interface IFulfillment { + + /** Fulfillment messages */ + messages?: (google.cloud.dialogflow.cx.v3beta1.IResponseMessage[]|null); + + /** Fulfillment webhook */ + webhook?: (string|null); + + /** Fulfillment tag */ + tag?: (string|null); + + /** Fulfillment setParameterActions */ + setParameterActions?: (google.cloud.dialogflow.cx.v3beta1.Fulfillment.ISetParameterAction[]|null); + + /** Fulfillment conditionalCases */ + conditionalCases?: (google.cloud.dialogflow.cx.v3beta1.Fulfillment.IConditionalCases[]|null); + } + + /** Represents a Fulfillment. */ + class Fulfillment implements IFulfillment { + + /** + * Constructs a new Fulfillment. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IFulfillment); + + /** Fulfillment messages. */ + public messages: google.cloud.dialogflow.cx.v3beta1.IResponseMessage[]; + + /** Fulfillment webhook. */ + public webhook: string; + + /** Fulfillment tag. */ + public tag: string; + + /** Fulfillment setParameterActions. */ + public setParameterActions: google.cloud.dialogflow.cx.v3beta1.Fulfillment.ISetParameterAction[]; + + /** Fulfillment conditionalCases. */ + public conditionalCases: google.cloud.dialogflow.cx.v3beta1.Fulfillment.IConditionalCases[]; + + /** + * Creates a new Fulfillment instance using the specified properties. + * @param [properties] Properties to set + * @returns Fulfillment instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IFulfillment): google.cloud.dialogflow.cx.v3beta1.Fulfillment; + + /** + * Encodes the specified Fulfillment message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.verify|verify} messages. + * @param message Fulfillment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IFulfillment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Fulfillment message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.verify|verify} messages. + * @param message Fulfillment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IFulfillment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Fulfillment message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Fulfillment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.Fulfillment; + + /** + * Decodes a Fulfillment message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Fulfillment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.Fulfillment; + + /** + * Verifies a Fulfillment message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Fulfillment message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Fulfillment + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.Fulfillment; + + /** + * Creates a plain object from a Fulfillment message. Also converts values to other types if specified. + * @param message Fulfillment + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.Fulfillment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Fulfillment to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Fulfillment { + + /** Properties of a SetParameterAction. */ + interface ISetParameterAction { + + /** SetParameterAction parameter */ + parameter?: (string|null); + + /** SetParameterAction value */ + value?: (google.protobuf.IValue|null); + } + + /** Represents a SetParameterAction. */ + class SetParameterAction implements ISetParameterAction { + + /** + * Constructs a new SetParameterAction. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.Fulfillment.ISetParameterAction); + + /** SetParameterAction parameter. */ + public parameter: string; + + /** SetParameterAction value. */ + public value?: (google.protobuf.IValue|null); + + /** + * Creates a new SetParameterAction instance using the specified properties. + * @param [properties] Properties to set + * @returns SetParameterAction instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.Fulfillment.ISetParameterAction): google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction; + + /** + * Encodes the specified SetParameterAction message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction.verify|verify} messages. + * @param message SetParameterAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.Fulfillment.ISetParameterAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SetParameterAction message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction.verify|verify} messages. + * @param message SetParameterAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.Fulfillment.ISetParameterAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SetParameterAction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetParameterAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction; + + /** + * Decodes a SetParameterAction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetParameterAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction; + + /** + * Verifies a SetParameterAction message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SetParameterAction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetParameterAction + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction; + + /** + * Creates a plain object from a SetParameterAction message. Also converts values to other types if specified. + * @param message SetParameterAction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SetParameterAction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ConditionalCases. */ + interface IConditionalCases { + + /** ConditionalCases cases */ + cases?: (google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.ICase[]|null); + } + + /** Represents a ConditionalCases. */ + class ConditionalCases implements IConditionalCases { + + /** + * Constructs a new ConditionalCases. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.Fulfillment.IConditionalCases); + + /** ConditionalCases cases. */ + public cases: google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.ICase[]; + + /** + * Creates a new ConditionalCases instance using the specified properties. + * @param [properties] Properties to set + * @returns ConditionalCases instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.Fulfillment.IConditionalCases): google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases; + + /** + * Encodes the specified ConditionalCases message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.verify|verify} messages. + * @param message ConditionalCases message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.Fulfillment.IConditionalCases, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConditionalCases message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.verify|verify} messages. + * @param message ConditionalCases message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.Fulfillment.IConditionalCases, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConditionalCases message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConditionalCases + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases; + + /** + * Decodes a ConditionalCases message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConditionalCases + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases; + + /** + * Verifies a ConditionalCases message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ConditionalCases message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConditionalCases + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases; + + /** + * Creates a plain object from a ConditionalCases message. Also converts values to other types if specified. + * @param message ConditionalCases + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConditionalCases to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace ConditionalCases { + + /** Properties of a Case. */ + interface ICase { + + /** Case condition */ + condition?: (string|null); + + /** Case caseContent */ + caseContent?: (google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.ICaseContent[]|null); + } + + /** Represents a Case. */ + class Case implements ICase { + + /** + * Constructs a new Case. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.ICase); + + /** Case condition. */ + public condition: string; + + /** Case caseContent. */ + public caseContent: google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.ICaseContent[]; + + /** + * Creates a new Case instance using the specified properties. + * @param [properties] Properties to set + * @returns Case instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.ICase): google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case; + + /** + * Encodes the specified Case message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.verify|verify} messages. + * @param message Case message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.ICase, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Case message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.verify|verify} messages. + * @param message Case message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.ICase, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Case message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Case + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case; + + /** + * Decodes a Case message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Case + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case; + + /** + * Verifies a Case message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Case message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Case + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case; + + /** + * Creates a plain object from a Case message. Also converts values to other types if specified. + * @param message Case + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Case to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Case { + + /** Properties of a CaseContent. */ + interface ICaseContent { + + /** CaseContent message */ + message?: (google.cloud.dialogflow.cx.v3beta1.IResponseMessage|null); + + /** CaseContent additionalCases */ + additionalCases?: (google.cloud.dialogflow.cx.v3beta1.Fulfillment.IConditionalCases|null); + } + + /** Represents a CaseContent. */ + class CaseContent implements ICaseContent { + + /** + * Constructs a new CaseContent. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.ICaseContent); + + /** CaseContent message. */ + public message?: (google.cloud.dialogflow.cx.v3beta1.IResponseMessage|null); + + /** CaseContent additionalCases. */ + public additionalCases?: (google.cloud.dialogflow.cx.v3beta1.Fulfillment.IConditionalCases|null); + + /** CaseContent casesOrMessage. */ + public casesOrMessage?: ("message"|"additionalCases"); + + /** + * Creates a new CaseContent instance using the specified properties. + * @param [properties] Properties to set + * @returns CaseContent instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.ICaseContent): google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent; + + /** + * Encodes the specified CaseContent message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent.verify|verify} messages. + * @param message CaseContent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.ICaseContent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CaseContent message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent.verify|verify} messages. + * @param message CaseContent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.ICaseContent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CaseContent message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CaseContent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent; + + /** + * Decodes a CaseContent message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CaseContent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent; + + /** + * Verifies a CaseContent message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CaseContent message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CaseContent + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent; + + /** + * Creates a plain object from a CaseContent message. Also converts values to other types if specified. + * @param message CaseContent + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CaseContent to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + } + } + + /** Properties of a ResponseMessage. */ + interface IResponseMessage { + + /** ResponseMessage text */ + text?: (google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IText|null); + + /** ResponseMessage payload */ + payload?: (google.protobuf.IStruct|null); + + /** ResponseMessage conversationSuccess */ + conversationSuccess?: (google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IConversationSuccess|null); + + /** ResponseMessage outputAudioText */ + outputAudioText?: (google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IOutputAudioText|null); + + /** ResponseMessage liveAgentHandoff */ + liveAgentHandoff?: (google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ILiveAgentHandoff|null); + + /** ResponseMessage endInteraction */ + endInteraction?: (google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IEndInteraction|null); + + /** ResponseMessage playAudio */ + playAudio?: (google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IPlayAudio|null); + + /** ResponseMessage mixedAudio */ + mixedAudio?: (google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IMixedAudio|null); + } + + /** Represents a ResponseMessage. */ + class ResponseMessage implements IResponseMessage { + + /** + * Constructs a new ResponseMessage. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IResponseMessage); + + /** ResponseMessage text. */ + public text?: (google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IText|null); + + /** ResponseMessage payload. */ + public payload?: (google.protobuf.IStruct|null); + + /** ResponseMessage conversationSuccess. */ + public conversationSuccess?: (google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IConversationSuccess|null); + + /** ResponseMessage outputAudioText. */ + public outputAudioText?: (google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IOutputAudioText|null); + + /** ResponseMessage liveAgentHandoff. */ + public liveAgentHandoff?: (google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ILiveAgentHandoff|null); + + /** ResponseMessage endInteraction. */ + public endInteraction?: (google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IEndInteraction|null); + + /** ResponseMessage playAudio. */ + public playAudio?: (google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IPlayAudio|null); + + /** ResponseMessage mixedAudio. */ + public mixedAudio?: (google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IMixedAudio|null); + + /** ResponseMessage message. */ + public message?: ("text"|"payload"|"conversationSuccess"|"outputAudioText"|"liveAgentHandoff"|"endInteraction"|"playAudio"|"mixedAudio"); + + /** + * Creates a new ResponseMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns ResponseMessage instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IResponseMessage): google.cloud.dialogflow.cx.v3beta1.ResponseMessage; + + /** + * Encodes the specified ResponseMessage message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.verify|verify} messages. + * @param message ResponseMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IResponseMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResponseMessage message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.verify|verify} messages. + * @param message ResponseMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IResponseMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResponseMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResponseMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ResponseMessage; + + /** + * Decodes a ResponseMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResponseMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ResponseMessage; + + /** + * Verifies a ResponseMessage message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResponseMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResponseMessage + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ResponseMessage; + + /** + * Creates a plain object from a ResponseMessage message. Also converts values to other types if specified. + * @param message ResponseMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResponseMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace ResponseMessage { + + /** Properties of a Text. */ + interface IText { + + /** Text text */ + text?: (string[]|null); + + /** Text allowPlaybackInterruption */ + allowPlaybackInterruption?: (boolean|null); + } + + /** Represents a Text. */ + class Text implements IText { + + /** + * Constructs a new Text. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IText); + + /** Text text. */ + public text: string[]; + + /** Text allowPlaybackInterruption. */ + public allowPlaybackInterruption: boolean; + + /** + * Creates a new Text instance using the specified properties. + * @param [properties] Properties to set + * @returns Text instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IText): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text; + + /** + * Encodes the specified Text message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text.verify|verify} messages. + * @param message Text message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IText, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Text message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text.verify|verify} messages. + * @param message Text message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IText, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Text message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Text + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text; + + /** + * Decodes a Text message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Text + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text; + + /** + * Verifies a Text message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Text message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Text + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text; + + /** + * Creates a plain object from a Text message. Also converts values to other types if specified. + * @param message Text + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Text to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a LiveAgentHandoff. */ + interface ILiveAgentHandoff { + + /** LiveAgentHandoff metadata */ + metadata?: (google.protobuf.IStruct|null); + } + + /** Represents a LiveAgentHandoff. */ + class LiveAgentHandoff implements ILiveAgentHandoff { + + /** + * Constructs a new LiveAgentHandoff. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ILiveAgentHandoff); + + /** LiveAgentHandoff metadata. */ + public metadata?: (google.protobuf.IStruct|null); + + /** + * Creates a new LiveAgentHandoff instance using the specified properties. + * @param [properties] Properties to set + * @returns LiveAgentHandoff instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ILiveAgentHandoff): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff; + + /** + * Encodes the specified LiveAgentHandoff message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff.verify|verify} messages. + * @param message LiveAgentHandoff message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ILiveAgentHandoff, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LiveAgentHandoff message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff.verify|verify} messages. + * @param message LiveAgentHandoff message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ILiveAgentHandoff, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LiveAgentHandoff message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LiveAgentHandoff + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff; + + /** + * Decodes a LiveAgentHandoff message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LiveAgentHandoff + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff; + + /** + * Verifies a LiveAgentHandoff message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LiveAgentHandoff message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LiveAgentHandoff + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff; + + /** + * Creates a plain object from a LiveAgentHandoff message. Also converts values to other types if specified. + * @param message LiveAgentHandoff + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LiveAgentHandoff to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ConversationSuccess. */ + interface IConversationSuccess { + + /** ConversationSuccess metadata */ + metadata?: (google.protobuf.IStruct|null); + } + + /** Represents a ConversationSuccess. */ + class ConversationSuccess implements IConversationSuccess { + + /** + * Constructs a new ConversationSuccess. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IConversationSuccess); + + /** ConversationSuccess metadata. */ + public metadata?: (google.protobuf.IStruct|null); + + /** + * Creates a new ConversationSuccess instance using the specified properties. + * @param [properties] Properties to set + * @returns ConversationSuccess instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IConversationSuccess): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess; + + /** + * Encodes the specified ConversationSuccess message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess.verify|verify} messages. + * @param message ConversationSuccess message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IConversationSuccess, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConversationSuccess message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess.verify|verify} messages. + * @param message ConversationSuccess message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IConversationSuccess, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConversationSuccess message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConversationSuccess + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess; + + /** + * Decodes a ConversationSuccess message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConversationSuccess + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess; + + /** + * Verifies a ConversationSuccess message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ConversationSuccess message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConversationSuccess + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess; + + /** + * Creates a plain object from a ConversationSuccess message. Also converts values to other types if specified. + * @param message ConversationSuccess + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConversationSuccess to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an OutputAudioText. */ + interface IOutputAudioText { + + /** OutputAudioText text */ + text?: (string|null); + + /** OutputAudioText ssml */ + ssml?: (string|null); + + /** OutputAudioText allowPlaybackInterruption */ + allowPlaybackInterruption?: (boolean|null); + } + + /** Represents an OutputAudioText. */ + class OutputAudioText implements IOutputAudioText { + + /** + * Constructs a new OutputAudioText. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IOutputAudioText); + + /** OutputAudioText text. */ + public text: string; + + /** OutputAudioText ssml. */ + public ssml: string; + + /** OutputAudioText allowPlaybackInterruption. */ + public allowPlaybackInterruption: boolean; + + /** OutputAudioText source. */ + public source?: ("text"|"ssml"); + + /** + * Creates a new OutputAudioText instance using the specified properties. + * @param [properties] Properties to set + * @returns OutputAudioText instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IOutputAudioText): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText; + + /** + * Encodes the specified OutputAudioText message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText.verify|verify} messages. + * @param message OutputAudioText message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IOutputAudioText, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OutputAudioText message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText.verify|verify} messages. + * @param message OutputAudioText message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IOutputAudioText, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OutputAudioText message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OutputAudioText + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText; + + /** + * Decodes an OutputAudioText message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OutputAudioText + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText; + + /** + * Verifies an OutputAudioText message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OutputAudioText message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OutputAudioText + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText; + + /** + * Creates a plain object from an OutputAudioText message. Also converts values to other types if specified. + * @param message OutputAudioText + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OutputAudioText to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MixedAudio. */ + interface IMixedAudio { + + /** MixedAudio segments */ + segments?: (google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.ISegment[]|null); + } + + /** Represents a MixedAudio. */ + class MixedAudio implements IMixedAudio { + + /** + * Constructs a new MixedAudio. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IMixedAudio); + + /** MixedAudio segments. */ + public segments: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.ISegment[]; + + /** + * Creates a new MixedAudio instance using the specified properties. + * @param [properties] Properties to set + * @returns MixedAudio instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IMixedAudio): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio; + + /** + * Encodes the specified MixedAudio message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.verify|verify} messages. + * @param message MixedAudio message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IMixedAudio, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MixedAudio message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.verify|verify} messages. + * @param message MixedAudio message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IMixedAudio, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MixedAudio message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MixedAudio + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio; + + /** + * Decodes a MixedAudio message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MixedAudio + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio; + + /** + * Verifies a MixedAudio message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MixedAudio message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MixedAudio + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio; + + /** + * Creates a plain object from a MixedAudio message. Also converts values to other types if specified. + * @param message MixedAudio + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MixedAudio to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace MixedAudio { + + /** Properties of a Segment. */ + interface ISegment { + + /** Segment audio */ + audio?: (Uint8Array|string|null); + + /** Segment uri */ + uri?: (string|null); + + /** Segment allowPlaybackInterruption */ + allowPlaybackInterruption?: (boolean|null); + } + + /** Represents a Segment. */ + class Segment implements ISegment { + + /** + * Constructs a new Segment. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.ISegment); + + /** Segment audio. */ + public audio: (Uint8Array|string); + + /** Segment uri. */ + public uri: string; + + /** Segment allowPlaybackInterruption. */ + public allowPlaybackInterruption: boolean; + + /** Segment content. */ + public content?: ("audio"|"uri"); + + /** + * Creates a new Segment instance using the specified properties. + * @param [properties] Properties to set + * @returns Segment instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.ISegment): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment; + + /** + * Encodes the specified Segment message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment.verify|verify} messages. + * @param message Segment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.ISegment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Segment message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment.verify|verify} messages. + * @param message Segment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.ISegment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Segment message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Segment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment; + + /** + * Decodes a Segment message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Segment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment; + + /** + * Verifies a Segment message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Segment message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Segment + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment; + + /** + * Creates a plain object from a Segment message. Also converts values to other types if specified. + * @param message Segment + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Segment to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of an EndInteraction. */ + interface IEndInteraction { + } + + /** Represents an EndInteraction. */ + class EndInteraction implements IEndInteraction { + + /** + * Constructs a new EndInteraction. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IEndInteraction); + + /** + * Creates a new EndInteraction instance using the specified properties. + * @param [properties] Properties to set + * @returns EndInteraction instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IEndInteraction): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction; + + /** + * Encodes the specified EndInteraction message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction.verify|verify} messages. + * @param message EndInteraction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IEndInteraction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EndInteraction message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction.verify|verify} messages. + * @param message EndInteraction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IEndInteraction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EndInteraction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EndInteraction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction; + + /** + * Decodes an EndInteraction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EndInteraction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction; + + /** + * Verifies an EndInteraction message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EndInteraction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EndInteraction + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction; + + /** + * Creates a plain object from an EndInteraction message. Also converts values to other types if specified. + * @param message EndInteraction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EndInteraction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a PlayAudio. */ + interface IPlayAudio { + + /** PlayAudio audioUri */ + audioUri?: (string|null); + + /** PlayAudio allowPlaybackInterruption */ + allowPlaybackInterruption?: (boolean|null); + } + + /** Represents a PlayAudio. */ + class PlayAudio implements IPlayAudio { + + /** + * Constructs a new PlayAudio. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IPlayAudio); + + /** PlayAudio audioUri. */ + public audioUri: string; + + /** PlayAudio allowPlaybackInterruption. */ + public allowPlaybackInterruption: boolean; + + /** + * Creates a new PlayAudio instance using the specified properties. + * @param [properties] Properties to set + * @returns PlayAudio instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IPlayAudio): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio; + + /** + * Encodes the specified PlayAudio message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio.verify|verify} messages. + * @param message PlayAudio message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IPlayAudio, writer?: $protobuf.Writer): $protobuf.Writer; + + /** * Encodes the specified PlayAudio message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio.verify|verify} messages. * @param message PlayAudio message or plain object to encode * @param [writer] Writer to encode to @@ -21719,1775 +23912,2551 @@ export namespace google { */ public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IPlayAudio, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a PlayAudio message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PlayAudio - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio; + /** + * Decodes a PlayAudio message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PlayAudio + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio; + + /** + * Decodes a PlayAudio message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PlayAudio + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio; + + /** + * Verifies a PlayAudio message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PlayAudio message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PlayAudio + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio; + + /** + * Creates a plain object from a PlayAudio message. Also converts values to other types if specified. + * @param message PlayAudio + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PlayAudio to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Represents a SecuritySettingsService */ + class SecuritySettingsService extends $protobuf.rpc.Service { + + /** + * Constructs a new SecuritySettingsService service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new SecuritySettingsService service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): SecuritySettingsService; + + /** + * Calls CreateSecuritySettings. + * @param request CreateSecuritySettingsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SecuritySettings + */ + public createSecuritySettings(request: google.cloud.dialogflow.cx.v3beta1.ICreateSecuritySettingsRequest, callback: google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService.CreateSecuritySettingsCallback): void; + + /** + * Calls CreateSecuritySettings. + * @param request CreateSecuritySettingsRequest message or plain object + * @returns Promise + */ + public createSecuritySettings(request: google.cloud.dialogflow.cx.v3beta1.ICreateSecuritySettingsRequest): Promise; + + /** + * Calls GetSecuritySettings. + * @param request GetSecuritySettingsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SecuritySettings + */ + public getSecuritySettings(request: google.cloud.dialogflow.cx.v3beta1.IGetSecuritySettingsRequest, callback: google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService.GetSecuritySettingsCallback): void; + + /** + * Calls GetSecuritySettings. + * @param request GetSecuritySettingsRequest message or plain object + * @returns Promise + */ + public getSecuritySettings(request: google.cloud.dialogflow.cx.v3beta1.IGetSecuritySettingsRequest): Promise; + + /** + * Calls UpdateSecuritySettings. + * @param request UpdateSecuritySettingsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SecuritySettings + */ + public updateSecuritySettings(request: google.cloud.dialogflow.cx.v3beta1.IUpdateSecuritySettingsRequest, callback: google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService.UpdateSecuritySettingsCallback): void; + + /** + * Calls UpdateSecuritySettings. + * @param request UpdateSecuritySettingsRequest message or plain object + * @returns Promise + */ + public updateSecuritySettings(request: google.cloud.dialogflow.cx.v3beta1.IUpdateSecuritySettingsRequest): Promise; + + /** + * Calls ListSecuritySettings. + * @param request ListSecuritySettingsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListSecuritySettingsResponse + */ + public listSecuritySettings(request: google.cloud.dialogflow.cx.v3beta1.IListSecuritySettingsRequest, callback: google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService.ListSecuritySettingsCallback): void; + + /** + * Calls ListSecuritySettings. + * @param request ListSecuritySettingsRequest message or plain object + * @returns Promise + */ + public listSecuritySettings(request: google.cloud.dialogflow.cx.v3beta1.IListSecuritySettingsRequest): Promise; + + /** + * Calls DeleteSecuritySettings. + * @param request DeleteSecuritySettingsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteSecuritySettings(request: google.cloud.dialogflow.cx.v3beta1.IDeleteSecuritySettingsRequest, callback: google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService.DeleteSecuritySettingsCallback): void; + + /** + * Calls DeleteSecuritySettings. + * @param request DeleteSecuritySettingsRequest message or plain object + * @returns Promise + */ + public deleteSecuritySettings(request: google.cloud.dialogflow.cx.v3beta1.IDeleteSecuritySettingsRequest): Promise; + } + + namespace SecuritySettingsService { + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService#createSecuritySettings}. + * @param error Error, if any + * @param [response] SecuritySettings + */ + type CreateSecuritySettingsCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.SecuritySettings) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService#getSecuritySettings}. + * @param error Error, if any + * @param [response] SecuritySettings + */ + type GetSecuritySettingsCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.SecuritySettings) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService#updateSecuritySettings}. + * @param error Error, if any + * @param [response] SecuritySettings + */ + type UpdateSecuritySettingsCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.SecuritySettings) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService#listSecuritySettings}. + * @param error Error, if any + * @param [response] ListSecuritySettingsResponse + */ + type ListSecuritySettingsCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsResponse) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService#deleteSecuritySettings}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteSecuritySettingsCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + } + + /** Properties of a GetSecuritySettingsRequest. */ + interface IGetSecuritySettingsRequest { + + /** GetSecuritySettingsRequest name */ + name?: (string|null); + } + + /** Represents a GetSecuritySettingsRequest. */ + class GetSecuritySettingsRequest implements IGetSecuritySettingsRequest { + + /** + * Constructs a new GetSecuritySettingsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IGetSecuritySettingsRequest); + + /** GetSecuritySettingsRequest name. */ + public name: string; + + /** + * Creates a new GetSecuritySettingsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetSecuritySettingsRequest instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IGetSecuritySettingsRequest): google.cloud.dialogflow.cx.v3beta1.GetSecuritySettingsRequest; + + /** + * Encodes the specified GetSecuritySettingsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetSecuritySettingsRequest.verify|verify} messages. + * @param message GetSecuritySettingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IGetSecuritySettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetSecuritySettingsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetSecuritySettingsRequest.verify|verify} messages. + * @param message GetSecuritySettingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IGetSecuritySettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetSecuritySettingsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetSecuritySettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.GetSecuritySettingsRequest; + + /** + * Decodes a GetSecuritySettingsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetSecuritySettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.GetSecuritySettingsRequest; + + /** + * Verifies a GetSecuritySettingsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetSecuritySettingsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetSecuritySettingsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.GetSecuritySettingsRequest; + + /** + * Creates a plain object from a GetSecuritySettingsRequest message. Also converts values to other types if specified. + * @param message GetSecuritySettingsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.GetSecuritySettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetSecuritySettingsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UpdateSecuritySettingsRequest. */ + interface IUpdateSecuritySettingsRequest { + + /** UpdateSecuritySettingsRequest securitySettings */ + securitySettings?: (google.cloud.dialogflow.cx.v3beta1.ISecuritySettings|null); + + /** UpdateSecuritySettingsRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateSecuritySettingsRequest. */ + class UpdateSecuritySettingsRequest implements IUpdateSecuritySettingsRequest { + + /** + * Constructs a new UpdateSecuritySettingsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IUpdateSecuritySettingsRequest); + + /** UpdateSecuritySettingsRequest securitySettings. */ + public securitySettings?: (google.cloud.dialogflow.cx.v3beta1.ISecuritySettings|null); + + /** UpdateSecuritySettingsRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateSecuritySettingsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateSecuritySettingsRequest instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IUpdateSecuritySettingsRequest): google.cloud.dialogflow.cx.v3beta1.UpdateSecuritySettingsRequest; + + /** + * Encodes the specified UpdateSecuritySettingsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateSecuritySettingsRequest.verify|verify} messages. + * @param message UpdateSecuritySettingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IUpdateSecuritySettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateSecuritySettingsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateSecuritySettingsRequest.verify|verify} messages. + * @param message UpdateSecuritySettingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IUpdateSecuritySettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateSecuritySettingsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateSecuritySettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.UpdateSecuritySettingsRequest; + + /** + * Decodes an UpdateSecuritySettingsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateSecuritySettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.UpdateSecuritySettingsRequest; + + /** + * Verifies an UpdateSecuritySettingsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateSecuritySettingsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateSecuritySettingsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.UpdateSecuritySettingsRequest; + + /** + * Creates a plain object from an UpdateSecuritySettingsRequest message. Also converts values to other types if specified. + * @param message UpdateSecuritySettingsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.UpdateSecuritySettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateSecuritySettingsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListSecuritySettingsRequest. */ + interface IListSecuritySettingsRequest { + + /** ListSecuritySettingsRequest parent */ + parent?: (string|null); + + /** ListSecuritySettingsRequest pageSize */ + pageSize?: (number|null); + + /** ListSecuritySettingsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListSecuritySettingsRequest. */ + class ListSecuritySettingsRequest implements IListSecuritySettingsRequest { + + /** + * Constructs a new ListSecuritySettingsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IListSecuritySettingsRequest); + + /** ListSecuritySettingsRequest parent. */ + public parent: string; + + /** ListSecuritySettingsRequest pageSize. */ + public pageSize: number; + + /** ListSecuritySettingsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListSecuritySettingsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListSecuritySettingsRequest instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IListSecuritySettingsRequest): google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsRequest; + + /** + * Encodes the specified ListSecuritySettingsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsRequest.verify|verify} messages. + * @param message ListSecuritySettingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IListSecuritySettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListSecuritySettingsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsRequest.verify|verify} messages. + * @param message ListSecuritySettingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IListSecuritySettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListSecuritySettingsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListSecuritySettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsRequest; + + /** + * Decodes a ListSecuritySettingsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListSecuritySettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsRequest; + + /** + * Verifies a ListSecuritySettingsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListSecuritySettingsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListSecuritySettingsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsRequest; + + /** + * Creates a plain object from a ListSecuritySettingsRequest message. Also converts values to other types if specified. + * @param message ListSecuritySettingsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListSecuritySettingsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListSecuritySettingsResponse. */ + interface IListSecuritySettingsResponse { + + /** ListSecuritySettingsResponse securitySettings */ + securitySettings?: (google.cloud.dialogflow.cx.v3beta1.ISecuritySettings[]|null); + + /** ListSecuritySettingsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListSecuritySettingsResponse. */ + class ListSecuritySettingsResponse implements IListSecuritySettingsResponse { + + /** + * Constructs a new ListSecuritySettingsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IListSecuritySettingsResponse); + + /** ListSecuritySettingsResponse securitySettings. */ + public securitySettings: google.cloud.dialogflow.cx.v3beta1.ISecuritySettings[]; + + /** ListSecuritySettingsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListSecuritySettingsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListSecuritySettingsResponse instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IListSecuritySettingsResponse): google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsResponse; + + /** + * Encodes the specified ListSecuritySettingsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsResponse.verify|verify} messages. + * @param message ListSecuritySettingsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IListSecuritySettingsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListSecuritySettingsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsResponse.verify|verify} messages. + * @param message ListSecuritySettingsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IListSecuritySettingsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListSecuritySettingsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListSecuritySettingsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsResponse; + + /** + * Decodes a ListSecuritySettingsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListSecuritySettingsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsResponse; + + /** + * Verifies a ListSecuritySettingsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListSecuritySettingsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListSecuritySettingsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsResponse; + + /** + * Creates a plain object from a ListSecuritySettingsResponse message. Also converts values to other types if specified. + * @param message ListSecuritySettingsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListSecuritySettingsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CreateSecuritySettingsRequest. */ + interface ICreateSecuritySettingsRequest { + + /** CreateSecuritySettingsRequest parent */ + parent?: (string|null); + + /** CreateSecuritySettingsRequest securitySettings */ + securitySettings?: (google.cloud.dialogflow.cx.v3beta1.ISecuritySettings|null); + } + + /** Represents a CreateSecuritySettingsRequest. */ + class CreateSecuritySettingsRequest implements ICreateSecuritySettingsRequest { + + /** + * Constructs a new CreateSecuritySettingsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ICreateSecuritySettingsRequest); + + /** CreateSecuritySettingsRequest parent. */ + public parent: string; + + /** CreateSecuritySettingsRequest securitySettings. */ + public securitySettings?: (google.cloud.dialogflow.cx.v3beta1.ISecuritySettings|null); + + /** + * Creates a new CreateSecuritySettingsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateSecuritySettingsRequest instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ICreateSecuritySettingsRequest): google.cloud.dialogflow.cx.v3beta1.CreateSecuritySettingsRequest; + + /** + * Encodes the specified CreateSecuritySettingsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateSecuritySettingsRequest.verify|verify} messages. + * @param message CreateSecuritySettingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.ICreateSecuritySettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateSecuritySettingsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateSecuritySettingsRequest.verify|verify} messages. + * @param message CreateSecuritySettingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ICreateSecuritySettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateSecuritySettingsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateSecuritySettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.CreateSecuritySettingsRequest; + + /** + * Decodes a CreateSecuritySettingsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateSecuritySettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.CreateSecuritySettingsRequest; - /** - * Decodes a PlayAudio message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PlayAudio - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio; + /** + * Verifies a CreateSecuritySettingsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Verifies a PlayAudio message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Creates a CreateSecuritySettingsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateSecuritySettingsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.CreateSecuritySettingsRequest; - /** - * Creates a PlayAudio message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PlayAudio - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio; + /** + * Creates a plain object from a CreateSecuritySettingsRequest message. Also converts values to other types if specified. + * @param message CreateSecuritySettingsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.CreateSecuritySettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a plain object from a PlayAudio message. Also converts values to other types if specified. - * @param message PlayAudio - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Converts this CreateSecuritySettingsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Converts this PlayAudio to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Properties of a DeleteSecuritySettingsRequest. */ + interface IDeleteSecuritySettingsRequest { - /** Properties of a MixedAudio. */ - interface IMixedAudio { + /** DeleteSecuritySettingsRequest name */ + name?: (string|null); + } - /** MixedAudio segments */ - segments?: (google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.ISegment[]|null); - } + /** Represents a DeleteSecuritySettingsRequest. */ + class DeleteSecuritySettingsRequest implements IDeleteSecuritySettingsRequest { - /** Represents a MixedAudio. */ - class MixedAudio implements IMixedAudio { + /** + * Constructs a new DeleteSecuritySettingsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IDeleteSecuritySettingsRequest); - /** - * Constructs a new MixedAudio. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IMixedAudio); + /** DeleteSecuritySettingsRequest name. */ + public name: string; - /** MixedAudio segments. */ - public segments: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.ISegment[]; + /** + * Creates a new DeleteSecuritySettingsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteSecuritySettingsRequest instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IDeleteSecuritySettingsRequest): google.cloud.dialogflow.cx.v3beta1.DeleteSecuritySettingsRequest; - /** - * Creates a new MixedAudio instance using the specified properties. - * @param [properties] Properties to set - * @returns MixedAudio instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IMixedAudio): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio; + /** + * Encodes the specified DeleteSecuritySettingsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeleteSecuritySettingsRequest.verify|verify} messages. + * @param message DeleteSecuritySettingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IDeleteSecuritySettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified MixedAudio message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.verify|verify} messages. - * @param message MixedAudio message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IMixedAudio, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified DeleteSecuritySettingsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeleteSecuritySettingsRequest.verify|verify} messages. + * @param message DeleteSecuritySettingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IDeleteSecuritySettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified MixedAudio message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.verify|verify} messages. - * @param message MixedAudio message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IMixedAudio, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a DeleteSecuritySettingsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteSecuritySettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.DeleteSecuritySettingsRequest; - /** - * Decodes a MixedAudio message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MixedAudio - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio; + /** + * Decodes a DeleteSecuritySettingsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteSecuritySettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.DeleteSecuritySettingsRequest; - /** - * Decodes a MixedAudio message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MixedAudio - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio; + /** + * Verifies a DeleteSecuritySettingsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Verifies a MixedAudio message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Creates a DeleteSecuritySettingsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteSecuritySettingsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.DeleteSecuritySettingsRequest; - /** - * Creates a MixedAudio message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MixedAudio - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio; + /** + * Creates a plain object from a DeleteSecuritySettingsRequest message. Also converts values to other types if specified. + * @param message DeleteSecuritySettingsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.DeleteSecuritySettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a plain object from a MixedAudio message. Also converts values to other types if specified. - * @param message MixedAudio - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Converts this DeleteSecuritySettingsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Converts this MixedAudio to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Properties of a SecuritySettings. */ + interface ISecuritySettings { - namespace MixedAudio { + /** SecuritySettings name */ + name?: (string|null); - /** Properties of a Segment. */ - interface ISegment { + /** SecuritySettings displayName */ + displayName?: (string|null); - /** Segment audio */ - audio?: (Uint8Array|string|null); + /** SecuritySettings redactionStrategy */ + redactionStrategy?: (google.cloud.dialogflow.cx.v3beta1.SecuritySettings.RedactionStrategy|keyof typeof google.cloud.dialogflow.cx.v3beta1.SecuritySettings.RedactionStrategy|null); - /** Segment uri */ - uri?: (string|null); + /** SecuritySettings redactionScope */ + redactionScope?: (google.cloud.dialogflow.cx.v3beta1.SecuritySettings.RedactionScope|keyof typeof google.cloud.dialogflow.cx.v3beta1.SecuritySettings.RedactionScope|null); - /** Segment allowPlaybackInterruption */ - allowPlaybackInterruption?: (boolean|null); - } + /** SecuritySettings inspectTemplate */ + inspectTemplate?: (string|null); - /** Represents a Segment. */ - class Segment implements ISegment { + /** SecuritySettings retentionWindowDays */ + retentionWindowDays?: (number|null); - /** - * Constructs a new Segment. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.ISegment); + /** SecuritySettings purgeDataTypes */ + purgeDataTypes?: (google.cloud.dialogflow.cx.v3beta1.SecuritySettings.PurgeDataType[]|null); + } - /** Segment audio. */ - public audio: (Uint8Array|string); + /** Represents a SecuritySettings. */ + class SecuritySettings implements ISecuritySettings { - /** Segment uri. */ - public uri: string; + /** + * Constructs a new SecuritySettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ISecuritySettings); - /** Segment allowPlaybackInterruption. */ - public allowPlaybackInterruption: boolean; + /** SecuritySettings name. */ + public name: string; - /** Segment content. */ - public content?: ("audio"|"uri"); + /** SecuritySettings displayName. */ + public displayName: string; - /** - * Creates a new Segment instance using the specified properties. - * @param [properties] Properties to set - * @returns Segment instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.ISegment): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment; + /** SecuritySettings redactionStrategy. */ + public redactionStrategy: (google.cloud.dialogflow.cx.v3beta1.SecuritySettings.RedactionStrategy|keyof typeof google.cloud.dialogflow.cx.v3beta1.SecuritySettings.RedactionStrategy); - /** - * Encodes the specified Segment message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment.verify|verify} messages. - * @param message Segment message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.ISegment, writer?: $protobuf.Writer): $protobuf.Writer; + /** SecuritySettings redactionScope. */ + public redactionScope: (google.cloud.dialogflow.cx.v3beta1.SecuritySettings.RedactionScope|keyof typeof google.cloud.dialogflow.cx.v3beta1.SecuritySettings.RedactionScope); - /** - * Encodes the specified Segment message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment.verify|verify} messages. - * @param message Segment message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.ISegment, writer?: $protobuf.Writer): $protobuf.Writer; + /** SecuritySettings inspectTemplate. */ + public inspectTemplate: string; - /** - * Decodes a Segment message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Segment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment; + /** SecuritySettings retentionWindowDays. */ + public retentionWindowDays: number; - /** - * Decodes a Segment message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Segment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment; + /** SecuritySettings purgeDataTypes. */ + public purgeDataTypes: google.cloud.dialogflow.cx.v3beta1.SecuritySettings.PurgeDataType[]; - /** - * Verifies a Segment message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** SecuritySettings dataRetention. */ + public dataRetention?: "retentionWindowDays"; - /** - * Creates a Segment message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Segment - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment; + /** + * Creates a new SecuritySettings instance using the specified properties. + * @param [properties] Properties to set + * @returns SecuritySettings instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ISecuritySettings): google.cloud.dialogflow.cx.v3beta1.SecuritySettings; - /** - * Creates a plain object from a Segment message. Also converts values to other types if specified. - * @param message Segment - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Encodes the specified SecuritySettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SecuritySettings.verify|verify} messages. + * @param message SecuritySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.ISecuritySettings, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Converts this Segment to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } + /** + * Encodes the specified SecuritySettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SecuritySettings.verify|verify} messages. + * @param message SecuritySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ISecuritySettings, writer?: $protobuf.Writer): $protobuf.Writer; - /** Properties of an EndInteraction. */ - interface IEndInteraction { - } + /** + * Decodes a SecuritySettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SecuritySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.SecuritySettings; - /** Represents an EndInteraction. */ - class EndInteraction implements IEndInteraction { + /** + * Decodes a SecuritySettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SecuritySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.SecuritySettings; - /** - * Constructs a new EndInteraction. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IEndInteraction); + /** + * Verifies a SecuritySettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Creates a new EndInteraction instance using the specified properties. - * @param [properties] Properties to set - * @returns EndInteraction instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IEndInteraction): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction; + /** + * Creates a SecuritySettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SecuritySettings + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.SecuritySettings; - /** - * Encodes the specified EndInteraction message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction.verify|verify} messages. - * @param message EndInteraction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IEndInteraction, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a plain object from a SecuritySettings message. Also converts values to other types if specified. + * @param message SecuritySettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.SecuritySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Encodes the specified EndInteraction message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction.verify|verify} messages. - * @param message EndInteraction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IEndInteraction, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Converts this SecuritySettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Decodes an EndInteraction message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EndInteraction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction; + namespace SecuritySettings { - /** - * Decodes an EndInteraction message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EndInteraction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction; + /** RedactionStrategy enum. */ + enum RedactionStrategy { + REDACTION_STRATEGY_UNSPECIFIED = 0, + REDACT_WITH_SERVICE = 1 + } - /** - * Verifies an EndInteraction message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** RedactionScope enum. */ + enum RedactionScope { + REDACTION_SCOPE_UNSPECIFIED = 0, + REDACT_DISK_STORAGE = 2 + } + + /** PurgeDataType enum. */ + enum PurgeDataType { + PURGE_DATA_TYPE_UNSPECIFIED = 0, + DIALOGFLOW_HISTORY = 1 + } + } + + /** AudioEncoding enum. */ + enum AudioEncoding { + AUDIO_ENCODING_UNSPECIFIED = 0, + AUDIO_ENCODING_LINEAR_16 = 1, + AUDIO_ENCODING_FLAC = 2, + AUDIO_ENCODING_MULAW = 3, + AUDIO_ENCODING_AMR = 4, + AUDIO_ENCODING_AMR_WB = 5, + AUDIO_ENCODING_OGG_OPUS = 6, + AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE = 7 + } + + /** Properties of a SpeechWordInfo. */ + interface ISpeechWordInfo { + + /** SpeechWordInfo word */ + word?: (string|null); - /** - * Creates an EndInteraction message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EndInteraction - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction; + /** SpeechWordInfo startOffset */ + startOffset?: (google.protobuf.IDuration|null); - /** - * Creates a plain object from an EndInteraction message. Also converts values to other types if specified. - * @param message EndInteraction - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** SpeechWordInfo endOffset */ + endOffset?: (google.protobuf.IDuration|null); - /** - * Converts this EndInteraction to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** SpeechWordInfo confidence */ + confidence?: (number|null); } - /** Represents a SecuritySettingsService */ - class SecuritySettingsService extends $protobuf.rpc.Service { + /** Represents a SpeechWordInfo. */ + class SpeechWordInfo implements ISpeechWordInfo { /** - * Constructs a new SecuritySettingsService service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited + * Constructs a new SpeechWordInfo. + * @param [properties] Properties to set */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ISpeechWordInfo); - /** - * Creates new SecuritySettingsService service using the specified rpc implementation. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - * @returns RPC service. Useful where requests and/or responses are streamed. - */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): SecuritySettingsService; + /** SpeechWordInfo word. */ + public word: string; - /** - * Calls CreateSecuritySettings. - * @param request CreateSecuritySettingsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and SecuritySettings - */ - public createSecuritySettings(request: google.cloud.dialogflow.cx.v3beta1.ICreateSecuritySettingsRequest, callback: google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService.CreateSecuritySettingsCallback): void; + /** SpeechWordInfo startOffset. */ + public startOffset?: (google.protobuf.IDuration|null); + + /** SpeechWordInfo endOffset. */ + public endOffset?: (google.protobuf.IDuration|null); + + /** SpeechWordInfo confidence. */ + public confidence: number; /** - * Calls CreateSecuritySettings. - * @param request CreateSecuritySettingsRequest message or plain object - * @returns Promise + * Creates a new SpeechWordInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns SpeechWordInfo instance */ - public createSecuritySettings(request: google.cloud.dialogflow.cx.v3beta1.ICreateSecuritySettingsRequest): Promise; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ISpeechWordInfo): google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo; /** - * Calls GetSecuritySettings. - * @param request GetSecuritySettingsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and SecuritySettings + * Encodes the specified SpeechWordInfo message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo.verify|verify} messages. + * @param message SpeechWordInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public getSecuritySettings(request: google.cloud.dialogflow.cx.v3beta1.IGetSecuritySettingsRequest, callback: google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService.GetSecuritySettingsCallback): void; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.ISpeechWordInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls GetSecuritySettings. - * @param request GetSecuritySettingsRequest message or plain object - * @returns Promise + * Encodes the specified SpeechWordInfo message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo.verify|verify} messages. + * @param message SpeechWordInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public getSecuritySettings(request: google.cloud.dialogflow.cx.v3beta1.IGetSecuritySettingsRequest): Promise; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ISpeechWordInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls UpdateSecuritySettings. - * @param request UpdateSecuritySettingsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and SecuritySettings + * Decodes a SpeechWordInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SpeechWordInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public updateSecuritySettings(request: google.cloud.dialogflow.cx.v3beta1.IUpdateSecuritySettingsRequest, callback: google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService.UpdateSecuritySettingsCallback): void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo; /** - * Calls UpdateSecuritySettings. - * @param request UpdateSecuritySettingsRequest message or plain object - * @returns Promise + * Decodes a SpeechWordInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SpeechWordInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public updateSecuritySettings(request: google.cloud.dialogflow.cx.v3beta1.IUpdateSecuritySettingsRequest): Promise; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo; /** - * Calls ListSecuritySettings. - * @param request ListSecuritySettingsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListSecuritySettingsResponse + * Verifies a SpeechWordInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public listSecuritySettings(request: google.cloud.dialogflow.cx.v3beta1.IListSecuritySettingsRequest, callback: google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService.ListSecuritySettingsCallback): void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls ListSecuritySettings. - * @param request ListSecuritySettingsRequest message or plain object - * @returns Promise + * Creates a SpeechWordInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SpeechWordInfo */ - public listSecuritySettings(request: google.cloud.dialogflow.cx.v3beta1.IListSecuritySettingsRequest): Promise; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo; /** - * Calls DeleteSecuritySettings. - * @param request DeleteSecuritySettingsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty + * Creates a plain object from a SpeechWordInfo message. Also converts values to other types if specified. + * @param message SpeechWordInfo + * @param [options] Conversion options + * @returns Plain object */ - public deleteSecuritySettings(request: google.cloud.dialogflow.cx.v3beta1.IDeleteSecuritySettingsRequest, callback: google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService.DeleteSecuritySettingsCallback): void; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls DeleteSecuritySettings. - * @param request DeleteSecuritySettingsRequest message or plain object - * @returns Promise + * Converts this SpeechWordInfo to JSON. + * @returns JSON object */ - public deleteSecuritySettings(request: google.cloud.dialogflow.cx.v3beta1.IDeleteSecuritySettingsRequest): Promise; + public toJSON(): { [k: string]: any }; } - namespace SecuritySettingsService { + /** Properties of an InputAudioConfig. */ + interface IInputAudioConfig { - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService#createSecuritySettings}. - * @param error Error, if any - * @param [response] SecuritySettings - */ - type CreateSecuritySettingsCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.SecuritySettings) => void; + /** InputAudioConfig audioEncoding */ + audioEncoding?: (google.cloud.dialogflow.cx.v3beta1.AudioEncoding|keyof typeof google.cloud.dialogflow.cx.v3beta1.AudioEncoding|null); - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService#getSecuritySettings}. - * @param error Error, if any - * @param [response] SecuritySettings - */ - type GetSecuritySettingsCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.SecuritySettings) => void; + /** InputAudioConfig sampleRateHertz */ + sampleRateHertz?: (number|null); - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService#updateSecuritySettings}. - * @param error Error, if any - * @param [response] SecuritySettings - */ - type UpdateSecuritySettingsCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.SecuritySettings) => void; + /** InputAudioConfig enableWordInfo */ + enableWordInfo?: (boolean|null); - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService#listSecuritySettings}. - * @param error Error, if any - * @param [response] ListSecuritySettingsResponse - */ - type ListSecuritySettingsCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsResponse) => void; + /** InputAudioConfig phraseHints */ + phraseHints?: (string[]|null); - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService#deleteSecuritySettings}. - * @param error Error, if any - * @param [response] Empty - */ - type DeleteSecuritySettingsCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - } + /** InputAudioConfig model */ + model?: (string|null); - /** Properties of a GetSecuritySettingsRequest. */ - interface IGetSecuritySettingsRequest { + /** InputAudioConfig modelVariant */ + modelVariant?: (google.cloud.dialogflow.cx.v3beta1.SpeechModelVariant|keyof typeof google.cloud.dialogflow.cx.v3beta1.SpeechModelVariant|null); - /** GetSecuritySettingsRequest name */ - name?: (string|null); + /** InputAudioConfig singleUtterance */ + singleUtterance?: (boolean|null); } - /** Represents a GetSecuritySettingsRequest. */ - class GetSecuritySettingsRequest implements IGetSecuritySettingsRequest { + /** Represents an InputAudioConfig. */ + class InputAudioConfig implements IInputAudioConfig { /** - * Constructs a new GetSecuritySettingsRequest. + * Constructs a new InputAudioConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IGetSecuritySettingsRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IInputAudioConfig); - /** GetSecuritySettingsRequest name. */ - public name: string; + /** InputAudioConfig audioEncoding. */ + public audioEncoding: (google.cloud.dialogflow.cx.v3beta1.AudioEncoding|keyof typeof google.cloud.dialogflow.cx.v3beta1.AudioEncoding); + + /** InputAudioConfig sampleRateHertz. */ + public sampleRateHertz: number; + + /** InputAudioConfig enableWordInfo. */ + public enableWordInfo: boolean; + + /** InputAudioConfig phraseHints. */ + public phraseHints: string[]; + + /** InputAudioConfig model. */ + public model: string; + + /** InputAudioConfig modelVariant. */ + public modelVariant: (google.cloud.dialogflow.cx.v3beta1.SpeechModelVariant|keyof typeof google.cloud.dialogflow.cx.v3beta1.SpeechModelVariant); + + /** InputAudioConfig singleUtterance. */ + public singleUtterance: boolean; /** - * Creates a new GetSecuritySettingsRequest instance using the specified properties. + * Creates a new InputAudioConfig instance using the specified properties. * @param [properties] Properties to set - * @returns GetSecuritySettingsRequest instance + * @returns InputAudioConfig instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IGetSecuritySettingsRequest): google.cloud.dialogflow.cx.v3beta1.GetSecuritySettingsRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IInputAudioConfig): google.cloud.dialogflow.cx.v3beta1.InputAudioConfig; /** - * Encodes the specified GetSecuritySettingsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetSecuritySettingsRequest.verify|verify} messages. - * @param message GetSecuritySettingsRequest message or plain object to encode + * Encodes the specified InputAudioConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.InputAudioConfig.verify|verify} messages. + * @param message InputAudioConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IGetSecuritySettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IInputAudioConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetSecuritySettingsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetSecuritySettingsRequest.verify|verify} messages. - * @param message GetSecuritySettingsRequest message or plain object to encode + * Encodes the specified InputAudioConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.InputAudioConfig.verify|verify} messages. + * @param message InputAudioConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IGetSecuritySettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IInputAudioConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetSecuritySettingsRequest message from the specified reader or buffer. + * Decodes an InputAudioConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetSecuritySettingsRequest + * @returns InputAudioConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.GetSecuritySettingsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.InputAudioConfig; /** - * Decodes a GetSecuritySettingsRequest message from the specified reader or buffer, length delimited. + * Decodes an InputAudioConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetSecuritySettingsRequest + * @returns InputAudioConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.GetSecuritySettingsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.InputAudioConfig; /** - * Verifies a GetSecuritySettingsRequest message. + * Verifies an InputAudioConfig message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetSecuritySettingsRequest message from a plain object. Also converts values to their respective internal types. + * Creates an InputAudioConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetSecuritySettingsRequest + * @returns InputAudioConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.GetSecuritySettingsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.InputAudioConfig; /** - * Creates a plain object from a GetSecuritySettingsRequest message. Also converts values to other types if specified. - * @param message GetSecuritySettingsRequest + * Creates a plain object from an InputAudioConfig message. Also converts values to other types if specified. + * @param message InputAudioConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.GetSecuritySettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.InputAudioConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetSecuritySettingsRequest to JSON. + * Converts this InputAudioConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an UpdateSecuritySettingsRequest. */ - interface IUpdateSecuritySettingsRequest { + /** SpeechModelVariant enum. */ + enum SpeechModelVariant { + SPEECH_MODEL_VARIANT_UNSPECIFIED = 0, + USE_BEST_AVAILABLE = 1, + USE_STANDARD = 2, + USE_ENHANCED = 3 + } - /** UpdateSecuritySettingsRequest securitySettings */ - securitySettings?: (google.cloud.dialogflow.cx.v3beta1.ISecuritySettings|null); + /** Properties of a VoiceSelectionParams. */ + interface IVoiceSelectionParams { - /** UpdateSecuritySettingsRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** VoiceSelectionParams name */ + name?: (string|null); + + /** VoiceSelectionParams ssmlGender */ + ssmlGender?: (google.cloud.dialogflow.cx.v3beta1.SsmlVoiceGender|keyof typeof google.cloud.dialogflow.cx.v3beta1.SsmlVoiceGender|null); } - /** Represents an UpdateSecuritySettingsRequest. */ - class UpdateSecuritySettingsRequest implements IUpdateSecuritySettingsRequest { + /** Represents a VoiceSelectionParams. */ + class VoiceSelectionParams implements IVoiceSelectionParams { /** - * Constructs a new UpdateSecuritySettingsRequest. + * Constructs a new VoiceSelectionParams. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IUpdateSecuritySettingsRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IVoiceSelectionParams); - /** UpdateSecuritySettingsRequest securitySettings. */ - public securitySettings?: (google.cloud.dialogflow.cx.v3beta1.ISecuritySettings|null); + /** VoiceSelectionParams name. */ + public name: string; - /** UpdateSecuritySettingsRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** VoiceSelectionParams ssmlGender. */ + public ssmlGender: (google.cloud.dialogflow.cx.v3beta1.SsmlVoiceGender|keyof typeof google.cloud.dialogflow.cx.v3beta1.SsmlVoiceGender); /** - * Creates a new UpdateSecuritySettingsRequest instance using the specified properties. + * Creates a new VoiceSelectionParams instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateSecuritySettingsRequest instance + * @returns VoiceSelectionParams instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IUpdateSecuritySettingsRequest): google.cloud.dialogflow.cx.v3beta1.UpdateSecuritySettingsRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IVoiceSelectionParams): google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams; /** - * Encodes the specified UpdateSecuritySettingsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateSecuritySettingsRequest.verify|verify} messages. - * @param message UpdateSecuritySettingsRequest message or plain object to encode + * Encodes the specified VoiceSelectionParams message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams.verify|verify} messages. + * @param message VoiceSelectionParams message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IUpdateSecuritySettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IVoiceSelectionParams, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateSecuritySettingsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateSecuritySettingsRequest.verify|verify} messages. - * @param message UpdateSecuritySettingsRequest message or plain object to encode + * Encodes the specified VoiceSelectionParams message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams.verify|verify} messages. + * @param message VoiceSelectionParams message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IUpdateSecuritySettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IVoiceSelectionParams, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateSecuritySettingsRequest message from the specified reader or buffer. + * Decodes a VoiceSelectionParams message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateSecuritySettingsRequest + * @returns VoiceSelectionParams * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.UpdateSecuritySettingsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams; /** - * Decodes an UpdateSecuritySettingsRequest message from the specified reader or buffer, length delimited. + * Decodes a VoiceSelectionParams message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateSecuritySettingsRequest + * @returns VoiceSelectionParams * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.UpdateSecuritySettingsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams; /** - * Verifies an UpdateSecuritySettingsRequest message. + * Verifies a VoiceSelectionParams message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an UpdateSecuritySettingsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a VoiceSelectionParams message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateSecuritySettingsRequest + * @returns VoiceSelectionParams */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.UpdateSecuritySettingsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams; /** - * Creates a plain object from an UpdateSecuritySettingsRequest message. Also converts values to other types if specified. - * @param message UpdateSecuritySettingsRequest + * Creates a plain object from a VoiceSelectionParams message. Also converts values to other types if specified. + * @param message VoiceSelectionParams * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.UpdateSecuritySettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateSecuritySettingsRequest to JSON. + * Converts this VoiceSelectionParams to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListSecuritySettingsRequest. */ - interface IListSecuritySettingsRequest { + /** Properties of a SynthesizeSpeechConfig. */ + interface ISynthesizeSpeechConfig { - /** ListSecuritySettingsRequest parent */ - parent?: (string|null); + /** SynthesizeSpeechConfig speakingRate */ + speakingRate?: (number|null); - /** ListSecuritySettingsRequest pageSize */ - pageSize?: (number|null); + /** SynthesizeSpeechConfig pitch */ + pitch?: (number|null); - /** ListSecuritySettingsRequest pageToken */ - pageToken?: (string|null); + /** SynthesizeSpeechConfig volumeGainDb */ + volumeGainDb?: (number|null); + + /** SynthesizeSpeechConfig effectsProfileId */ + effectsProfileId?: (string[]|null); + + /** SynthesizeSpeechConfig voice */ + voice?: (google.cloud.dialogflow.cx.v3beta1.IVoiceSelectionParams|null); } - /** Represents a ListSecuritySettingsRequest. */ - class ListSecuritySettingsRequest implements IListSecuritySettingsRequest { + /** Represents a SynthesizeSpeechConfig. */ + class SynthesizeSpeechConfig implements ISynthesizeSpeechConfig { /** - * Constructs a new ListSecuritySettingsRequest. + * Constructs a new SynthesizeSpeechConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IListSecuritySettingsRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ISynthesizeSpeechConfig); - /** ListSecuritySettingsRequest parent. */ - public parent: string; + /** SynthesizeSpeechConfig speakingRate. */ + public speakingRate: number; - /** ListSecuritySettingsRequest pageSize. */ - public pageSize: number; + /** SynthesizeSpeechConfig pitch. */ + public pitch: number; - /** ListSecuritySettingsRequest pageToken. */ - public pageToken: string; + /** SynthesizeSpeechConfig volumeGainDb. */ + public volumeGainDb: number; + + /** SynthesizeSpeechConfig effectsProfileId. */ + public effectsProfileId: string[]; + + /** SynthesizeSpeechConfig voice. */ + public voice?: (google.cloud.dialogflow.cx.v3beta1.IVoiceSelectionParams|null); /** - * Creates a new ListSecuritySettingsRequest instance using the specified properties. + * Creates a new SynthesizeSpeechConfig instance using the specified properties. * @param [properties] Properties to set - * @returns ListSecuritySettingsRequest instance + * @returns SynthesizeSpeechConfig instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IListSecuritySettingsRequest): google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ISynthesizeSpeechConfig): google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig; /** - * Encodes the specified ListSecuritySettingsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsRequest.verify|verify} messages. - * @param message ListSecuritySettingsRequest message or plain object to encode + * Encodes the specified SynthesizeSpeechConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig.verify|verify} messages. + * @param message SynthesizeSpeechConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IListSecuritySettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.ISynthesizeSpeechConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListSecuritySettingsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsRequest.verify|verify} messages. - * @param message ListSecuritySettingsRequest message or plain object to encode + * Encodes the specified SynthesizeSpeechConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig.verify|verify} messages. + * @param message SynthesizeSpeechConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IListSecuritySettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ISynthesizeSpeechConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListSecuritySettingsRequest message from the specified reader or buffer. + * Decodes a SynthesizeSpeechConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListSecuritySettingsRequest + * @returns SynthesizeSpeechConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig; /** - * Decodes a ListSecuritySettingsRequest message from the specified reader or buffer, length delimited. + * Decodes a SynthesizeSpeechConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListSecuritySettingsRequest + * @returns SynthesizeSpeechConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig; /** - * Verifies a ListSecuritySettingsRequest message. + * Verifies a SynthesizeSpeechConfig message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListSecuritySettingsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a SynthesizeSpeechConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListSecuritySettingsRequest + * @returns SynthesizeSpeechConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig; /** - * Creates a plain object from a ListSecuritySettingsRequest message. Also converts values to other types if specified. - * @param message ListSecuritySettingsRequest + * Creates a plain object from a SynthesizeSpeechConfig message. Also converts values to other types if specified. + * @param message SynthesizeSpeechConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListSecuritySettingsRequest to JSON. + * Converts this SynthesizeSpeechConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListSecuritySettingsResponse. */ - interface IListSecuritySettingsResponse { + /** SsmlVoiceGender enum. */ + enum SsmlVoiceGender { + SSML_VOICE_GENDER_UNSPECIFIED = 0, + SSML_VOICE_GENDER_MALE = 1, + SSML_VOICE_GENDER_FEMALE = 2, + SSML_VOICE_GENDER_NEUTRAL = 3 + } - /** ListSecuritySettingsResponse securitySettings */ - securitySettings?: (google.cloud.dialogflow.cx.v3beta1.ISecuritySettings[]|null); + /** Properties of an OutputAudioConfig. */ + interface IOutputAudioConfig { - /** ListSecuritySettingsResponse nextPageToken */ - nextPageToken?: (string|null); + /** OutputAudioConfig audioEncoding */ + audioEncoding?: (google.cloud.dialogflow.cx.v3beta1.OutputAudioEncoding|keyof typeof google.cloud.dialogflow.cx.v3beta1.OutputAudioEncoding|null); + + /** OutputAudioConfig sampleRateHertz */ + sampleRateHertz?: (number|null); + + /** OutputAudioConfig synthesizeSpeechConfig */ + synthesizeSpeechConfig?: (google.cloud.dialogflow.cx.v3beta1.ISynthesizeSpeechConfig|null); } - /** Represents a ListSecuritySettingsResponse. */ - class ListSecuritySettingsResponse implements IListSecuritySettingsResponse { + /** Represents an OutputAudioConfig. */ + class OutputAudioConfig implements IOutputAudioConfig { /** - * Constructs a new ListSecuritySettingsResponse. + * Constructs a new OutputAudioConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IListSecuritySettingsResponse); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IOutputAudioConfig); - /** ListSecuritySettingsResponse securitySettings. */ - public securitySettings: google.cloud.dialogflow.cx.v3beta1.ISecuritySettings[]; + /** OutputAudioConfig audioEncoding. */ + public audioEncoding: (google.cloud.dialogflow.cx.v3beta1.OutputAudioEncoding|keyof typeof google.cloud.dialogflow.cx.v3beta1.OutputAudioEncoding); - /** ListSecuritySettingsResponse nextPageToken. */ - public nextPageToken: string; + /** OutputAudioConfig sampleRateHertz. */ + public sampleRateHertz: number; + + /** OutputAudioConfig synthesizeSpeechConfig. */ + public synthesizeSpeechConfig?: (google.cloud.dialogflow.cx.v3beta1.ISynthesizeSpeechConfig|null); /** - * Creates a new ListSecuritySettingsResponse instance using the specified properties. + * Creates a new OutputAudioConfig instance using the specified properties. * @param [properties] Properties to set - * @returns ListSecuritySettingsResponse instance + * @returns OutputAudioConfig instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IListSecuritySettingsResponse): google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsResponse; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IOutputAudioConfig): google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig; /** - * Encodes the specified ListSecuritySettingsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsResponse.verify|verify} messages. - * @param message ListSecuritySettingsResponse message or plain object to encode + * Encodes the specified OutputAudioConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig.verify|verify} messages. + * @param message OutputAudioConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IListSecuritySettingsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IOutputAudioConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListSecuritySettingsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsResponse.verify|verify} messages. - * @param message ListSecuritySettingsResponse message or plain object to encode + * Encodes the specified OutputAudioConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig.verify|verify} messages. + * @param message OutputAudioConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IListSecuritySettingsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IOutputAudioConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListSecuritySettingsResponse message from the specified reader or buffer. + * Decodes an OutputAudioConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListSecuritySettingsResponse + * @returns OutputAudioConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig; /** - * Decodes a ListSecuritySettingsResponse message from the specified reader or buffer, length delimited. + * Decodes an OutputAudioConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListSecuritySettingsResponse + * @returns OutputAudioConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig; /** - * Verifies a ListSecuritySettingsResponse message. + * Verifies an OutputAudioConfig message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListSecuritySettingsResponse message from a plain object. Also converts values to their respective internal types. + * Creates an OutputAudioConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListSecuritySettingsResponse + * @returns OutputAudioConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig; /** - * Creates a plain object from a ListSecuritySettingsResponse message. Also converts values to other types if specified. - * @param message ListSecuritySettingsResponse + * Creates a plain object from an OutputAudioConfig message. Also converts values to other types if specified. + * @param message OutputAudioConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListSecuritySettingsResponse to JSON. + * Converts this OutputAudioConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CreateSecuritySettingsRequest. */ - interface ICreateSecuritySettingsRequest { + /** OutputAudioEncoding enum. */ + enum OutputAudioEncoding { + OUTPUT_AUDIO_ENCODING_UNSPECIFIED = 0, + OUTPUT_AUDIO_ENCODING_LINEAR_16 = 1, + OUTPUT_AUDIO_ENCODING_MP3 = 2, + OUTPUT_AUDIO_ENCODING_MP3_64_KBPS = 4, + OUTPUT_AUDIO_ENCODING_OGG_OPUS = 3, + OUTPUT_AUDIO_ENCODING_MULAW = 5 + } - /** CreateSecuritySettingsRequest parent */ - parent?: (string|null); + /** Represents an EntityTypes */ + class EntityTypes extends $protobuf.rpc.Service { - /** CreateSecuritySettingsRequest securitySettings */ - securitySettings?: (google.cloud.dialogflow.cx.v3beta1.ISecuritySettings|null); - } + /** + * Constructs a new EntityTypes service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); - /** Represents a CreateSecuritySettingsRequest. */ - class CreateSecuritySettingsRequest implements ICreateSecuritySettingsRequest { + /** + * Creates new EntityTypes service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): EntityTypes; /** - * Constructs a new CreateSecuritySettingsRequest. - * @param [properties] Properties to set + * Calls ListEntityTypes. + * @param request ListEntityTypesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListEntityTypesResponse */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ICreateSecuritySettingsRequest); + public listEntityTypes(request: google.cloud.dialogflow.cx.v3beta1.IListEntityTypesRequest, callback: google.cloud.dialogflow.cx.v3beta1.EntityTypes.ListEntityTypesCallback): void; - /** CreateSecuritySettingsRequest parent. */ - public parent: string; + /** + * Calls ListEntityTypes. + * @param request ListEntityTypesRequest message or plain object + * @returns Promise + */ + public listEntityTypes(request: google.cloud.dialogflow.cx.v3beta1.IListEntityTypesRequest): Promise; - /** CreateSecuritySettingsRequest securitySettings. */ - public securitySettings?: (google.cloud.dialogflow.cx.v3beta1.ISecuritySettings|null); + /** + * Calls GetEntityType. + * @param request GetEntityTypeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and EntityType + */ + public getEntityType(request: google.cloud.dialogflow.cx.v3beta1.IGetEntityTypeRequest, callback: google.cloud.dialogflow.cx.v3beta1.EntityTypes.GetEntityTypeCallback): void; /** - * Creates a new CreateSecuritySettingsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateSecuritySettingsRequest instance + * Calls GetEntityType. + * @param request GetEntityTypeRequest message or plain object + * @returns Promise */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ICreateSecuritySettingsRequest): google.cloud.dialogflow.cx.v3beta1.CreateSecuritySettingsRequest; + public getEntityType(request: google.cloud.dialogflow.cx.v3beta1.IGetEntityTypeRequest): Promise; /** - * Encodes the specified CreateSecuritySettingsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateSecuritySettingsRequest.verify|verify} messages. - * @param message CreateSecuritySettingsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls CreateEntityType. + * @param request CreateEntityTypeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and EntityType */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.ICreateSecuritySettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public createEntityType(request: google.cloud.dialogflow.cx.v3beta1.ICreateEntityTypeRequest, callback: google.cloud.dialogflow.cx.v3beta1.EntityTypes.CreateEntityTypeCallback): void; /** - * Encodes the specified CreateSecuritySettingsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateSecuritySettingsRequest.verify|verify} messages. - * @param message CreateSecuritySettingsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls CreateEntityType. + * @param request CreateEntityTypeRequest message or plain object + * @returns Promise */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ICreateSecuritySettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public createEntityType(request: google.cloud.dialogflow.cx.v3beta1.ICreateEntityTypeRequest): Promise; /** - * Decodes a CreateSecuritySettingsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateSecuritySettingsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls UpdateEntityType. + * @param request UpdateEntityTypeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and EntityType */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.CreateSecuritySettingsRequest; + public updateEntityType(request: google.cloud.dialogflow.cx.v3beta1.IUpdateEntityTypeRequest, callback: google.cloud.dialogflow.cx.v3beta1.EntityTypes.UpdateEntityTypeCallback): void; /** - * Decodes a CreateSecuritySettingsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateSecuritySettingsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls UpdateEntityType. + * @param request UpdateEntityTypeRequest message or plain object + * @returns Promise */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.CreateSecuritySettingsRequest; + public updateEntityType(request: google.cloud.dialogflow.cx.v3beta1.IUpdateEntityTypeRequest): Promise; /** - * Verifies a CreateSecuritySettingsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls DeleteEntityType. + * @param request DeleteEntityTypeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty */ - public static verify(message: { [k: string]: any }): (string|null); + public deleteEntityType(request: google.cloud.dialogflow.cx.v3beta1.IDeleteEntityTypeRequest, callback: google.cloud.dialogflow.cx.v3beta1.EntityTypes.DeleteEntityTypeCallback): void; /** - * Creates a CreateSecuritySettingsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateSecuritySettingsRequest + * Calls DeleteEntityType. + * @param request DeleteEntityTypeRequest message or plain object + * @returns Promise */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.CreateSecuritySettingsRequest; + public deleteEntityType(request: google.cloud.dialogflow.cx.v3beta1.IDeleteEntityTypeRequest): Promise; + } + + namespace EntityTypes { /** - * Creates a plain object from a CreateSecuritySettingsRequest message. Also converts values to other types if specified. - * @param message CreateSecuritySettingsRequest - * @param [options] Conversion options - * @returns Plain object + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.EntityTypes#listEntityTypes}. + * @param error Error, if any + * @param [response] ListEntityTypesResponse */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.CreateSecuritySettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + type ListEntityTypesCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse) => void; /** - * Converts this CreateSecuritySettingsRequest to JSON. - * @returns JSON object + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.EntityTypes#getEntityType}. + * @param error Error, if any + * @param [response] EntityType */ - public toJSON(): { [k: string]: any }; + type GetEntityTypeCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.EntityType) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.EntityTypes#createEntityType}. + * @param error Error, if any + * @param [response] EntityType + */ + type CreateEntityTypeCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.EntityType) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.EntityTypes#updateEntityType}. + * @param error Error, if any + * @param [response] EntityType + */ + type UpdateEntityTypeCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.EntityType) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.EntityTypes#deleteEntityType}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteEntityTypeCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; } - /** Properties of a DeleteSecuritySettingsRequest. */ - interface IDeleteSecuritySettingsRequest { + /** Properties of an EntityType. */ + interface IEntityType { - /** DeleteSecuritySettingsRequest name */ + /** EntityType name */ name?: (string|null); + + /** EntityType displayName */ + displayName?: (string|null); + + /** EntityType kind */ + kind?: (google.cloud.dialogflow.cx.v3beta1.EntityType.Kind|keyof typeof google.cloud.dialogflow.cx.v3beta1.EntityType.Kind|null); + + /** EntityType autoExpansionMode */ + autoExpansionMode?: (google.cloud.dialogflow.cx.v3beta1.EntityType.AutoExpansionMode|keyof typeof google.cloud.dialogflow.cx.v3beta1.EntityType.AutoExpansionMode|null); + + /** EntityType entities */ + entities?: (google.cloud.dialogflow.cx.v3beta1.EntityType.IEntity[]|null); + + /** EntityType excludedPhrases */ + excludedPhrases?: (google.cloud.dialogflow.cx.v3beta1.EntityType.IExcludedPhrase[]|null); + + /** EntityType enableFuzzyExtraction */ + enableFuzzyExtraction?: (boolean|null); } - /** Represents a DeleteSecuritySettingsRequest. */ - class DeleteSecuritySettingsRequest implements IDeleteSecuritySettingsRequest { + /** Represents an EntityType. */ + class EntityType implements IEntityType { /** - * Constructs a new DeleteSecuritySettingsRequest. + * Constructs a new EntityType. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IDeleteSecuritySettingsRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IEntityType); - /** DeleteSecuritySettingsRequest name. */ + /** EntityType name. */ public name: string; + /** EntityType displayName. */ + public displayName: string; + + /** EntityType kind. */ + public kind: (google.cloud.dialogflow.cx.v3beta1.EntityType.Kind|keyof typeof google.cloud.dialogflow.cx.v3beta1.EntityType.Kind); + + /** EntityType autoExpansionMode. */ + public autoExpansionMode: (google.cloud.dialogflow.cx.v3beta1.EntityType.AutoExpansionMode|keyof typeof google.cloud.dialogflow.cx.v3beta1.EntityType.AutoExpansionMode); + + /** EntityType entities. */ + public entities: google.cloud.dialogflow.cx.v3beta1.EntityType.IEntity[]; + + /** EntityType excludedPhrases. */ + public excludedPhrases: google.cloud.dialogflow.cx.v3beta1.EntityType.IExcludedPhrase[]; + + /** EntityType enableFuzzyExtraction. */ + public enableFuzzyExtraction: boolean; + /** - * Creates a new DeleteSecuritySettingsRequest instance using the specified properties. + * Creates a new EntityType instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteSecuritySettingsRequest instance + * @returns EntityType instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IDeleteSecuritySettingsRequest): google.cloud.dialogflow.cx.v3beta1.DeleteSecuritySettingsRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IEntityType): google.cloud.dialogflow.cx.v3beta1.EntityType; /** - * Encodes the specified DeleteSecuritySettingsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeleteSecuritySettingsRequest.verify|verify} messages. - * @param message DeleteSecuritySettingsRequest message or plain object to encode + * Encodes the specified EntityType message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.EntityType.verify|verify} messages. + * @param message EntityType message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IDeleteSecuritySettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IEntityType, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteSecuritySettingsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeleteSecuritySettingsRequest.verify|verify} messages. - * @param message DeleteSecuritySettingsRequest message or plain object to encode + * Encodes the specified EntityType message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.EntityType.verify|verify} messages. + * @param message EntityType message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IDeleteSecuritySettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IEntityType, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteSecuritySettingsRequest message from the specified reader or buffer. + * Decodes an EntityType message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteSecuritySettingsRequest + * @returns EntityType * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.DeleteSecuritySettingsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.EntityType; /** - * Decodes a DeleteSecuritySettingsRequest message from the specified reader or buffer, length delimited. + * Decodes an EntityType message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteSecuritySettingsRequest + * @returns EntityType * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.DeleteSecuritySettingsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.EntityType; /** - * Verifies a DeleteSecuritySettingsRequest message. + * Verifies an EntityType message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DeleteSecuritySettingsRequest message from a plain object. Also converts values to their respective internal types. + * Creates an EntityType message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteSecuritySettingsRequest + * @returns EntityType */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.DeleteSecuritySettingsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.EntityType; /** - * Creates a plain object from a DeleteSecuritySettingsRequest message. Also converts values to other types if specified. - * @param message DeleteSecuritySettingsRequest + * Creates a plain object from an EntityType message. Also converts values to other types if specified. + * @param message EntityType * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.DeleteSecuritySettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.EntityType, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteSecuritySettingsRequest to JSON. + * Converts this EntityType to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a SecuritySettings. */ - interface ISecuritySettings { + namespace EntityType { - /** SecuritySettings name */ - name?: (string|null); + /** Properties of an Entity. */ + interface IEntity { - /** SecuritySettings displayName */ - displayName?: (string|null); + /** Entity value */ + value?: (string|null); - /** SecuritySettings redactionStrategy */ - redactionStrategy?: (google.cloud.dialogflow.cx.v3beta1.SecuritySettings.RedactionStrategy|keyof typeof google.cloud.dialogflow.cx.v3beta1.SecuritySettings.RedactionStrategy|null); + /** Entity synonyms */ + synonyms?: (string[]|null); + } - /** SecuritySettings redactionScope */ - redactionScope?: (google.cloud.dialogflow.cx.v3beta1.SecuritySettings.RedactionScope|keyof typeof google.cloud.dialogflow.cx.v3beta1.SecuritySettings.RedactionScope|null); + /** Represents an Entity. */ + class Entity implements IEntity { - /** SecuritySettings inspectTemplate */ - inspectTemplate?: (string|null); + /** + * Constructs a new Entity. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.EntityType.IEntity); - /** SecuritySettings retentionWindowDays */ - retentionWindowDays?: (number|null); + /** Entity value. */ + public value: string; - /** SecuritySettings purgeDataTypes */ - purgeDataTypes?: (google.cloud.dialogflow.cx.v3beta1.SecuritySettings.PurgeDataType[]|null); + /** Entity synonyms. */ + public synonyms: string[]; + + /** + * Creates a new Entity instance using the specified properties. + * @param [properties] Properties to set + * @returns Entity instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.EntityType.IEntity): google.cloud.dialogflow.cx.v3beta1.EntityType.Entity; + + /** + * Encodes the specified Entity message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.EntityType.Entity.verify|verify} messages. + * @param message Entity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.EntityType.IEntity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Entity message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.EntityType.Entity.verify|verify} messages. + * @param message Entity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.EntityType.IEntity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Entity message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Entity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.EntityType.Entity; + + /** + * Decodes an Entity message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Entity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.EntityType.Entity; + + /** + * Verifies an Entity message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Entity message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Entity + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.EntityType.Entity; + + /** + * Creates a plain object from an Entity message. Also converts values to other types if specified. + * @param message Entity + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.EntityType.Entity, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Entity to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an ExcludedPhrase. */ + interface IExcludedPhrase { + + /** ExcludedPhrase value */ + value?: (string|null); + } + + /** Represents an ExcludedPhrase. */ + class ExcludedPhrase implements IExcludedPhrase { + + /** + * Constructs a new ExcludedPhrase. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.EntityType.IExcludedPhrase); + + /** ExcludedPhrase value. */ + public value: string; + + /** + * Creates a new ExcludedPhrase instance using the specified properties. + * @param [properties] Properties to set + * @returns ExcludedPhrase instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.EntityType.IExcludedPhrase): google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase; + + /** + * Encodes the specified ExcludedPhrase message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase.verify|verify} messages. + * @param message ExcludedPhrase message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.EntityType.IExcludedPhrase, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExcludedPhrase message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase.verify|verify} messages. + * @param message ExcludedPhrase message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.EntityType.IExcludedPhrase, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExcludedPhrase message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExcludedPhrase + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase; + + /** + * Decodes an ExcludedPhrase message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExcludedPhrase + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase; + + /** + * Verifies an ExcludedPhrase message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExcludedPhrase message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExcludedPhrase + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase; + + /** + * Creates a plain object from an ExcludedPhrase message. Also converts values to other types if specified. + * @param message ExcludedPhrase + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExcludedPhrase to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Kind enum. */ + enum Kind { + KIND_UNSPECIFIED = 0, + KIND_MAP = 1, + KIND_LIST = 2, + KIND_REGEXP = 3 + } + + /** AutoExpansionMode enum. */ + enum AutoExpansionMode { + AUTO_EXPANSION_MODE_UNSPECIFIED = 0, + AUTO_EXPANSION_MODE_DEFAULT = 1 + } } - /** Represents a SecuritySettings. */ - class SecuritySettings implements ISecuritySettings { + /** Properties of a ListEntityTypesRequest. */ + interface IListEntityTypesRequest { - /** - * Constructs a new SecuritySettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ISecuritySettings); + /** ListEntityTypesRequest parent */ + parent?: (string|null); - /** SecuritySettings name. */ - public name: string; + /** ListEntityTypesRequest languageCode */ + languageCode?: (string|null); - /** SecuritySettings displayName. */ - public displayName: string; + /** ListEntityTypesRequest pageSize */ + pageSize?: (number|null); + + /** ListEntityTypesRequest pageToken */ + pageToken?: (string|null); + } - /** SecuritySettings redactionStrategy. */ - public redactionStrategy: (google.cloud.dialogflow.cx.v3beta1.SecuritySettings.RedactionStrategy|keyof typeof google.cloud.dialogflow.cx.v3beta1.SecuritySettings.RedactionStrategy); + /** Represents a ListEntityTypesRequest. */ + class ListEntityTypesRequest implements IListEntityTypesRequest { - /** SecuritySettings redactionScope. */ - public redactionScope: (google.cloud.dialogflow.cx.v3beta1.SecuritySettings.RedactionScope|keyof typeof google.cloud.dialogflow.cx.v3beta1.SecuritySettings.RedactionScope); + /** + * Constructs a new ListEntityTypesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IListEntityTypesRequest); - /** SecuritySettings inspectTemplate. */ - public inspectTemplate: string; + /** ListEntityTypesRequest parent. */ + public parent: string; - /** SecuritySettings retentionWindowDays. */ - public retentionWindowDays: number; + /** ListEntityTypesRequest languageCode. */ + public languageCode: string; - /** SecuritySettings purgeDataTypes. */ - public purgeDataTypes: google.cloud.dialogflow.cx.v3beta1.SecuritySettings.PurgeDataType[]; + /** ListEntityTypesRequest pageSize. */ + public pageSize: number; - /** SecuritySettings dataRetention. */ - public dataRetention?: "retentionWindowDays"; + /** ListEntityTypesRequest pageToken. */ + public pageToken: string; /** - * Creates a new SecuritySettings instance using the specified properties. + * Creates a new ListEntityTypesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns SecuritySettings instance + * @returns ListEntityTypesRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ISecuritySettings): google.cloud.dialogflow.cx.v3beta1.SecuritySettings; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IListEntityTypesRequest): google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest; /** - * Encodes the specified SecuritySettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SecuritySettings.verify|verify} messages. - * @param message SecuritySettings message or plain object to encode + * Encodes the specified ListEntityTypesRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest.verify|verify} messages. + * @param message ListEntityTypesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.ISecuritySettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IListEntityTypesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SecuritySettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SecuritySettings.verify|verify} messages. - * @param message SecuritySettings message or plain object to encode + * Encodes the specified ListEntityTypesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest.verify|verify} messages. + * @param message ListEntityTypesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ISecuritySettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IListEntityTypesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SecuritySettings message from the specified reader or buffer. + * Decodes a ListEntityTypesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SecuritySettings + * @returns ListEntityTypesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.SecuritySettings; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest; /** - * Decodes a SecuritySettings message from the specified reader or buffer, length delimited. + * Decodes a ListEntityTypesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SecuritySettings + * @returns ListEntityTypesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.SecuritySettings; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest; /** - * Verifies a SecuritySettings message. + * Verifies a ListEntityTypesRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a SecuritySettings message from a plain object. Also converts values to their respective internal types. + * Creates a ListEntityTypesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SecuritySettings + * @returns ListEntityTypesRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.SecuritySettings; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest; /** - * Creates a plain object from a SecuritySettings message. Also converts values to other types if specified. - * @param message SecuritySettings + * Creates a plain object from a ListEntityTypesRequest message. Also converts values to other types if specified. + * @param message ListEntityTypesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.SecuritySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SecuritySettings to JSON. + * Converts this ListEntityTypesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace SecuritySettings { - - /** RedactionStrategy enum. */ - enum RedactionStrategy { - REDACTION_STRATEGY_UNSPECIFIED = 0, - REDACT_WITH_SERVICE = 1 - } - - /** RedactionScope enum. */ - enum RedactionScope { - REDACTION_SCOPE_UNSPECIFIED = 0, - REDACT_DISK_STORAGE = 2 - } - - /** PurgeDataType enum. */ - enum PurgeDataType { - PURGE_DATA_TYPE_UNSPECIFIED = 0, - DIALOGFLOW_HISTORY = 1 - } - } - - /** Properties of a SpeechWordInfo. */ - interface ISpeechWordInfo { - - /** SpeechWordInfo word */ - word?: (string|null); - - /** SpeechWordInfo startOffset */ - startOffset?: (google.protobuf.IDuration|null); + /** Properties of a ListEntityTypesResponse. */ + interface IListEntityTypesResponse { - /** SpeechWordInfo endOffset */ - endOffset?: (google.protobuf.IDuration|null); + /** ListEntityTypesResponse entityTypes */ + entityTypes?: (google.cloud.dialogflow.cx.v3beta1.IEntityType[]|null); - /** SpeechWordInfo confidence */ - confidence?: (number|null); + /** ListEntityTypesResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a SpeechWordInfo. */ - class SpeechWordInfo implements ISpeechWordInfo { + /** Represents a ListEntityTypesResponse. */ + class ListEntityTypesResponse implements IListEntityTypesResponse { /** - * Constructs a new SpeechWordInfo. + * Constructs a new ListEntityTypesResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ISpeechWordInfo); - - /** SpeechWordInfo word. */ - public word: string; - - /** SpeechWordInfo startOffset. */ - public startOffset?: (google.protobuf.IDuration|null); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IListEntityTypesResponse); - /** SpeechWordInfo endOffset. */ - public endOffset?: (google.protobuf.IDuration|null); + /** ListEntityTypesResponse entityTypes. */ + public entityTypes: google.cloud.dialogflow.cx.v3beta1.IEntityType[]; - /** SpeechWordInfo confidence. */ - public confidence: number; + /** ListEntityTypesResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new SpeechWordInfo instance using the specified properties. + * Creates a new ListEntityTypesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns SpeechWordInfo instance + * @returns ListEntityTypesResponse instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ISpeechWordInfo): google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IListEntityTypesResponse): google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse; /** - * Encodes the specified SpeechWordInfo message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo.verify|verify} messages. - * @param message SpeechWordInfo message or plain object to encode + * Encodes the specified ListEntityTypesResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse.verify|verify} messages. + * @param message ListEntityTypesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.ISpeechWordInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IListEntityTypesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SpeechWordInfo message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo.verify|verify} messages. - * @param message SpeechWordInfo message or plain object to encode + * Encodes the specified ListEntityTypesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse.verify|verify} messages. + * @param message ListEntityTypesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ISpeechWordInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IListEntityTypesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SpeechWordInfo message from the specified reader or buffer. + * Decodes a ListEntityTypesResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SpeechWordInfo + * @returns ListEntityTypesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse; /** - * Decodes a SpeechWordInfo message from the specified reader or buffer, length delimited. + * Decodes a ListEntityTypesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SpeechWordInfo + * @returns ListEntityTypesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse; /** - * Verifies a SpeechWordInfo message. + * Verifies a ListEntityTypesResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a SpeechWordInfo message from a plain object. Also converts values to their respective internal types. + * Creates a ListEntityTypesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SpeechWordInfo + * @returns ListEntityTypesResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse; /** - * Creates a plain object from a SpeechWordInfo message. Also converts values to other types if specified. - * @param message SpeechWordInfo + * Creates a plain object from a ListEntityTypesResponse message. Also converts values to other types if specified. + * @param message ListEntityTypesResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SpeechWordInfo to JSON. + * Converts this ListEntityTypesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** AudioEncoding enum. */ - enum AudioEncoding { - AUDIO_ENCODING_UNSPECIFIED = 0, - AUDIO_ENCODING_LINEAR_16 = 1, - AUDIO_ENCODING_FLAC = 2, - AUDIO_ENCODING_MULAW = 3, - AUDIO_ENCODING_AMR = 4, - AUDIO_ENCODING_AMR_WB = 5, - AUDIO_ENCODING_OGG_OPUS = 6, - AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE = 7 - } - - /** Properties of an InputAudioConfig. */ - interface IInputAudioConfig { - - /** InputAudioConfig audioEncoding */ - audioEncoding?: (google.cloud.dialogflow.cx.v3beta1.AudioEncoding|keyof typeof google.cloud.dialogflow.cx.v3beta1.AudioEncoding|null); - - /** InputAudioConfig sampleRateHertz */ - sampleRateHertz?: (number|null); - - /** InputAudioConfig enableWordInfo */ - enableWordInfo?: (boolean|null); - - /** InputAudioConfig phraseHints */ - phraseHints?: (string[]|null); - - /** InputAudioConfig model */ - model?: (string|null); + /** Properties of a GetEntityTypeRequest. */ + interface IGetEntityTypeRequest { - /** InputAudioConfig modelVariant */ - modelVariant?: (google.cloud.dialogflow.cx.v3beta1.SpeechModelVariant|keyof typeof google.cloud.dialogflow.cx.v3beta1.SpeechModelVariant|null); + /** GetEntityTypeRequest name */ + name?: (string|null); - /** InputAudioConfig singleUtterance */ - singleUtterance?: (boolean|null); + /** GetEntityTypeRequest languageCode */ + languageCode?: (string|null); } - /** Represents an InputAudioConfig. */ - class InputAudioConfig implements IInputAudioConfig { + /** Represents a GetEntityTypeRequest. */ + class GetEntityTypeRequest implements IGetEntityTypeRequest { /** - * Constructs a new InputAudioConfig. + * Constructs a new GetEntityTypeRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IInputAudioConfig); - - /** InputAudioConfig audioEncoding. */ - public audioEncoding: (google.cloud.dialogflow.cx.v3beta1.AudioEncoding|keyof typeof google.cloud.dialogflow.cx.v3beta1.AudioEncoding); - - /** InputAudioConfig sampleRateHertz. */ - public sampleRateHertz: number; - - /** InputAudioConfig enableWordInfo. */ - public enableWordInfo: boolean; - - /** InputAudioConfig phraseHints. */ - public phraseHints: string[]; - - /** InputAudioConfig model. */ - public model: string; + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IGetEntityTypeRequest); - /** InputAudioConfig modelVariant. */ - public modelVariant: (google.cloud.dialogflow.cx.v3beta1.SpeechModelVariant|keyof typeof google.cloud.dialogflow.cx.v3beta1.SpeechModelVariant); + /** GetEntityTypeRequest name. */ + public name: string; - /** InputAudioConfig singleUtterance. */ - public singleUtterance: boolean; + /** GetEntityTypeRequest languageCode. */ + public languageCode: string; /** - * Creates a new InputAudioConfig instance using the specified properties. + * Creates a new GetEntityTypeRequest instance using the specified properties. * @param [properties] Properties to set - * @returns InputAudioConfig instance + * @returns GetEntityTypeRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IInputAudioConfig): google.cloud.dialogflow.cx.v3beta1.InputAudioConfig; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IGetEntityTypeRequest): google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest; /** - * Encodes the specified InputAudioConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.InputAudioConfig.verify|verify} messages. - * @param message InputAudioConfig message or plain object to encode + * Encodes the specified GetEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest.verify|verify} messages. + * @param message GetEntityTypeRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IInputAudioConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IGetEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified InputAudioConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.InputAudioConfig.verify|verify} messages. - * @param message InputAudioConfig message or plain object to encode + * Encodes the specified GetEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest.verify|verify} messages. + * @param message GetEntityTypeRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IInputAudioConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IGetEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an InputAudioConfig message from the specified reader or buffer. + * Decodes a GetEntityTypeRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns InputAudioConfig + * @returns GetEntityTypeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.InputAudioConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest; /** - * Decodes an InputAudioConfig message from the specified reader or buffer, length delimited. + * Decodes a GetEntityTypeRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns InputAudioConfig + * @returns GetEntityTypeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.InputAudioConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest; /** - * Verifies an InputAudioConfig message. + * Verifies a GetEntityTypeRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an InputAudioConfig message from a plain object. Also converts values to their respective internal types. + * Creates a GetEntityTypeRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns InputAudioConfig + * @returns GetEntityTypeRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.InputAudioConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest; /** - * Creates a plain object from an InputAudioConfig message. Also converts values to other types if specified. - * @param message InputAudioConfig + * Creates a plain object from a GetEntityTypeRequest message. Also converts values to other types if specified. + * @param message GetEntityTypeRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.InputAudioConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this InputAudioConfig to JSON. + * Converts this GetEntityTypeRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** SpeechModelVariant enum. */ - enum SpeechModelVariant { - SPEECH_MODEL_VARIANT_UNSPECIFIED = 0, - USE_BEST_AVAILABLE = 1, - USE_STANDARD = 2, - USE_ENHANCED = 3 - } + /** Properties of a CreateEntityTypeRequest. */ + interface ICreateEntityTypeRequest { - /** Properties of a VoiceSelectionParams. */ - interface IVoiceSelectionParams { + /** CreateEntityTypeRequest parent */ + parent?: (string|null); - /** VoiceSelectionParams name */ - name?: (string|null); + /** CreateEntityTypeRequest entityType */ + entityType?: (google.cloud.dialogflow.cx.v3beta1.IEntityType|null); - /** VoiceSelectionParams ssmlGender */ - ssmlGender?: (google.cloud.dialogflow.cx.v3beta1.SsmlVoiceGender|keyof typeof google.cloud.dialogflow.cx.v3beta1.SsmlVoiceGender|null); + /** CreateEntityTypeRequest languageCode */ + languageCode?: (string|null); } - /** Represents a VoiceSelectionParams. */ - class VoiceSelectionParams implements IVoiceSelectionParams { + /** Represents a CreateEntityTypeRequest. */ + class CreateEntityTypeRequest implements ICreateEntityTypeRequest { /** - * Constructs a new VoiceSelectionParams. + * Constructs a new CreateEntityTypeRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IVoiceSelectionParams); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ICreateEntityTypeRequest); - /** VoiceSelectionParams name. */ - public name: string; + /** CreateEntityTypeRequest parent. */ + public parent: string; - /** VoiceSelectionParams ssmlGender. */ - public ssmlGender: (google.cloud.dialogflow.cx.v3beta1.SsmlVoiceGender|keyof typeof google.cloud.dialogflow.cx.v3beta1.SsmlVoiceGender); + /** CreateEntityTypeRequest entityType. */ + public entityType?: (google.cloud.dialogflow.cx.v3beta1.IEntityType|null); + + /** CreateEntityTypeRequest languageCode. */ + public languageCode: string; /** - * Creates a new VoiceSelectionParams instance using the specified properties. + * Creates a new CreateEntityTypeRequest instance using the specified properties. * @param [properties] Properties to set - * @returns VoiceSelectionParams instance + * @returns CreateEntityTypeRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IVoiceSelectionParams): google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ICreateEntityTypeRequest): google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest; /** - * Encodes the specified VoiceSelectionParams message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams.verify|verify} messages. - * @param message VoiceSelectionParams message or plain object to encode + * Encodes the specified CreateEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest.verify|verify} messages. + * @param message CreateEntityTypeRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IVoiceSelectionParams, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.ICreateEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified VoiceSelectionParams message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams.verify|verify} messages. - * @param message VoiceSelectionParams message or plain object to encode + * Encodes the specified CreateEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest.verify|verify} messages. + * @param message CreateEntityTypeRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IVoiceSelectionParams, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ICreateEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a VoiceSelectionParams message from the specified reader or buffer. + * Decodes a CreateEntityTypeRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns VoiceSelectionParams + * @returns CreateEntityTypeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest; /** - * Decodes a VoiceSelectionParams message from the specified reader or buffer, length delimited. + * Decodes a CreateEntityTypeRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns VoiceSelectionParams + * @returns CreateEntityTypeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest; /** - * Verifies a VoiceSelectionParams message. + * Verifies a CreateEntityTypeRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a VoiceSelectionParams message from a plain object. Also converts values to their respective internal types. + * Creates a CreateEntityTypeRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns VoiceSelectionParams + * @returns CreateEntityTypeRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest; /** - * Creates a plain object from a VoiceSelectionParams message. Also converts values to other types if specified. - * @param message VoiceSelectionParams + * Creates a plain object from a CreateEntityTypeRequest message. Also converts values to other types if specified. + * @param message CreateEntityTypeRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this VoiceSelectionParams to JSON. + * Converts this CreateEntityTypeRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a SynthesizeSpeechConfig. */ - interface ISynthesizeSpeechConfig { - - /** SynthesizeSpeechConfig speakingRate */ - speakingRate?: (number|null); - - /** SynthesizeSpeechConfig pitch */ - pitch?: (number|null); + /** Properties of an UpdateEntityTypeRequest. */ + interface IUpdateEntityTypeRequest { - /** SynthesizeSpeechConfig volumeGainDb */ - volumeGainDb?: (number|null); + /** UpdateEntityTypeRequest entityType */ + entityType?: (google.cloud.dialogflow.cx.v3beta1.IEntityType|null); - /** SynthesizeSpeechConfig effectsProfileId */ - effectsProfileId?: (string[]|null); + /** UpdateEntityTypeRequest languageCode */ + languageCode?: (string|null); - /** SynthesizeSpeechConfig voice */ - voice?: (google.cloud.dialogflow.cx.v3beta1.IVoiceSelectionParams|null); + /** UpdateEntityTypeRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); } - /** Represents a SynthesizeSpeechConfig. */ - class SynthesizeSpeechConfig implements ISynthesizeSpeechConfig { + /** Represents an UpdateEntityTypeRequest. */ + class UpdateEntityTypeRequest implements IUpdateEntityTypeRequest { /** - * Constructs a new SynthesizeSpeechConfig. + * Constructs a new UpdateEntityTypeRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ISynthesizeSpeechConfig); - - /** SynthesizeSpeechConfig speakingRate. */ - public speakingRate: number; - - /** SynthesizeSpeechConfig pitch. */ - public pitch: number; + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IUpdateEntityTypeRequest); - /** SynthesizeSpeechConfig volumeGainDb. */ - public volumeGainDb: number; + /** UpdateEntityTypeRequest entityType. */ + public entityType?: (google.cloud.dialogflow.cx.v3beta1.IEntityType|null); - /** SynthesizeSpeechConfig effectsProfileId. */ - public effectsProfileId: string[]; + /** UpdateEntityTypeRequest languageCode. */ + public languageCode: string; - /** SynthesizeSpeechConfig voice. */ - public voice?: (google.cloud.dialogflow.cx.v3beta1.IVoiceSelectionParams|null); + /** UpdateEntityTypeRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); /** - * Creates a new SynthesizeSpeechConfig instance using the specified properties. + * Creates a new UpdateEntityTypeRequest instance using the specified properties. * @param [properties] Properties to set - * @returns SynthesizeSpeechConfig instance + * @returns UpdateEntityTypeRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ISynthesizeSpeechConfig): google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IUpdateEntityTypeRequest): google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest; /** - * Encodes the specified SynthesizeSpeechConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig.verify|verify} messages. - * @param message SynthesizeSpeechConfig message or plain object to encode + * Encodes the specified UpdateEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest.verify|verify} messages. + * @param message UpdateEntityTypeRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.ISynthesizeSpeechConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IUpdateEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SynthesizeSpeechConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig.verify|verify} messages. - * @param message SynthesizeSpeechConfig message or plain object to encode + * Encodes the specified UpdateEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest.verify|verify} messages. + * @param message UpdateEntityTypeRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ISynthesizeSpeechConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IUpdateEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SynthesizeSpeechConfig message from the specified reader or buffer. + * Decodes an UpdateEntityTypeRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SynthesizeSpeechConfig + * @returns UpdateEntityTypeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest; /** - * Decodes a SynthesizeSpeechConfig message from the specified reader or buffer, length delimited. + * Decodes an UpdateEntityTypeRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SynthesizeSpeechConfig + * @returns UpdateEntityTypeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest; /** - * Verifies a SynthesizeSpeechConfig message. + * Verifies an UpdateEntityTypeRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a SynthesizeSpeechConfig message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateEntityTypeRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SynthesizeSpeechConfig + * @returns UpdateEntityTypeRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest; /** - * Creates a plain object from a SynthesizeSpeechConfig message. Also converts values to other types if specified. - * @param message SynthesizeSpeechConfig + * Creates a plain object from an UpdateEntityTypeRequest message. Also converts values to other types if specified. + * @param message UpdateEntityTypeRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SynthesizeSpeechConfig to JSON. + * Converts this UpdateEntityTypeRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** SsmlVoiceGender enum. */ - enum SsmlVoiceGender { - SSML_VOICE_GENDER_UNSPECIFIED = 0, - SSML_VOICE_GENDER_MALE = 1, - SSML_VOICE_GENDER_FEMALE = 2, - SSML_VOICE_GENDER_NEUTRAL = 3 - } - - /** Properties of an OutputAudioConfig. */ - interface IOutputAudioConfig { - - /** OutputAudioConfig audioEncoding */ - audioEncoding?: (google.cloud.dialogflow.cx.v3beta1.OutputAudioEncoding|keyof typeof google.cloud.dialogflow.cx.v3beta1.OutputAudioEncoding|null); + /** Properties of a DeleteEntityTypeRequest. */ + interface IDeleteEntityTypeRequest { - /** OutputAudioConfig sampleRateHertz */ - sampleRateHertz?: (number|null); + /** DeleteEntityTypeRequest name */ + name?: (string|null); - /** OutputAudioConfig synthesizeSpeechConfig */ - synthesizeSpeechConfig?: (google.cloud.dialogflow.cx.v3beta1.ISynthesizeSpeechConfig|null); + /** DeleteEntityTypeRequest force */ + force?: (boolean|null); } - /** Represents an OutputAudioConfig. */ - class OutputAudioConfig implements IOutputAudioConfig { + /** Represents a DeleteEntityTypeRequest. */ + class DeleteEntityTypeRequest implements IDeleteEntityTypeRequest { /** - * Constructs a new OutputAudioConfig. + * Constructs a new DeleteEntityTypeRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IOutputAudioConfig); - - /** OutputAudioConfig audioEncoding. */ - public audioEncoding: (google.cloud.dialogflow.cx.v3beta1.OutputAudioEncoding|keyof typeof google.cloud.dialogflow.cx.v3beta1.OutputAudioEncoding); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IDeleteEntityTypeRequest); - /** OutputAudioConfig sampleRateHertz. */ - public sampleRateHertz: number; + /** DeleteEntityTypeRequest name. */ + public name: string; - /** OutputAudioConfig synthesizeSpeechConfig. */ - public synthesizeSpeechConfig?: (google.cloud.dialogflow.cx.v3beta1.ISynthesizeSpeechConfig|null); + /** DeleteEntityTypeRequest force. */ + public force: boolean; /** - * Creates a new OutputAudioConfig instance using the specified properties. + * Creates a new DeleteEntityTypeRequest instance using the specified properties. * @param [properties] Properties to set - * @returns OutputAudioConfig instance + * @returns DeleteEntityTypeRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IOutputAudioConfig): google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IDeleteEntityTypeRequest): google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest; /** - * Encodes the specified OutputAudioConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig.verify|verify} messages. - * @param message OutputAudioConfig message or plain object to encode + * Encodes the specified DeleteEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest.verify|verify} messages. + * @param message DeleteEntityTypeRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IOutputAudioConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IDeleteEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified OutputAudioConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig.verify|verify} messages. - * @param message OutputAudioConfig message or plain object to encode + * Encodes the specified DeleteEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest.verify|verify} messages. + * @param message DeleteEntityTypeRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IOutputAudioConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IDeleteEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an OutputAudioConfig message from the specified reader or buffer. + * Decodes a DeleteEntityTypeRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns OutputAudioConfig + * @returns DeleteEntityTypeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest; /** - * Decodes an OutputAudioConfig message from the specified reader or buffer, length delimited. + * Decodes a DeleteEntityTypeRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns OutputAudioConfig + * @returns DeleteEntityTypeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest; /** - * Verifies an OutputAudioConfig message. + * Verifies a DeleteEntityTypeRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an OutputAudioConfig message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteEntityTypeRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns OutputAudioConfig + * @returns DeleteEntityTypeRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest; /** - * Creates a plain object from an OutputAudioConfig message. Also converts values to other types if specified. - * @param message OutputAudioConfig + * Creates a plain object from a DeleteEntityTypeRequest message. Also converts values to other types if specified. + * @param message DeleteEntityTypeRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this OutputAudioConfig to JSON. + * Converts this DeleteEntityTypeRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** OutputAudioEncoding enum. */ - enum OutputAudioEncoding { - OUTPUT_AUDIO_ENCODING_UNSPECIFIED = 0, - OUTPUT_AUDIO_ENCODING_LINEAR_16 = 1, - OUTPUT_AUDIO_ENCODING_MP3 = 2, - OUTPUT_AUDIO_ENCODING_MP3_64_KBPS = 4, - OUTPUT_AUDIO_ENCODING_OGG_OPUS = 3, - OUTPUT_AUDIO_ENCODING_MULAW = 5 - } - - /** Represents an EntityTypes */ - class EntityTypes extends $protobuf.rpc.Service { + /** Represents an Environments */ + class Environments extends $protobuf.rpc.Service { /** - * Constructs a new EntityTypes service. + * Constructs a new Environments service. * @param rpcImpl RPC implementation * @param [requestDelimited=false] Whether requests are length-delimited * @param [responseDelimited=false] Whether responses are length-delimited @@ -23495,1057 +26464,1124 @@ export namespace google { constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); /** - * Creates new EntityTypes service using the specified rpc implementation. + * Creates new Environments service using the specified rpc implementation. * @param rpcImpl RPC implementation * @param [requestDelimited=false] Whether requests are length-delimited * @param [responseDelimited=false] Whether responses are length-delimited * @returns RPC service. Useful where requests and/or responses are streamed. */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): EntityTypes; + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Environments; /** - * Calls ListEntityTypes. - * @param request ListEntityTypesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListEntityTypesResponse + * Calls ListEnvironments. + * @param request ListEnvironmentsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListEnvironmentsResponse */ - public listEntityTypes(request: google.cloud.dialogflow.cx.v3beta1.IListEntityTypesRequest, callback: google.cloud.dialogflow.cx.v3beta1.EntityTypes.ListEntityTypesCallback): void; + public listEnvironments(request: google.cloud.dialogflow.cx.v3beta1.IListEnvironmentsRequest, callback: google.cloud.dialogflow.cx.v3beta1.Environments.ListEnvironmentsCallback): void; /** - * Calls ListEntityTypes. - * @param request ListEntityTypesRequest message or plain object + * Calls ListEnvironments. + * @param request ListEnvironmentsRequest message or plain object * @returns Promise */ - public listEntityTypes(request: google.cloud.dialogflow.cx.v3beta1.IListEntityTypesRequest): Promise; + public listEnvironments(request: google.cloud.dialogflow.cx.v3beta1.IListEnvironmentsRequest): Promise; /** - * Calls GetEntityType. - * @param request GetEntityTypeRequest message or plain object - * @param callback Node-style callback called with the error, if any, and EntityType + * Calls GetEnvironment. + * @param request GetEnvironmentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Environment */ - public getEntityType(request: google.cloud.dialogflow.cx.v3beta1.IGetEntityTypeRequest, callback: google.cloud.dialogflow.cx.v3beta1.EntityTypes.GetEntityTypeCallback): void; + public getEnvironment(request: google.cloud.dialogflow.cx.v3beta1.IGetEnvironmentRequest, callback: google.cloud.dialogflow.cx.v3beta1.Environments.GetEnvironmentCallback): void; /** - * Calls GetEntityType. - * @param request GetEntityTypeRequest message or plain object + * Calls GetEnvironment. + * @param request GetEnvironmentRequest message or plain object * @returns Promise */ - public getEntityType(request: google.cloud.dialogflow.cx.v3beta1.IGetEntityTypeRequest): Promise; + public getEnvironment(request: google.cloud.dialogflow.cx.v3beta1.IGetEnvironmentRequest): Promise; /** - * Calls CreateEntityType. - * @param request CreateEntityTypeRequest message or plain object - * @param callback Node-style callback called with the error, if any, and EntityType + * Calls CreateEnvironment. + * @param request CreateEnvironmentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - public createEntityType(request: google.cloud.dialogflow.cx.v3beta1.ICreateEntityTypeRequest, callback: google.cloud.dialogflow.cx.v3beta1.EntityTypes.CreateEntityTypeCallback): void; + public createEnvironment(request: google.cloud.dialogflow.cx.v3beta1.ICreateEnvironmentRequest, callback: google.cloud.dialogflow.cx.v3beta1.Environments.CreateEnvironmentCallback): void; /** - * Calls CreateEntityType. - * @param request CreateEntityTypeRequest message or plain object + * Calls CreateEnvironment. + * @param request CreateEnvironmentRequest message or plain object * @returns Promise */ - public createEntityType(request: google.cloud.dialogflow.cx.v3beta1.ICreateEntityTypeRequest): Promise; + public createEnvironment(request: google.cloud.dialogflow.cx.v3beta1.ICreateEnvironmentRequest): Promise; /** - * Calls UpdateEntityType. - * @param request UpdateEntityTypeRequest message or plain object - * @param callback Node-style callback called with the error, if any, and EntityType + * Calls UpdateEnvironment. + * @param request UpdateEnvironmentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - public updateEntityType(request: google.cloud.dialogflow.cx.v3beta1.IUpdateEntityTypeRequest, callback: google.cloud.dialogflow.cx.v3beta1.EntityTypes.UpdateEntityTypeCallback): void; + public updateEnvironment(request: google.cloud.dialogflow.cx.v3beta1.IUpdateEnvironmentRequest, callback: google.cloud.dialogflow.cx.v3beta1.Environments.UpdateEnvironmentCallback): void; /** - * Calls UpdateEntityType. - * @param request UpdateEntityTypeRequest message or plain object + * Calls UpdateEnvironment. + * @param request UpdateEnvironmentRequest message or plain object * @returns Promise */ - public updateEntityType(request: google.cloud.dialogflow.cx.v3beta1.IUpdateEntityTypeRequest): Promise; + public updateEnvironment(request: google.cloud.dialogflow.cx.v3beta1.IUpdateEnvironmentRequest): Promise; /** - * Calls DeleteEntityType. - * @param request DeleteEntityTypeRequest message or plain object + * Calls DeleteEnvironment. + * @param request DeleteEnvironmentRequest message or plain object * @param callback Node-style callback called with the error, if any, and Empty */ - public deleteEntityType(request: google.cloud.dialogflow.cx.v3beta1.IDeleteEntityTypeRequest, callback: google.cloud.dialogflow.cx.v3beta1.EntityTypes.DeleteEntityTypeCallback): void; + public deleteEnvironment(request: google.cloud.dialogflow.cx.v3beta1.IDeleteEnvironmentRequest, callback: google.cloud.dialogflow.cx.v3beta1.Environments.DeleteEnvironmentCallback): void; /** - * Calls DeleteEntityType. - * @param request DeleteEntityTypeRequest message or plain object + * Calls DeleteEnvironment. + * @param request DeleteEnvironmentRequest message or plain object * @returns Promise */ - public deleteEntityType(request: google.cloud.dialogflow.cx.v3beta1.IDeleteEntityTypeRequest): Promise; + public deleteEnvironment(request: google.cloud.dialogflow.cx.v3beta1.IDeleteEnvironmentRequest): Promise; + + /** + * Calls LookupEnvironmentHistory. + * @param request LookupEnvironmentHistoryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LookupEnvironmentHistoryResponse + */ + public lookupEnvironmentHistory(request: google.cloud.dialogflow.cx.v3beta1.ILookupEnvironmentHistoryRequest, callback: google.cloud.dialogflow.cx.v3beta1.Environments.LookupEnvironmentHistoryCallback): void; + + /** + * Calls LookupEnvironmentHistory. + * @param request LookupEnvironmentHistoryRequest message or plain object + * @returns Promise + */ + public lookupEnvironmentHistory(request: google.cloud.dialogflow.cx.v3beta1.ILookupEnvironmentHistoryRequest): Promise; } - namespace EntityTypes { + namespace Environments { /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.EntityTypes#listEntityTypes}. + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Environments#listEnvironments}. * @param error Error, if any - * @param [response] ListEntityTypesResponse + * @param [response] ListEnvironmentsResponse */ - type ListEntityTypesCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse) => void; + type ListEnvironmentsCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse) => void; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.EntityTypes#getEntityType}. + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Environments#getEnvironment}. * @param error Error, if any - * @param [response] EntityType + * @param [response] Environment */ - type GetEntityTypeCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.EntityType) => void; + type GetEnvironmentCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.Environment) => void; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.EntityTypes#createEntityType}. + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Environments#createEnvironment}. * @param error Error, if any - * @param [response] EntityType + * @param [response] Operation */ - type CreateEntityTypeCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.EntityType) => void; + type CreateEnvironmentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.EntityTypes#updateEntityType}. + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Environments#updateEnvironment}. * @param error Error, if any - * @param [response] EntityType + * @param [response] Operation */ - type UpdateEntityTypeCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.EntityType) => void; + type UpdateEnvironmentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.EntityTypes#deleteEntityType}. + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Environments#deleteEnvironment}. * @param error Error, if any * @param [response] Empty */ - type DeleteEntityTypeCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + type DeleteEnvironmentCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Environments#lookupEnvironmentHistory}. + * @param error Error, if any + * @param [response] LookupEnvironmentHistoryResponse + */ + type LookupEnvironmentHistoryCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse) => void; } - /** Properties of an EntityType. */ - interface IEntityType { + /** Properties of an Environment. */ + interface IEnvironment { - /** EntityType name */ + /** Environment name */ name?: (string|null); - /** EntityType displayName */ + /** Environment displayName */ displayName?: (string|null); - /** EntityType kind */ - kind?: (google.cloud.dialogflow.cx.v3beta1.EntityType.Kind|keyof typeof google.cloud.dialogflow.cx.v3beta1.EntityType.Kind|null); - - /** EntityType autoExpansionMode */ - autoExpansionMode?: (google.cloud.dialogflow.cx.v3beta1.EntityType.AutoExpansionMode|keyof typeof google.cloud.dialogflow.cx.v3beta1.EntityType.AutoExpansionMode|null); - - /** EntityType entities */ - entities?: (google.cloud.dialogflow.cx.v3beta1.EntityType.IEntity[]|null); + /** Environment description */ + description?: (string|null); - /** EntityType excludedPhrases */ - excludedPhrases?: (google.cloud.dialogflow.cx.v3beta1.EntityType.IExcludedPhrase[]|null); + /** Environment versionConfigs */ + versionConfigs?: (google.cloud.dialogflow.cx.v3beta1.Environment.IVersionConfig[]|null); - /** EntityType enableFuzzyExtraction */ - enableFuzzyExtraction?: (boolean|null); + /** Environment updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); } - /** Represents an EntityType. */ - class EntityType implements IEntityType { + /** Represents an Environment. */ + class Environment implements IEnvironment { /** - * Constructs a new EntityType. + * Constructs a new Environment. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IEntityType); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IEnvironment); - /** EntityType name. */ + /** Environment name. */ public name: string; - /** EntityType displayName. */ + /** Environment displayName. */ public displayName: string; - /** EntityType kind. */ - public kind: (google.cloud.dialogflow.cx.v3beta1.EntityType.Kind|keyof typeof google.cloud.dialogflow.cx.v3beta1.EntityType.Kind); - - /** EntityType autoExpansionMode. */ - public autoExpansionMode: (google.cloud.dialogflow.cx.v3beta1.EntityType.AutoExpansionMode|keyof typeof google.cloud.dialogflow.cx.v3beta1.EntityType.AutoExpansionMode); - - /** EntityType entities. */ - public entities: google.cloud.dialogflow.cx.v3beta1.EntityType.IEntity[]; + /** Environment description. */ + public description: string; - /** EntityType excludedPhrases. */ - public excludedPhrases: google.cloud.dialogflow.cx.v3beta1.EntityType.IExcludedPhrase[]; + /** Environment versionConfigs. */ + public versionConfigs: google.cloud.dialogflow.cx.v3beta1.Environment.IVersionConfig[]; - /** EntityType enableFuzzyExtraction. */ - public enableFuzzyExtraction: boolean; + /** Environment updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); /** - * Creates a new EntityType instance using the specified properties. + * Creates a new Environment instance using the specified properties. * @param [properties] Properties to set - * @returns EntityType instance + * @returns Environment instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IEntityType): google.cloud.dialogflow.cx.v3beta1.EntityType; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IEnvironment): google.cloud.dialogflow.cx.v3beta1.Environment; /** - * Encodes the specified EntityType message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.EntityType.verify|verify} messages. - * @param message EntityType message or plain object to encode + * Encodes the specified Environment message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Environment.verify|verify} messages. + * @param message Environment message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IEntityType, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IEnvironment, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified EntityType message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.EntityType.verify|verify} messages. - * @param message EntityType message or plain object to encode + * Encodes the specified Environment message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Environment.verify|verify} messages. + * @param message Environment message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IEntityType, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IEnvironment, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an EntityType message from the specified reader or buffer. + * Decodes an Environment message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns EntityType + * @returns Environment * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.EntityType; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.Environment; /** - * Decodes an EntityType message from the specified reader or buffer, length delimited. + * Decodes an Environment message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns EntityType + * @returns Environment * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.EntityType; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.Environment; /** - * Verifies an EntityType message. + * Verifies an Environment message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an EntityType message from a plain object. Also converts values to their respective internal types. + * Creates an Environment message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns EntityType + * @returns Environment */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.EntityType; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.Environment; /** - * Creates a plain object from an EntityType message. Also converts values to other types if specified. - * @param message EntityType + * Creates a plain object from an Environment message. Also converts values to other types if specified. + * @param message Environment * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.EntityType, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.Environment, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this EntityType to JSON. + * Converts this Environment to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace EntityType { - - /** Properties of an Entity. */ - interface IEntity { + namespace Environment { - /** Entity value */ - value?: (string|null); + /** Properties of a VersionConfig. */ + interface IVersionConfig { - /** Entity synonyms */ - synonyms?: (string[]|null); + /** VersionConfig version */ + version?: (string|null); } - /** Represents an Entity. */ - class Entity implements IEntity { + /** Represents a VersionConfig. */ + class VersionConfig implements IVersionConfig { /** - * Constructs a new Entity. + * Constructs a new VersionConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.EntityType.IEntity); - - /** Entity value. */ - public value: string; + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.Environment.IVersionConfig); - /** Entity synonyms. */ - public synonyms: string[]; + /** VersionConfig version. */ + public version: string; /** - * Creates a new Entity instance using the specified properties. + * Creates a new VersionConfig instance using the specified properties. * @param [properties] Properties to set - * @returns Entity instance + * @returns VersionConfig instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.EntityType.IEntity): google.cloud.dialogflow.cx.v3beta1.EntityType.Entity; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.Environment.IVersionConfig): google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig; /** - * Encodes the specified Entity message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.EntityType.Entity.verify|verify} messages. - * @param message Entity message or plain object to encode + * Encodes the specified VersionConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig.verify|verify} messages. + * @param message VersionConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.EntityType.IEntity, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.Environment.IVersionConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Entity message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.EntityType.Entity.verify|verify} messages. - * @param message Entity message or plain object to encode + * Encodes the specified VersionConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig.verify|verify} messages. + * @param message VersionConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.EntityType.IEntity, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.Environment.IVersionConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Entity message from the specified reader or buffer. + * Decodes a VersionConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Entity + * @returns VersionConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.EntityType.Entity; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig; /** - * Decodes an Entity message from the specified reader or buffer, length delimited. + * Decodes a VersionConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Entity + * @returns VersionConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.EntityType.Entity; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig; /** - * Verifies an Entity message. + * Verifies a VersionConfig message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an Entity message from a plain object. Also converts values to their respective internal types. + * Creates a VersionConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Entity + * @returns VersionConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.EntityType.Entity; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig; /** - * Creates a plain object from an Entity message. Also converts values to other types if specified. - * @param message Entity + * Creates a plain object from a VersionConfig message. Also converts values to other types if specified. + * @param message VersionConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.EntityType.Entity, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Entity to JSON. + * Converts this VersionConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } + } - /** Properties of an ExcludedPhrase. */ - interface IExcludedPhrase { + /** Properties of a ListEnvironmentsRequest. */ + interface IListEnvironmentsRequest { - /** ExcludedPhrase value */ - value?: (string|null); - } + /** ListEnvironmentsRequest parent */ + parent?: (string|null); - /** Represents an ExcludedPhrase. */ - class ExcludedPhrase implements IExcludedPhrase { + /** ListEnvironmentsRequest pageSize */ + pageSize?: (number|null); - /** - * Constructs a new ExcludedPhrase. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.EntityType.IExcludedPhrase); + /** ListEnvironmentsRequest pageToken */ + pageToken?: (string|null); + } - /** ExcludedPhrase value. */ - public value: string; + /** Represents a ListEnvironmentsRequest. */ + class ListEnvironmentsRequest implements IListEnvironmentsRequest { - /** - * Creates a new ExcludedPhrase instance using the specified properties. - * @param [properties] Properties to set - * @returns ExcludedPhrase instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.EntityType.IExcludedPhrase): google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase; + /** + * Constructs a new ListEnvironmentsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IListEnvironmentsRequest); - /** - * Encodes the specified ExcludedPhrase message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase.verify|verify} messages. - * @param message ExcludedPhrase message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.EntityType.IExcludedPhrase, writer?: $protobuf.Writer): $protobuf.Writer; + /** ListEnvironmentsRequest parent. */ + public parent: string; - /** - * Encodes the specified ExcludedPhrase message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase.verify|verify} messages. - * @param message ExcludedPhrase message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.EntityType.IExcludedPhrase, writer?: $protobuf.Writer): $protobuf.Writer; + /** ListEnvironmentsRequest pageSize. */ + public pageSize: number; - /** - * Decodes an ExcludedPhrase message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExcludedPhrase - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase; + /** ListEnvironmentsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListEnvironmentsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListEnvironmentsRequest instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IListEnvironmentsRequest): google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest; + + /** + * Encodes the specified ListEnvironmentsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest.verify|verify} messages. + * @param message ListEnvironmentsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IListEnvironmentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListEnvironmentsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest.verify|verify} messages. + * @param message ListEnvironmentsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IListEnvironmentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListEnvironmentsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListEnvironmentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest; + + /** + * Decodes a ListEnvironmentsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListEnvironmentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest; + + /** + * Verifies a ListEnvironmentsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListEnvironmentsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListEnvironmentsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest; + + /** + * Creates a plain object from a ListEnvironmentsRequest message. Also converts values to other types if specified. + * @param message ListEnvironmentsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListEnvironmentsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListEnvironmentsResponse. */ + interface IListEnvironmentsResponse { + + /** ListEnvironmentsResponse environments */ + environments?: (google.cloud.dialogflow.cx.v3beta1.IEnvironment[]|null); - /** - * Decodes an ExcludedPhrase message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExcludedPhrase - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase; + /** ListEnvironmentsResponse nextPageToken */ + nextPageToken?: (string|null); + } - /** - * Verifies an ExcludedPhrase message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** Represents a ListEnvironmentsResponse. */ + class ListEnvironmentsResponse implements IListEnvironmentsResponse { - /** - * Creates an ExcludedPhrase message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExcludedPhrase - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase; + /** + * Constructs a new ListEnvironmentsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IListEnvironmentsResponse); - /** - * Creates a plain object from an ExcludedPhrase message. Also converts values to other types if specified. - * @param message ExcludedPhrase - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** ListEnvironmentsResponse environments. */ + public environments: google.cloud.dialogflow.cx.v3beta1.IEnvironment[]; - /** - * Converts this ExcludedPhrase to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** ListEnvironmentsResponse nextPageToken. */ + public nextPageToken: string; - /** Kind enum. */ - enum Kind { - KIND_UNSPECIFIED = 0, - KIND_MAP = 1, - KIND_LIST = 2, - KIND_REGEXP = 3 - } + /** + * Creates a new ListEnvironmentsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListEnvironmentsResponse instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IListEnvironmentsResponse): google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse; - /** AutoExpansionMode enum. */ - enum AutoExpansionMode { - AUTO_EXPANSION_MODE_UNSPECIFIED = 0, - AUTO_EXPANSION_MODE_DEFAULT = 1 - } - } + /** + * Encodes the specified ListEnvironmentsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse.verify|verify} messages. + * @param message ListEnvironmentsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IListEnvironmentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** Properties of a ListEntityTypesRequest. */ - interface IListEntityTypesRequest { + /** + * Encodes the specified ListEnvironmentsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse.verify|verify} messages. + * @param message ListEnvironmentsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IListEnvironmentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** ListEntityTypesRequest parent */ - parent?: (string|null); + /** + * Decodes a ListEnvironmentsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListEnvironmentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse; - /** ListEntityTypesRequest languageCode */ - languageCode?: (string|null); + /** + * Decodes a ListEnvironmentsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListEnvironmentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse; - /** ListEntityTypesRequest pageSize */ - pageSize?: (number|null); + /** + * Verifies a ListEnvironmentsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** ListEntityTypesRequest pageToken */ - pageToken?: (string|null); - } + /** + * Creates a ListEnvironmentsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListEnvironmentsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse; - /** Represents a ListEntityTypesRequest. */ - class ListEntityTypesRequest implements IListEntityTypesRequest { + /** + * Creates a plain object from a ListEnvironmentsResponse message. Also converts values to other types if specified. + * @param message ListEnvironmentsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Constructs a new ListEntityTypesRequest. - * @param [properties] Properties to set + * Converts this ListEnvironmentsResponse to JSON. + * @returns JSON object */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IListEntityTypesRequest); + public toJSON(): { [k: string]: any }; + } - /** ListEntityTypesRequest parent. */ - public parent: string; + /** Properties of a GetEnvironmentRequest. */ + interface IGetEnvironmentRequest { - /** ListEntityTypesRequest languageCode. */ - public languageCode: string; + /** GetEnvironmentRequest name */ + name?: (string|null); + } - /** ListEntityTypesRequest pageSize. */ - public pageSize: number; + /** Represents a GetEnvironmentRequest. */ + class GetEnvironmentRequest implements IGetEnvironmentRequest { - /** ListEntityTypesRequest pageToken. */ - public pageToken: string; + /** + * Constructs a new GetEnvironmentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IGetEnvironmentRequest); + + /** GetEnvironmentRequest name. */ + public name: string; /** - * Creates a new ListEntityTypesRequest instance using the specified properties. + * Creates a new GetEnvironmentRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListEntityTypesRequest instance + * @returns GetEnvironmentRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IListEntityTypesRequest): google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IGetEnvironmentRequest): google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest; /** - * Encodes the specified ListEntityTypesRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest.verify|verify} messages. - * @param message ListEntityTypesRequest message or plain object to encode + * Encodes the specified GetEnvironmentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest.verify|verify} messages. + * @param message GetEnvironmentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IListEntityTypesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IGetEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListEntityTypesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest.verify|verify} messages. - * @param message ListEntityTypesRequest message or plain object to encode + * Encodes the specified GetEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest.verify|verify} messages. + * @param message GetEnvironmentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IListEntityTypesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IGetEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListEntityTypesRequest message from the specified reader or buffer. + * Decodes a GetEnvironmentRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListEntityTypesRequest + * @returns GetEnvironmentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest; /** - * Decodes a ListEntityTypesRequest message from the specified reader or buffer, length delimited. + * Decodes a GetEnvironmentRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListEntityTypesRequest + * @returns GetEnvironmentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest; /** - * Verifies a ListEntityTypesRequest message. + * Verifies a GetEnvironmentRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListEntityTypesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetEnvironmentRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListEntityTypesRequest + * @returns GetEnvironmentRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest; /** - * Creates a plain object from a ListEntityTypesRequest message. Also converts values to other types if specified. - * @param message ListEntityTypesRequest + * Creates a plain object from a GetEnvironmentRequest message. Also converts values to other types if specified. + * @param message GetEnvironmentRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListEntityTypesRequest to JSON. + * Converts this GetEnvironmentRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListEntityTypesResponse. */ - interface IListEntityTypesResponse { + /** Properties of a CreateEnvironmentRequest. */ + interface ICreateEnvironmentRequest { - /** ListEntityTypesResponse entityTypes */ - entityTypes?: (google.cloud.dialogflow.cx.v3beta1.IEntityType[]|null); + /** CreateEnvironmentRequest parent */ + parent?: (string|null); - /** ListEntityTypesResponse nextPageToken */ - nextPageToken?: (string|null); + /** CreateEnvironmentRequest environment */ + environment?: (google.cloud.dialogflow.cx.v3beta1.IEnvironment|null); } - /** Represents a ListEntityTypesResponse. */ - class ListEntityTypesResponse implements IListEntityTypesResponse { + /** Represents a CreateEnvironmentRequest. */ + class CreateEnvironmentRequest implements ICreateEnvironmentRequest { /** - * Constructs a new ListEntityTypesResponse. + * Constructs a new CreateEnvironmentRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IListEntityTypesResponse); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ICreateEnvironmentRequest); - /** ListEntityTypesResponse entityTypes. */ - public entityTypes: google.cloud.dialogflow.cx.v3beta1.IEntityType[]; + /** CreateEnvironmentRequest parent. */ + public parent: string; - /** ListEntityTypesResponse nextPageToken. */ - public nextPageToken: string; + /** CreateEnvironmentRequest environment. */ + public environment?: (google.cloud.dialogflow.cx.v3beta1.IEnvironment|null); /** - * Creates a new ListEntityTypesResponse instance using the specified properties. + * Creates a new CreateEnvironmentRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListEntityTypesResponse instance + * @returns CreateEnvironmentRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IListEntityTypesResponse): google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ICreateEnvironmentRequest): google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest; /** - * Encodes the specified ListEntityTypesResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse.verify|verify} messages. - * @param message ListEntityTypesResponse message or plain object to encode + * Encodes the specified CreateEnvironmentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest.verify|verify} messages. + * @param message CreateEnvironmentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IListEntityTypesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.ICreateEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListEntityTypesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse.verify|verify} messages. - * @param message ListEntityTypesResponse message or plain object to encode + * Encodes the specified CreateEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest.verify|verify} messages. + * @param message CreateEnvironmentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IListEntityTypesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ICreateEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListEntityTypesResponse message from the specified reader or buffer. + * Decodes a CreateEnvironmentRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListEntityTypesResponse + * @returns CreateEnvironmentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest; /** - * Decodes a ListEntityTypesResponse message from the specified reader or buffer, length delimited. + * Decodes a CreateEnvironmentRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListEntityTypesResponse + * @returns CreateEnvironmentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest; /** - * Verifies a ListEntityTypesResponse message. + * Verifies a CreateEnvironmentRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListEntityTypesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a CreateEnvironmentRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListEntityTypesResponse + * @returns CreateEnvironmentRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest; /** - * Creates a plain object from a ListEntityTypesResponse message. Also converts values to other types if specified. - * @param message ListEntityTypesResponse + * Creates a plain object from a CreateEnvironmentRequest message. Also converts values to other types if specified. + * @param message CreateEnvironmentRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListEntityTypesResponse to JSON. + * Converts this CreateEnvironmentRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetEntityTypeRequest. */ - interface IGetEntityTypeRequest { + /** Properties of an UpdateEnvironmentRequest. */ + interface IUpdateEnvironmentRequest { - /** GetEntityTypeRequest name */ - name?: (string|null); + /** UpdateEnvironmentRequest environment */ + environment?: (google.cloud.dialogflow.cx.v3beta1.IEnvironment|null); - /** GetEntityTypeRequest languageCode */ - languageCode?: (string|null); + /** UpdateEnvironmentRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); } - /** Represents a GetEntityTypeRequest. */ - class GetEntityTypeRequest implements IGetEntityTypeRequest { + /** Represents an UpdateEnvironmentRequest. */ + class UpdateEnvironmentRequest implements IUpdateEnvironmentRequest { /** - * Constructs a new GetEntityTypeRequest. + * Constructs a new UpdateEnvironmentRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IGetEntityTypeRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IUpdateEnvironmentRequest); - /** GetEntityTypeRequest name. */ - public name: string; + /** UpdateEnvironmentRequest environment. */ + public environment?: (google.cloud.dialogflow.cx.v3beta1.IEnvironment|null); - /** GetEntityTypeRequest languageCode. */ - public languageCode: string; + /** UpdateEnvironmentRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); /** - * Creates a new GetEntityTypeRequest instance using the specified properties. + * Creates a new UpdateEnvironmentRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetEntityTypeRequest instance + * @returns UpdateEnvironmentRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IGetEntityTypeRequest): google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IUpdateEnvironmentRequest): google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest; /** - * Encodes the specified GetEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest.verify|verify} messages. - * @param message GetEntityTypeRequest message or plain object to encode + * Encodes the specified UpdateEnvironmentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest.verify|verify} messages. + * @param message UpdateEnvironmentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IGetEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IUpdateEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest.verify|verify} messages. - * @param message GetEntityTypeRequest message or plain object to encode + * Encodes the specified UpdateEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest.verify|verify} messages. + * @param message UpdateEnvironmentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IGetEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IUpdateEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetEntityTypeRequest message from the specified reader or buffer. + * Decodes an UpdateEnvironmentRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetEntityTypeRequest + * @returns UpdateEnvironmentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest; /** - * Decodes a GetEntityTypeRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateEnvironmentRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetEntityTypeRequest + * @returns UpdateEnvironmentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest; /** - * Verifies a GetEntityTypeRequest message. + * Verifies an UpdateEnvironmentRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetEntityTypeRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateEnvironmentRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetEntityTypeRequest + * @returns UpdateEnvironmentRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest; /** - * Creates a plain object from a GetEntityTypeRequest message. Also converts values to other types if specified. - * @param message GetEntityTypeRequest + * Creates a plain object from an UpdateEnvironmentRequest message. Also converts values to other types if specified. + * @param message UpdateEnvironmentRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetEntityTypeRequest to JSON. + * Converts this UpdateEnvironmentRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CreateEntityTypeRequest. */ - interface ICreateEntityTypeRequest { - - /** CreateEntityTypeRequest parent */ - parent?: (string|null); - - /** CreateEntityTypeRequest entityType */ - entityType?: (google.cloud.dialogflow.cx.v3beta1.IEntityType|null); + /** Properties of a DeleteEnvironmentRequest. */ + interface IDeleteEnvironmentRequest { - /** CreateEntityTypeRequest languageCode */ - languageCode?: (string|null); + /** DeleteEnvironmentRequest name */ + name?: (string|null); } - /** Represents a CreateEntityTypeRequest. */ - class CreateEntityTypeRequest implements ICreateEntityTypeRequest { + /** Represents a DeleteEnvironmentRequest. */ + class DeleteEnvironmentRequest implements IDeleteEnvironmentRequest { /** - * Constructs a new CreateEntityTypeRequest. + * Constructs a new DeleteEnvironmentRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ICreateEntityTypeRequest); - - /** CreateEntityTypeRequest parent. */ - public parent: string; - - /** CreateEntityTypeRequest entityType. */ - public entityType?: (google.cloud.dialogflow.cx.v3beta1.IEntityType|null); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IDeleteEnvironmentRequest); - /** CreateEntityTypeRequest languageCode. */ - public languageCode: string; + /** DeleteEnvironmentRequest name. */ + public name: string; /** - * Creates a new CreateEntityTypeRequest instance using the specified properties. + * Creates a new DeleteEnvironmentRequest instance using the specified properties. * @param [properties] Properties to set - * @returns CreateEntityTypeRequest instance + * @returns DeleteEnvironmentRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ICreateEntityTypeRequest): google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IDeleteEnvironmentRequest): google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest; /** - * Encodes the specified CreateEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest.verify|verify} messages. - * @param message CreateEntityTypeRequest message or plain object to encode + * Encodes the specified DeleteEnvironmentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest.verify|verify} messages. + * @param message DeleteEnvironmentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.ICreateEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IDeleteEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest.verify|verify} messages. - * @param message CreateEntityTypeRequest message or plain object to encode + * Encodes the specified DeleteEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest.verify|verify} messages. + * @param message DeleteEnvironmentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ICreateEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IDeleteEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateEntityTypeRequest message from the specified reader or buffer. + * Decodes a DeleteEnvironmentRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateEntityTypeRequest + * @returns DeleteEnvironmentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest; /** - * Decodes a CreateEntityTypeRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteEnvironmentRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateEntityTypeRequest + * @returns DeleteEnvironmentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest; /** - * Verifies a CreateEntityTypeRequest message. + * Verifies a DeleteEnvironmentRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CreateEntityTypeRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteEnvironmentRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateEntityTypeRequest + * @returns DeleteEnvironmentRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest; /** - * Creates a plain object from a CreateEntityTypeRequest message. Also converts values to other types if specified. - * @param message CreateEntityTypeRequest + * Creates a plain object from a DeleteEnvironmentRequest message. Also converts values to other types if specified. + * @param message DeleteEnvironmentRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateEntityTypeRequest to JSON. + * Converts this DeleteEnvironmentRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an UpdateEntityTypeRequest. */ - interface IUpdateEntityTypeRequest { + /** Properties of a LookupEnvironmentHistoryRequest. */ + interface ILookupEnvironmentHistoryRequest { - /** UpdateEntityTypeRequest entityType */ - entityType?: (google.cloud.dialogflow.cx.v3beta1.IEntityType|null); + /** LookupEnvironmentHistoryRequest name */ + name?: (string|null); - /** UpdateEntityTypeRequest languageCode */ - languageCode?: (string|null); + /** LookupEnvironmentHistoryRequest pageSize */ + pageSize?: (number|null); - /** UpdateEntityTypeRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** LookupEnvironmentHistoryRequest pageToken */ + pageToken?: (string|null); } - /** Represents an UpdateEntityTypeRequest. */ - class UpdateEntityTypeRequest implements IUpdateEntityTypeRequest { + /** Represents a LookupEnvironmentHistoryRequest. */ + class LookupEnvironmentHistoryRequest implements ILookupEnvironmentHistoryRequest { /** - * Constructs a new UpdateEntityTypeRequest. + * Constructs a new LookupEnvironmentHistoryRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IUpdateEntityTypeRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ILookupEnvironmentHistoryRequest); - /** UpdateEntityTypeRequest entityType. */ - public entityType?: (google.cloud.dialogflow.cx.v3beta1.IEntityType|null); + /** LookupEnvironmentHistoryRequest name. */ + public name: string; - /** UpdateEntityTypeRequest languageCode. */ - public languageCode: string; + /** LookupEnvironmentHistoryRequest pageSize. */ + public pageSize: number; - /** UpdateEntityTypeRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** LookupEnvironmentHistoryRequest pageToken. */ + public pageToken: string; /** - * Creates a new UpdateEntityTypeRequest instance using the specified properties. + * Creates a new LookupEnvironmentHistoryRequest instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateEntityTypeRequest instance + * @returns LookupEnvironmentHistoryRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IUpdateEntityTypeRequest): google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ILookupEnvironmentHistoryRequest): google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest; /** - * Encodes the specified UpdateEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest.verify|verify} messages. - * @param message UpdateEntityTypeRequest message or plain object to encode + * Encodes the specified LookupEnvironmentHistoryRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest.verify|verify} messages. + * @param message LookupEnvironmentHistoryRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IUpdateEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.ILookupEnvironmentHistoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest.verify|verify} messages. - * @param message UpdateEntityTypeRequest message or plain object to encode + * Encodes the specified LookupEnvironmentHistoryRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest.verify|verify} messages. + * @param message LookupEnvironmentHistoryRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IUpdateEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ILookupEnvironmentHistoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateEntityTypeRequest message from the specified reader or buffer. + * Decodes a LookupEnvironmentHistoryRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateEntityTypeRequest + * @returns LookupEnvironmentHistoryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest; /** - * Decodes an UpdateEntityTypeRequest message from the specified reader or buffer, length delimited. + * Decodes a LookupEnvironmentHistoryRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateEntityTypeRequest + * @returns LookupEnvironmentHistoryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest; /** - * Verifies an UpdateEntityTypeRequest message. + * Verifies a LookupEnvironmentHistoryRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an UpdateEntityTypeRequest message from a plain object. Also converts values to their respective internal types. + * Creates a LookupEnvironmentHistoryRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateEntityTypeRequest + * @returns LookupEnvironmentHistoryRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest; /** - * Creates a plain object from an UpdateEntityTypeRequest message. Also converts values to other types if specified. - * @param message UpdateEntityTypeRequest + * Creates a plain object from a LookupEnvironmentHistoryRequest message. Also converts values to other types if specified. + * @param message LookupEnvironmentHistoryRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateEntityTypeRequest to JSON. + * Converts this LookupEnvironmentHistoryRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DeleteEntityTypeRequest. */ - interface IDeleteEntityTypeRequest { + /** Properties of a LookupEnvironmentHistoryResponse. */ + interface ILookupEnvironmentHistoryResponse { - /** DeleteEntityTypeRequest name */ - name?: (string|null); + /** LookupEnvironmentHistoryResponse environments */ + environments?: (google.cloud.dialogflow.cx.v3beta1.IEnvironment[]|null); - /** DeleteEntityTypeRequest force */ - force?: (boolean|null); + /** LookupEnvironmentHistoryResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a DeleteEntityTypeRequest. */ - class DeleteEntityTypeRequest implements IDeleteEntityTypeRequest { + /** Represents a LookupEnvironmentHistoryResponse. */ + class LookupEnvironmentHistoryResponse implements ILookupEnvironmentHistoryResponse { /** - * Constructs a new DeleteEntityTypeRequest. + * Constructs a new LookupEnvironmentHistoryResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IDeleteEntityTypeRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ILookupEnvironmentHistoryResponse); - /** DeleteEntityTypeRequest name. */ - public name: string; + /** LookupEnvironmentHistoryResponse environments. */ + public environments: google.cloud.dialogflow.cx.v3beta1.IEnvironment[]; - /** DeleteEntityTypeRequest force. */ - public force: boolean; + /** LookupEnvironmentHistoryResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new DeleteEntityTypeRequest instance using the specified properties. + * Creates a new LookupEnvironmentHistoryResponse instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteEntityTypeRequest instance + * @returns LookupEnvironmentHistoryResponse instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IDeleteEntityTypeRequest): google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ILookupEnvironmentHistoryResponse): google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse; /** - * Encodes the specified DeleteEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest.verify|verify} messages. - * @param message DeleteEntityTypeRequest message or plain object to encode + * Encodes the specified LookupEnvironmentHistoryResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse.verify|verify} messages. + * @param message LookupEnvironmentHistoryResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IDeleteEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.ILookupEnvironmentHistoryResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest.verify|verify} messages. - * @param message DeleteEntityTypeRequest message or plain object to encode + * Encodes the specified LookupEnvironmentHistoryResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse.verify|verify} messages. + * @param message LookupEnvironmentHistoryResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IDeleteEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ILookupEnvironmentHistoryResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteEntityTypeRequest message from the specified reader or buffer. + * Decodes a LookupEnvironmentHistoryResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteEntityTypeRequest + * @returns LookupEnvironmentHistoryResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse; /** - * Decodes a DeleteEntityTypeRequest message from the specified reader or buffer, length delimited. + * Decodes a LookupEnvironmentHistoryResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteEntityTypeRequest + * @returns LookupEnvironmentHistoryResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse; /** - * Verifies a DeleteEntityTypeRequest message. + * Verifies a LookupEnvironmentHistoryResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DeleteEntityTypeRequest message from a plain object. Also converts values to their respective internal types. + * Creates a LookupEnvironmentHistoryResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteEntityTypeRequest + * @returns LookupEnvironmentHistoryResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse; /** - * Creates a plain object from a DeleteEntityTypeRequest message. Also converts values to other types if specified. - * @param message DeleteEntityTypeRequest + * Creates a plain object from a LookupEnvironmentHistoryResponse message. Also converts values to other types if specified. + * @param message LookupEnvironmentHistoryResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteEntityTypeRequest to JSON. + * Converts this LookupEnvironmentHistoryResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Represents an Environments */ - class Environments extends $protobuf.rpc.Service { + /** Represents an Experiments */ + class Experiments extends $protobuf.rpc.Service { /** - * Constructs a new Environments service. + * Constructs a new Experiments service. * @param rpcImpl RPC implementation * @param [requestDelimited=false] Whether requests are length-delimited * @param [responseDelimited=false] Whether responses are length-delimited @@ -24553,1114 +27589,1894 @@ export namespace google { constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); /** - * Creates new Environments service using the specified rpc implementation. + * Creates new Experiments service using the specified rpc implementation. * @param rpcImpl RPC implementation * @param [requestDelimited=false] Whether requests are length-delimited * @param [responseDelimited=false] Whether responses are length-delimited * @returns RPC service. Useful where requests and/or responses are streamed. */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Environments; + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Experiments; /** - * Calls ListEnvironments. - * @param request ListEnvironmentsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListEnvironmentsResponse + * Calls ListExperiments. + * @param request ListExperimentsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListExperimentsResponse */ - public listEnvironments(request: google.cloud.dialogflow.cx.v3beta1.IListEnvironmentsRequest, callback: google.cloud.dialogflow.cx.v3beta1.Environments.ListEnvironmentsCallback): void; + public listExperiments(request: google.cloud.dialogflow.cx.v3beta1.IListExperimentsRequest, callback: google.cloud.dialogflow.cx.v3beta1.Experiments.ListExperimentsCallback): void; /** - * Calls ListEnvironments. - * @param request ListEnvironmentsRequest message or plain object + * Calls ListExperiments. + * @param request ListExperimentsRequest message or plain object * @returns Promise */ - public listEnvironments(request: google.cloud.dialogflow.cx.v3beta1.IListEnvironmentsRequest): Promise; + public listExperiments(request: google.cloud.dialogflow.cx.v3beta1.IListExperimentsRequest): Promise; /** - * Calls GetEnvironment. - * @param request GetEnvironmentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Environment + * Calls GetExperiment. + * @param request GetExperimentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Experiment */ - public getEnvironment(request: google.cloud.dialogflow.cx.v3beta1.IGetEnvironmentRequest, callback: google.cloud.dialogflow.cx.v3beta1.Environments.GetEnvironmentCallback): void; + public getExperiment(request: google.cloud.dialogflow.cx.v3beta1.IGetExperimentRequest, callback: google.cloud.dialogflow.cx.v3beta1.Experiments.GetExperimentCallback): void; /** - * Calls GetEnvironment. - * @param request GetEnvironmentRequest message or plain object + * Calls GetExperiment. + * @param request GetExperimentRequest message or plain object * @returns Promise */ - public getEnvironment(request: google.cloud.dialogflow.cx.v3beta1.IGetEnvironmentRequest): Promise; + public getExperiment(request: google.cloud.dialogflow.cx.v3beta1.IGetExperimentRequest): Promise; /** - * Calls CreateEnvironment. - * @param request CreateEnvironmentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Calls CreateExperiment. + * @param request CreateExperimentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Experiment */ - public createEnvironment(request: google.cloud.dialogflow.cx.v3beta1.ICreateEnvironmentRequest, callback: google.cloud.dialogflow.cx.v3beta1.Environments.CreateEnvironmentCallback): void; + public createExperiment(request: google.cloud.dialogflow.cx.v3beta1.ICreateExperimentRequest, callback: google.cloud.dialogflow.cx.v3beta1.Experiments.CreateExperimentCallback): void; /** - * Calls CreateEnvironment. - * @param request CreateEnvironmentRequest message or plain object + * Calls CreateExperiment. + * @param request CreateExperimentRequest message or plain object * @returns Promise */ - public createEnvironment(request: google.cloud.dialogflow.cx.v3beta1.ICreateEnvironmentRequest): Promise; + public createExperiment(request: google.cloud.dialogflow.cx.v3beta1.ICreateExperimentRequest): Promise; /** - * Calls UpdateEnvironment. - * @param request UpdateEnvironmentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Calls UpdateExperiment. + * @param request UpdateExperimentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Experiment */ - public updateEnvironment(request: google.cloud.dialogflow.cx.v3beta1.IUpdateEnvironmentRequest, callback: google.cloud.dialogflow.cx.v3beta1.Environments.UpdateEnvironmentCallback): void; + public updateExperiment(request: google.cloud.dialogflow.cx.v3beta1.IUpdateExperimentRequest, callback: google.cloud.dialogflow.cx.v3beta1.Experiments.UpdateExperimentCallback): void; /** - * Calls UpdateEnvironment. - * @param request UpdateEnvironmentRequest message or plain object + * Calls UpdateExperiment. + * @param request UpdateExperimentRequest message or plain object * @returns Promise */ - public updateEnvironment(request: google.cloud.dialogflow.cx.v3beta1.IUpdateEnvironmentRequest): Promise; + public updateExperiment(request: google.cloud.dialogflow.cx.v3beta1.IUpdateExperimentRequest): Promise; /** - * Calls DeleteEnvironment. - * @param request DeleteEnvironmentRequest message or plain object + * Calls DeleteExperiment. + * @param request DeleteExperimentRequest message or plain object * @param callback Node-style callback called with the error, if any, and Empty */ - public deleteEnvironment(request: google.cloud.dialogflow.cx.v3beta1.IDeleteEnvironmentRequest, callback: google.cloud.dialogflow.cx.v3beta1.Environments.DeleteEnvironmentCallback): void; + public deleteExperiment(request: google.cloud.dialogflow.cx.v3beta1.IDeleteExperimentRequest, callback: google.cloud.dialogflow.cx.v3beta1.Experiments.DeleteExperimentCallback): void; /** - * Calls DeleteEnvironment. - * @param request DeleteEnvironmentRequest message or plain object + * Calls DeleteExperiment. + * @param request DeleteExperimentRequest message or plain object * @returns Promise */ - public deleteEnvironment(request: google.cloud.dialogflow.cx.v3beta1.IDeleteEnvironmentRequest): Promise; + public deleteExperiment(request: google.cloud.dialogflow.cx.v3beta1.IDeleteExperimentRequest): Promise; /** - * Calls LookupEnvironmentHistory. - * @param request LookupEnvironmentHistoryRequest message or plain object - * @param callback Node-style callback called with the error, if any, and LookupEnvironmentHistoryResponse + * Calls StartExperiment. + * @param request StartExperimentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Experiment */ - public lookupEnvironmentHistory(request: google.cloud.dialogflow.cx.v3beta1.ILookupEnvironmentHistoryRequest, callback: google.cloud.dialogflow.cx.v3beta1.Environments.LookupEnvironmentHistoryCallback): void; + public startExperiment(request: google.cloud.dialogflow.cx.v3beta1.IStartExperimentRequest, callback: google.cloud.dialogflow.cx.v3beta1.Experiments.StartExperimentCallback): void; /** - * Calls LookupEnvironmentHistory. - * @param request LookupEnvironmentHistoryRequest message or plain object + * Calls StartExperiment. + * @param request StartExperimentRequest message or plain object * @returns Promise */ - public lookupEnvironmentHistory(request: google.cloud.dialogflow.cx.v3beta1.ILookupEnvironmentHistoryRequest): Promise; + public startExperiment(request: google.cloud.dialogflow.cx.v3beta1.IStartExperimentRequest): Promise; + + /** + * Calls StopExperiment. + * @param request StopExperimentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Experiment + */ + public stopExperiment(request: google.cloud.dialogflow.cx.v3beta1.IStopExperimentRequest, callback: google.cloud.dialogflow.cx.v3beta1.Experiments.StopExperimentCallback): void; + + /** + * Calls StopExperiment. + * @param request StopExperimentRequest message or plain object + * @returns Promise + */ + public stopExperiment(request: google.cloud.dialogflow.cx.v3beta1.IStopExperimentRequest): Promise; } - namespace Environments { + namespace Experiments { /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Environments#listEnvironments}. + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Experiments#listExperiments}. * @param error Error, if any - * @param [response] ListEnvironmentsResponse + * @param [response] ListExperimentsResponse */ - type ListEnvironmentsCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse) => void; + type ListExperimentsCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Experiments#getExperiment}. + * @param error Error, if any + * @param [response] Experiment + */ + type GetExperimentCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.Experiment) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Experiments#createExperiment}. + * @param error Error, if any + * @param [response] Experiment + */ + type CreateExperimentCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.Experiment) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Experiments#updateExperiment}. + * @param error Error, if any + * @param [response] Experiment + */ + type UpdateExperimentCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.Experiment) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Experiments#deleteExperiment}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteExperimentCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Experiments#startExperiment}. + * @param error Error, if any + * @param [response] Experiment + */ + type StartExperimentCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.Experiment) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Experiments#stopExperiment}. + * @param error Error, if any + * @param [response] Experiment + */ + type StopExperimentCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.Experiment) => void; + } + + /** Properties of an Experiment. */ + interface IExperiment { + + /** Experiment name */ + name?: (string|null); + + /** Experiment displayName */ + displayName?: (string|null); + + /** Experiment description */ + description?: (string|null); + + /** Experiment state */ + state?: (google.cloud.dialogflow.cx.v3beta1.Experiment.State|keyof typeof google.cloud.dialogflow.cx.v3beta1.Experiment.State|null); + + /** Experiment definition */ + definition?: (google.cloud.dialogflow.cx.v3beta1.Experiment.IDefinition|null); + + /** Experiment result */ + result?: (google.cloud.dialogflow.cx.v3beta1.Experiment.IResult|null); + + /** Experiment createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Experiment startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** Experiment endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** Experiment lastUpdateTime */ + lastUpdateTime?: (google.protobuf.ITimestamp|null); + + /** Experiment experimentLength */ + experimentLength?: (google.protobuf.IDuration|null); + + /** Experiment variantsHistory */ + variantsHistory?: (google.cloud.dialogflow.cx.v3beta1.IVariantsHistory[]|null); + } + + /** Represents an Experiment. */ + class Experiment implements IExperiment { + + /** + * Constructs a new Experiment. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IExperiment); + + /** Experiment name. */ + public name: string; + + /** Experiment displayName. */ + public displayName: string; + + /** Experiment description. */ + public description: string; + + /** Experiment state. */ + public state: (google.cloud.dialogflow.cx.v3beta1.Experiment.State|keyof typeof google.cloud.dialogflow.cx.v3beta1.Experiment.State); + + /** Experiment definition. */ + public definition?: (google.cloud.dialogflow.cx.v3beta1.Experiment.IDefinition|null); + + /** Experiment result. */ + public result?: (google.cloud.dialogflow.cx.v3beta1.Experiment.IResult|null); + + /** Experiment createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Experiment startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** Experiment endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** Experiment lastUpdateTime. */ + public lastUpdateTime?: (google.protobuf.ITimestamp|null); + + /** Experiment experimentLength. */ + public experimentLength?: (google.protobuf.IDuration|null); + + /** Experiment variantsHistory. */ + public variantsHistory: google.cloud.dialogflow.cx.v3beta1.IVariantsHistory[]; + + /** + * Creates a new Experiment instance using the specified properties. + * @param [properties] Properties to set + * @returns Experiment instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IExperiment): google.cloud.dialogflow.cx.v3beta1.Experiment; + + /** + * Encodes the specified Experiment message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Experiment.verify|verify} messages. + * @param message Experiment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IExperiment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Experiment message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Experiment.verify|verify} messages. + * @param message Experiment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IExperiment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Experiment message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Experiment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.Experiment; + + /** + * Decodes an Experiment message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Experiment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.Experiment; + + /** + * Verifies an Experiment message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Experiment message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Experiment + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.Experiment; + + /** + * Creates a plain object from an Experiment message. Also converts values to other types if specified. + * @param message Experiment + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.Experiment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Experiment to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Experiment { + + /** Properties of a Definition. */ + interface IDefinition { + + /** Definition condition */ + condition?: (string|null); + + /** Definition versionVariants */ + versionVariants?: (google.cloud.dialogflow.cx.v3beta1.IVersionVariants|null); + } + + /** Represents a Definition. */ + class Definition implements IDefinition { + + /** + * Constructs a new Definition. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.Experiment.IDefinition); + + /** Definition condition. */ + public condition: string; + + /** Definition versionVariants. */ + public versionVariants?: (google.cloud.dialogflow.cx.v3beta1.IVersionVariants|null); + + /** Definition variants. */ + public variants?: "versionVariants"; + + /** + * Creates a new Definition instance using the specified properties. + * @param [properties] Properties to set + * @returns Definition instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.Experiment.IDefinition): google.cloud.dialogflow.cx.v3beta1.Experiment.Definition; + + /** + * Encodes the specified Definition message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Experiment.Definition.verify|verify} messages. + * @param message Definition message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.Experiment.IDefinition, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Definition message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Experiment.Definition.verify|verify} messages. + * @param message Definition message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.Experiment.IDefinition, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Definition message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Definition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.Experiment.Definition; + + /** + * Decodes a Definition message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Definition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.Experiment.Definition; + + /** + * Verifies a Definition message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Definition message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Definition + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.Experiment.Definition; + + /** + * Creates a plain object from a Definition message. Also converts values to other types if specified. + * @param message Definition + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.Experiment.Definition, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Definition to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Result. */ + interface IResult { + + /** Result versionMetrics */ + versionMetrics?: (google.cloud.dialogflow.cx.v3beta1.Experiment.Result.IVersionMetrics[]|null); + + /** Result lastUpdateTime */ + lastUpdateTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a Result. */ + class Result implements IResult { + + /** + * Constructs a new Result. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.Experiment.IResult); + + /** Result versionMetrics. */ + public versionMetrics: google.cloud.dialogflow.cx.v3beta1.Experiment.Result.IVersionMetrics[]; + + /** Result lastUpdateTime. */ + public lastUpdateTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new Result instance using the specified properties. + * @param [properties] Properties to set + * @returns Result instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.Experiment.IResult): google.cloud.dialogflow.cx.v3beta1.Experiment.Result; + + /** + * Encodes the specified Result message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Experiment.Result.verify|verify} messages. + * @param message Result message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.Experiment.IResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Result message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Experiment.Result.verify|verify} messages. + * @param message Result message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.Experiment.IResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Result message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Result + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.Experiment.Result; + + /** + * Decodes a Result message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Result + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.Experiment.Result; + + /** + * Verifies a Result message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Result message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Result + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.Experiment.Result; + + /** + * Creates a plain object from a Result message. Also converts values to other types if specified. + * @param message Result + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.Experiment.Result, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Result to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Result { + + /** Properties of a ConfidenceInterval. */ + interface IConfidenceInterval { + + /** ConfidenceInterval confidenceLevel */ + confidenceLevel?: (number|null); + + /** ConfidenceInterval ratio */ + ratio?: (number|null); + + /** ConfidenceInterval lowerBound */ + lowerBound?: (number|null); + + /** ConfidenceInterval upperBound */ + upperBound?: (number|null); + } + + /** Represents a ConfidenceInterval. */ + class ConfidenceInterval implements IConfidenceInterval { + + /** + * Constructs a new ConfidenceInterval. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.Experiment.Result.IConfidenceInterval); + + /** ConfidenceInterval confidenceLevel. */ + public confidenceLevel: number; + + /** ConfidenceInterval ratio. */ + public ratio: number; + + /** ConfidenceInterval lowerBound. */ + public lowerBound: number; + + /** ConfidenceInterval upperBound. */ + public upperBound: number; + + /** + * Creates a new ConfidenceInterval instance using the specified properties. + * @param [properties] Properties to set + * @returns ConfidenceInterval instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.Experiment.Result.IConfidenceInterval): google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval; + + /** + * Encodes the specified ConfidenceInterval message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval.verify|verify} messages. + * @param message ConfidenceInterval message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.Experiment.Result.IConfidenceInterval, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConfidenceInterval message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval.verify|verify} messages. + * @param message ConfidenceInterval message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.Experiment.Result.IConfidenceInterval, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConfidenceInterval message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConfidenceInterval + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval; + + /** + * Decodes a ConfidenceInterval message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConfidenceInterval + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval; + + /** + * Verifies a ConfidenceInterval message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ConfidenceInterval message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConfidenceInterval + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval; + + /** + * Creates a plain object from a ConfidenceInterval message. Also converts values to other types if specified. + * @param message ConfidenceInterval + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConfidenceInterval to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Metric. */ + interface IMetric { + + /** Metric type */ + type?: (google.cloud.dialogflow.cx.v3beta1.Experiment.Result.MetricType|keyof typeof google.cloud.dialogflow.cx.v3beta1.Experiment.Result.MetricType|null); + + /** Metric ratio */ + ratio?: (number|null); + + /** Metric confidenceInterval */ + confidenceInterval?: (google.cloud.dialogflow.cx.v3beta1.Experiment.Result.IConfidenceInterval|null); + } + + /** Represents a Metric. */ + class Metric implements IMetric { + + /** + * Constructs a new Metric. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.Experiment.Result.IMetric); + + /** Metric type. */ + public type: (google.cloud.dialogflow.cx.v3beta1.Experiment.Result.MetricType|keyof typeof google.cloud.dialogflow.cx.v3beta1.Experiment.Result.MetricType); + + /** Metric ratio. */ + public ratio: number; + + /** Metric confidenceInterval. */ + public confidenceInterval?: (google.cloud.dialogflow.cx.v3beta1.Experiment.Result.IConfidenceInterval|null); + + /** Metric value. */ + public value?: "ratio"; + + /** + * Creates a new Metric instance using the specified properties. + * @param [properties] Properties to set + * @returns Metric instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.Experiment.Result.IMetric): google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric; + + /** + * Encodes the specified Metric message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric.verify|verify} messages. + * @param message Metric message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.Experiment.Result.IMetric, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Metric message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric.verify|verify} messages. + * @param message Metric message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.Experiment.Result.IMetric, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Metric message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Metric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric; + + /** + * Decodes a Metric message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Metric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric; + + /** + * Verifies a Metric message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Metric message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Metric + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric; + + /** + * Creates a plain object from a Metric message. Also converts values to other types if specified. + * @param message Metric + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Metric to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a VersionMetrics. */ + interface IVersionMetrics { + + /** VersionMetrics version */ + version?: (string|null); + + /** VersionMetrics metrics */ + metrics?: (google.cloud.dialogflow.cx.v3beta1.Experiment.Result.IMetric[]|null); + + /** VersionMetrics sessionCount */ + sessionCount?: (number|null); + } + + /** Represents a VersionMetrics. */ + class VersionMetrics implements IVersionMetrics { + + /** + * Constructs a new VersionMetrics. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.Experiment.Result.IVersionMetrics); + + /** VersionMetrics version. */ + public version: string; + + /** VersionMetrics metrics. */ + public metrics: google.cloud.dialogflow.cx.v3beta1.Experiment.Result.IMetric[]; + + /** VersionMetrics sessionCount. */ + public sessionCount: number; + + /** + * Creates a new VersionMetrics instance using the specified properties. + * @param [properties] Properties to set + * @returns VersionMetrics instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.Experiment.Result.IVersionMetrics): google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics; + + /** + * Encodes the specified VersionMetrics message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics.verify|verify} messages. + * @param message VersionMetrics message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.Experiment.Result.IVersionMetrics, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Environments#getEnvironment}. - * @param error Error, if any - * @param [response] Environment - */ - type GetEnvironmentCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.Environment) => void; + /** + * Encodes the specified VersionMetrics message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics.verify|verify} messages. + * @param message VersionMetrics message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.Experiment.Result.IVersionMetrics, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Environments#createEnvironment}. - * @param error Error, if any - * @param [response] Operation - */ - type CreateEnvironmentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + /** + * Decodes a VersionMetrics message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VersionMetrics + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics; - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Environments#updateEnvironment}. - * @param error Error, if any - * @param [response] Operation - */ - type UpdateEnvironmentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + /** + * Decodes a VersionMetrics message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VersionMetrics + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics; - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Environments#deleteEnvironment}. - * @param error Error, if any - * @param [response] Empty - */ - type DeleteEnvironmentCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + /** + * Verifies a VersionMetrics message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Environments#lookupEnvironmentHistory}. - * @param error Error, if any - * @param [response] LookupEnvironmentHistoryResponse - */ - type LookupEnvironmentHistoryCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse) => void; - } + /** + * Creates a VersionMetrics message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VersionMetrics + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics; - /** Properties of an Environment. */ - interface IEnvironment { + /** + * Creates a plain object from a VersionMetrics message. Also converts values to other types if specified. + * @param message VersionMetrics + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Environment name */ - name?: (string|null); + /** + * Converts this VersionMetrics to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Environment displayName */ - displayName?: (string|null); + /** MetricType enum. */ + enum MetricType { + METRIC_UNSPECIFIED = 0, + CONTAINED_SESSION_NO_CALLBACK_RATE = 1, + LIVE_AGENT_HANDOFF_RATE = 2, + CALLBACK_SESSION_RATE = 3, + ABANDONED_SESSION_RATE = 4, + SESSION_END_RATE = 5 + } + } - /** Environment description */ - description?: (string|null); + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + DRAFT = 1, + RUNNING = 2, + DONE = 3 + } + } - /** Environment versionConfigs */ - versionConfigs?: (google.cloud.dialogflow.cx.v3beta1.Environment.IVersionConfig[]|null); + /** Properties of a VersionVariants. */ + interface IVersionVariants { - /** Environment updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); + /** VersionVariants variants */ + variants?: (google.cloud.dialogflow.cx.v3beta1.VersionVariants.IVariant[]|null); } - /** Represents an Environment. */ - class Environment implements IEnvironment { + /** Represents a VersionVariants. */ + class VersionVariants implements IVersionVariants { /** - * Constructs a new Environment. + * Constructs a new VersionVariants. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IEnvironment); - - /** Environment name. */ - public name: string; - - /** Environment displayName. */ - public displayName: string; - - /** Environment description. */ - public description: string; + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IVersionVariants); - /** Environment versionConfigs. */ - public versionConfigs: google.cloud.dialogflow.cx.v3beta1.Environment.IVersionConfig[]; - - /** Environment updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + /** VersionVariants variants. */ + public variants: google.cloud.dialogflow.cx.v3beta1.VersionVariants.IVariant[]; /** - * Creates a new Environment instance using the specified properties. + * Creates a new VersionVariants instance using the specified properties. * @param [properties] Properties to set - * @returns Environment instance + * @returns VersionVariants instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IEnvironment): google.cloud.dialogflow.cx.v3beta1.Environment; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IVersionVariants): google.cloud.dialogflow.cx.v3beta1.VersionVariants; /** - * Encodes the specified Environment message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Environment.verify|verify} messages. - * @param message Environment message or plain object to encode + * Encodes the specified VersionVariants message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.VersionVariants.verify|verify} messages. + * @param message VersionVariants message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IEnvironment, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IVersionVariants, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Environment message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Environment.verify|verify} messages. - * @param message Environment message or plain object to encode + * Encodes the specified VersionVariants message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.VersionVariants.verify|verify} messages. + * @param message VersionVariants message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IEnvironment, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IVersionVariants, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Environment message from the specified reader or buffer. + * Decodes a VersionVariants message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Environment + * @returns VersionVariants * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.Environment; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.VersionVariants; /** - * Decodes an Environment message from the specified reader or buffer, length delimited. + * Decodes a VersionVariants message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Environment + * @returns VersionVariants * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.Environment; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.VersionVariants; /** - * Verifies an Environment message. + * Verifies a VersionVariants message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an Environment message from a plain object. Also converts values to their respective internal types. + * Creates a VersionVariants message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Environment + * @returns VersionVariants */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.Environment; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.VersionVariants; /** - * Creates a plain object from an Environment message. Also converts values to other types if specified. - * @param message Environment + * Creates a plain object from a VersionVariants message. Also converts values to other types if specified. + * @param message VersionVariants * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.Environment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.VersionVariants, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Environment to JSON. + * Converts this VersionVariants to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace Environment { + namespace VersionVariants { - /** Properties of a VersionConfig. */ - interface IVersionConfig { + /** Properties of a Variant. */ + interface IVariant { - /** VersionConfig version */ + /** Variant version */ version?: (string|null); + + /** Variant trafficAllocation */ + trafficAllocation?: (number|null); + + /** Variant isControlGroup */ + isControlGroup?: (boolean|null); } - /** Represents a VersionConfig. */ - class VersionConfig implements IVersionConfig { + /** Represents a Variant. */ + class Variant implements IVariant { /** - * Constructs a new VersionConfig. + * Constructs a new Variant. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.Environment.IVersionConfig); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.VersionVariants.IVariant); - /** VersionConfig version. */ + /** Variant version. */ public version: string; + /** Variant trafficAllocation. */ + public trafficAllocation: number; + + /** Variant isControlGroup. */ + public isControlGroup: boolean; + /** - * Creates a new VersionConfig instance using the specified properties. + * Creates a new Variant instance using the specified properties. * @param [properties] Properties to set - * @returns VersionConfig instance + * @returns Variant instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.Environment.IVersionConfig): google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.VersionVariants.IVariant): google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant; /** - * Encodes the specified VersionConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig.verify|verify} messages. - * @param message VersionConfig message or plain object to encode + * Encodes the specified Variant message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant.verify|verify} messages. + * @param message Variant message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.Environment.IVersionConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.VersionVariants.IVariant, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified VersionConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig.verify|verify} messages. - * @param message VersionConfig message or plain object to encode + * Encodes the specified Variant message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant.verify|verify} messages. + * @param message Variant message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.Environment.IVersionConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.VersionVariants.IVariant, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a VersionConfig message from the specified reader or buffer. + * Decodes a Variant message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns VersionConfig + * @returns Variant * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant; /** - * Decodes a VersionConfig message from the specified reader or buffer, length delimited. + * Decodes a Variant message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns VersionConfig + * @returns Variant * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant; /** - * Verifies a VersionConfig message. + * Verifies a Variant message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a VersionConfig message from a plain object. Also converts values to their respective internal types. + * Creates a Variant message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns VersionConfig + * @returns Variant */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant; /** - * Creates a plain object from a VersionConfig message. Also converts values to other types if specified. - * @param message VersionConfig + * Creates a plain object from a Variant message. Also converts values to other types if specified. + * @param message Variant * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this VersionConfig to JSON. + * Converts this Variant to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } } - /** Properties of a ListEnvironmentsRequest. */ - interface IListEnvironmentsRequest { + /** Properties of a VariantsHistory. */ + interface IVariantsHistory { - /** ListEnvironmentsRequest parent */ + /** VariantsHistory versionVariants */ + versionVariants?: (google.cloud.dialogflow.cx.v3beta1.IVersionVariants|null); + + /** VariantsHistory updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a VariantsHistory. */ + class VariantsHistory implements IVariantsHistory { + + /** + * Constructs a new VariantsHistory. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IVariantsHistory); + + /** VariantsHistory versionVariants. */ + public versionVariants?: (google.cloud.dialogflow.cx.v3beta1.IVersionVariants|null); + + /** VariantsHistory updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** VariantsHistory variants. */ + public variants?: "versionVariants"; + + /** + * Creates a new VariantsHistory instance using the specified properties. + * @param [properties] Properties to set + * @returns VariantsHistory instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IVariantsHistory): google.cloud.dialogflow.cx.v3beta1.VariantsHistory; + + /** + * Encodes the specified VariantsHistory message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.VariantsHistory.verify|verify} messages. + * @param message VariantsHistory message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IVariantsHistory, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VariantsHistory message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.VariantsHistory.verify|verify} messages. + * @param message VariantsHistory message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IVariantsHistory, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VariantsHistory message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VariantsHistory + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.VariantsHistory; + + /** + * Decodes a VariantsHistory message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VariantsHistory + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.VariantsHistory; + + /** + * Verifies a VariantsHistory message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a VariantsHistory message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VariantsHistory + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.VariantsHistory; + + /** + * Creates a plain object from a VariantsHistory message. Also converts values to other types if specified. + * @param message VariantsHistory + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.VariantsHistory, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VariantsHistory to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListExperimentsRequest. */ + interface IListExperimentsRequest { + + /** ListExperimentsRequest parent */ parent?: (string|null); - /** ListEnvironmentsRequest pageSize */ + /** ListExperimentsRequest pageSize */ pageSize?: (number|null); - /** ListEnvironmentsRequest pageToken */ + /** ListExperimentsRequest pageToken */ pageToken?: (string|null); } - /** Represents a ListEnvironmentsRequest. */ - class ListEnvironmentsRequest implements IListEnvironmentsRequest { + /** Represents a ListExperimentsRequest. */ + class ListExperimentsRequest implements IListExperimentsRequest { /** - * Constructs a new ListEnvironmentsRequest. + * Constructs a new ListExperimentsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IListEnvironmentsRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IListExperimentsRequest); - /** ListEnvironmentsRequest parent. */ + /** ListExperimentsRequest parent. */ public parent: string; - /** ListEnvironmentsRequest pageSize. */ + /** ListExperimentsRequest pageSize. */ public pageSize: number; - /** ListEnvironmentsRequest pageToken. */ + /** ListExperimentsRequest pageToken. */ public pageToken: string; /** - * Creates a new ListEnvironmentsRequest instance using the specified properties. + * Creates a new ListExperimentsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListEnvironmentsRequest instance + * @returns ListExperimentsRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IListEnvironmentsRequest): google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IListExperimentsRequest): google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest; /** - * Encodes the specified ListEnvironmentsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest.verify|verify} messages. - * @param message ListEnvironmentsRequest message or plain object to encode + * Encodes the specified ListExperimentsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest.verify|verify} messages. + * @param message ListExperimentsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IListEnvironmentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IListExperimentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListEnvironmentsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest.verify|verify} messages. - * @param message ListEnvironmentsRequest message or plain object to encode + * Encodes the specified ListExperimentsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest.verify|verify} messages. + * @param message ListExperimentsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IListEnvironmentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IListExperimentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListEnvironmentsRequest message from the specified reader or buffer. + * Decodes a ListExperimentsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListEnvironmentsRequest + * @returns ListExperimentsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest; /** - * Decodes a ListEnvironmentsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListExperimentsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListEnvironmentsRequest + * @returns ListExperimentsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest; /** - * Verifies a ListEnvironmentsRequest message. + * Verifies a ListExperimentsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListEnvironmentsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListExperimentsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListEnvironmentsRequest + * @returns ListExperimentsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest; /** - * Creates a plain object from a ListEnvironmentsRequest message. Also converts values to other types if specified. - * @param message ListEnvironmentsRequest + * Creates a plain object from a ListExperimentsRequest message. Also converts values to other types if specified. + * @param message ListExperimentsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListEnvironmentsRequest to JSON. + * Converts this ListExperimentsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListEnvironmentsResponse. */ - interface IListEnvironmentsResponse { + /** Properties of a ListExperimentsResponse. */ + interface IListExperimentsResponse { - /** ListEnvironmentsResponse environments */ - environments?: (google.cloud.dialogflow.cx.v3beta1.IEnvironment[]|null); + /** ListExperimentsResponse experiments */ + experiments?: (google.cloud.dialogflow.cx.v3beta1.IExperiment[]|null); - /** ListEnvironmentsResponse nextPageToken */ + /** ListExperimentsResponse nextPageToken */ nextPageToken?: (string|null); } - /** Represents a ListEnvironmentsResponse. */ - class ListEnvironmentsResponse implements IListEnvironmentsResponse { + /** Represents a ListExperimentsResponse. */ + class ListExperimentsResponse implements IListExperimentsResponse { /** - * Constructs a new ListEnvironmentsResponse. + * Constructs a new ListExperimentsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IListEnvironmentsResponse); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IListExperimentsResponse); - /** ListEnvironmentsResponse environments. */ - public environments: google.cloud.dialogflow.cx.v3beta1.IEnvironment[]; + /** ListExperimentsResponse experiments. */ + public experiments: google.cloud.dialogflow.cx.v3beta1.IExperiment[]; - /** ListEnvironmentsResponse nextPageToken. */ + /** ListExperimentsResponse nextPageToken. */ public nextPageToken: string; /** - * Creates a new ListEnvironmentsResponse instance using the specified properties. + * Creates a new ListExperimentsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ListEnvironmentsResponse instance + * @returns ListExperimentsResponse instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IListEnvironmentsResponse): google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IListExperimentsResponse): google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse; /** - * Encodes the specified ListEnvironmentsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse.verify|verify} messages. - * @param message ListEnvironmentsResponse message or plain object to encode + * Encodes the specified ListExperimentsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse.verify|verify} messages. + * @param message ListExperimentsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IListEnvironmentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IListExperimentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListEnvironmentsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse.verify|verify} messages. - * @param message ListEnvironmentsResponse message or plain object to encode + * Encodes the specified ListExperimentsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse.verify|verify} messages. + * @param message ListExperimentsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IListEnvironmentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IListExperimentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListEnvironmentsResponse message from the specified reader or buffer. + * Decodes a ListExperimentsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListEnvironmentsResponse + * @returns ListExperimentsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse; /** - * Decodes a ListEnvironmentsResponse message from the specified reader or buffer, length delimited. + * Decodes a ListExperimentsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListEnvironmentsResponse + * @returns ListExperimentsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse; /** - * Verifies a ListEnvironmentsResponse message. + * Verifies a ListExperimentsResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListEnvironmentsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListExperimentsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListEnvironmentsResponse + * @returns ListExperimentsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse; /** - * Creates a plain object from a ListEnvironmentsResponse message. Also converts values to other types if specified. - * @param message ListEnvironmentsResponse + * Creates a plain object from a ListExperimentsResponse message. Also converts values to other types if specified. + * @param message ListExperimentsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListEnvironmentsResponse to JSON. + * Converts this ListExperimentsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetEnvironmentRequest. */ - interface IGetEnvironmentRequest { + /** Properties of a GetExperimentRequest. */ + interface IGetExperimentRequest { - /** GetEnvironmentRequest name */ + /** GetExperimentRequest name */ name?: (string|null); } - /** Represents a GetEnvironmentRequest. */ - class GetEnvironmentRequest implements IGetEnvironmentRequest { + /** Represents a GetExperimentRequest. */ + class GetExperimentRequest implements IGetExperimentRequest { /** - * Constructs a new GetEnvironmentRequest. + * Constructs a new GetExperimentRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IGetEnvironmentRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IGetExperimentRequest); - /** GetEnvironmentRequest name. */ + /** GetExperimentRequest name. */ public name: string; /** - * Creates a new GetEnvironmentRequest instance using the specified properties. + * Creates a new GetExperimentRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetEnvironmentRequest instance + * @returns GetExperimentRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IGetEnvironmentRequest): google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IGetExperimentRequest): google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest; /** - * Encodes the specified GetEnvironmentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest.verify|verify} messages. - * @param message GetEnvironmentRequest message or plain object to encode + * Encodes the specified GetExperimentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest.verify|verify} messages. + * @param message GetExperimentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IGetEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IGetExperimentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest.verify|verify} messages. - * @param message GetEnvironmentRequest message or plain object to encode + * Encodes the specified GetExperimentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest.verify|verify} messages. + * @param message GetExperimentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IGetEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IGetExperimentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetEnvironmentRequest message from the specified reader or buffer. + * Decodes a GetExperimentRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetEnvironmentRequest + * @returns GetExperimentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest; /** - * Decodes a GetEnvironmentRequest message from the specified reader or buffer, length delimited. + * Decodes a GetExperimentRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetEnvironmentRequest + * @returns GetExperimentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest; /** - * Verifies a GetEnvironmentRequest message. + * Verifies a GetExperimentRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetExperimentRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetEnvironmentRequest + * @returns GetExperimentRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest; /** - * Creates a plain object from a GetEnvironmentRequest message. Also converts values to other types if specified. - * @param message GetEnvironmentRequest + * Creates a plain object from a GetExperimentRequest message. Also converts values to other types if specified. + * @param message GetExperimentRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetEnvironmentRequest to JSON. + * Converts this GetExperimentRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CreateEnvironmentRequest. */ - interface ICreateEnvironmentRequest { + /** Properties of a CreateExperimentRequest. */ + interface ICreateExperimentRequest { - /** CreateEnvironmentRequest parent */ + /** CreateExperimentRequest parent */ parent?: (string|null); - /** CreateEnvironmentRequest environment */ - environment?: (google.cloud.dialogflow.cx.v3beta1.IEnvironment|null); + /** CreateExperimentRequest experiment */ + experiment?: (google.cloud.dialogflow.cx.v3beta1.IExperiment|null); } - /** Represents a CreateEnvironmentRequest. */ - class CreateEnvironmentRequest implements ICreateEnvironmentRequest { + /** Represents a CreateExperimentRequest. */ + class CreateExperimentRequest implements ICreateExperimentRequest { /** - * Constructs a new CreateEnvironmentRequest. + * Constructs a new CreateExperimentRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ICreateEnvironmentRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ICreateExperimentRequest); - /** CreateEnvironmentRequest parent. */ + /** CreateExperimentRequest parent. */ public parent: string; - /** CreateEnvironmentRequest environment. */ - public environment?: (google.cloud.dialogflow.cx.v3beta1.IEnvironment|null); + /** CreateExperimentRequest experiment. */ + public experiment?: (google.cloud.dialogflow.cx.v3beta1.IExperiment|null); /** - * Creates a new CreateEnvironmentRequest instance using the specified properties. + * Creates a new CreateExperimentRequest instance using the specified properties. * @param [properties] Properties to set - * @returns CreateEnvironmentRequest instance + * @returns CreateExperimentRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ICreateEnvironmentRequest): google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ICreateExperimentRequest): google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest; /** - * Encodes the specified CreateEnvironmentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest.verify|verify} messages. - * @param message CreateEnvironmentRequest message or plain object to encode + * Encodes the specified CreateExperimentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest.verify|verify} messages. + * @param message CreateExperimentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.ICreateEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.ICreateExperimentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest.verify|verify} messages. - * @param message CreateEnvironmentRequest message or plain object to encode + * Encodes the specified CreateExperimentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest.verify|verify} messages. + * @param message CreateExperimentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ICreateEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ICreateExperimentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateEnvironmentRequest message from the specified reader or buffer. + * Decodes a CreateExperimentRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateEnvironmentRequest + * @returns CreateExperimentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest; /** - * Decodes a CreateEnvironmentRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateExperimentRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateEnvironmentRequest + * @returns CreateExperimentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest; /** - * Verifies a CreateEnvironmentRequest message. + * Verifies a CreateExperimentRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CreateEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateExperimentRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateEnvironmentRequest + * @returns CreateExperimentRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest; /** - * Creates a plain object from a CreateEnvironmentRequest message. Also converts values to other types if specified. - * @param message CreateEnvironmentRequest + * Creates a plain object from a CreateExperimentRequest message. Also converts values to other types if specified. + * @param message CreateExperimentRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateEnvironmentRequest to JSON. + * Converts this CreateExperimentRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an UpdateEnvironmentRequest. */ - interface IUpdateEnvironmentRequest { + /** Properties of an UpdateExperimentRequest. */ + interface IUpdateExperimentRequest { - /** UpdateEnvironmentRequest environment */ - environment?: (google.cloud.dialogflow.cx.v3beta1.IEnvironment|null); + /** UpdateExperimentRequest experiment */ + experiment?: (google.cloud.dialogflow.cx.v3beta1.IExperiment|null); - /** UpdateEnvironmentRequest updateMask */ + /** UpdateExperimentRequest updateMask */ updateMask?: (google.protobuf.IFieldMask|null); } - /** Represents an UpdateEnvironmentRequest. */ - class UpdateEnvironmentRequest implements IUpdateEnvironmentRequest { + /** Represents an UpdateExperimentRequest. */ + class UpdateExperimentRequest implements IUpdateExperimentRequest { /** - * Constructs a new UpdateEnvironmentRequest. + * Constructs a new UpdateExperimentRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IUpdateEnvironmentRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IUpdateExperimentRequest); - /** UpdateEnvironmentRequest environment. */ - public environment?: (google.cloud.dialogflow.cx.v3beta1.IEnvironment|null); + /** UpdateExperimentRequest experiment. */ + public experiment?: (google.cloud.dialogflow.cx.v3beta1.IExperiment|null); - /** UpdateEnvironmentRequest updateMask. */ + /** UpdateExperimentRequest updateMask. */ public updateMask?: (google.protobuf.IFieldMask|null); /** - * Creates a new UpdateEnvironmentRequest instance using the specified properties. + * Creates a new UpdateExperimentRequest instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateEnvironmentRequest instance + * @returns UpdateExperimentRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IUpdateEnvironmentRequest): google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IUpdateExperimentRequest): google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest; /** - * Encodes the specified UpdateEnvironmentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest.verify|verify} messages. - * @param message UpdateEnvironmentRequest message or plain object to encode + * Encodes the specified UpdateExperimentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest.verify|verify} messages. + * @param message UpdateExperimentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IUpdateEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IUpdateExperimentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest.verify|verify} messages. - * @param message UpdateEnvironmentRequest message or plain object to encode + * Encodes the specified UpdateExperimentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest.verify|verify} messages. + * @param message UpdateExperimentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IUpdateEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IUpdateExperimentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateEnvironmentRequest message from the specified reader or buffer. + * Decodes an UpdateExperimentRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateEnvironmentRequest + * @returns UpdateExperimentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest; /** - * Decodes an UpdateEnvironmentRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateExperimentRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateEnvironmentRequest + * @returns UpdateExperimentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest; /** - * Verifies an UpdateEnvironmentRequest message. + * Verifies an UpdateExperimentRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an UpdateEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateExperimentRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateEnvironmentRequest + * @returns UpdateExperimentRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest; /** - * Creates a plain object from an UpdateEnvironmentRequest message. Also converts values to other types if specified. - * @param message UpdateEnvironmentRequest + * Creates a plain object from an UpdateExperimentRequest message. Also converts values to other types if specified. + * @param message UpdateExperimentRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateEnvironmentRequest to JSON. + * Converts this UpdateExperimentRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DeleteEnvironmentRequest. */ - interface IDeleteEnvironmentRequest { + /** Properties of a DeleteExperimentRequest. */ + interface IDeleteExperimentRequest { - /** DeleteEnvironmentRequest name */ + /** DeleteExperimentRequest name */ name?: (string|null); } - /** Represents a DeleteEnvironmentRequest. */ - class DeleteEnvironmentRequest implements IDeleteEnvironmentRequest { + /** Represents a DeleteExperimentRequest. */ + class DeleteExperimentRequest implements IDeleteExperimentRequest { /** - * Constructs a new DeleteEnvironmentRequest. + * Constructs a new DeleteExperimentRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IDeleteEnvironmentRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IDeleteExperimentRequest); - /** DeleteEnvironmentRequest name. */ + /** DeleteExperimentRequest name. */ public name: string; /** - * Creates a new DeleteEnvironmentRequest instance using the specified properties. + * Creates a new DeleteExperimentRequest instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteEnvironmentRequest instance + * @returns DeleteExperimentRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IDeleteEnvironmentRequest): google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IDeleteExperimentRequest): google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest; /** - * Encodes the specified DeleteEnvironmentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest.verify|verify} messages. - * @param message DeleteEnvironmentRequest message or plain object to encode + * Encodes the specified DeleteExperimentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest.verify|verify} messages. + * @param message DeleteExperimentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IDeleteEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IDeleteExperimentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest.verify|verify} messages. - * @param message DeleteEnvironmentRequest message or plain object to encode + * Encodes the specified DeleteExperimentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest.verify|verify} messages. + * @param message DeleteExperimentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IDeleteEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IDeleteExperimentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteEnvironmentRequest message from the specified reader or buffer. + * Decodes a DeleteExperimentRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteEnvironmentRequest + * @returns DeleteExperimentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest; /** - * Decodes a DeleteEnvironmentRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteExperimentRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteEnvironmentRequest + * @returns DeleteExperimentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest; /** - * Verifies a DeleteEnvironmentRequest message. + * Verifies a DeleteExperimentRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DeleteEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteExperimentRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteEnvironmentRequest + * @returns DeleteExperimentRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest; /** - * Creates a plain object from a DeleteEnvironmentRequest message. Also converts values to other types if specified. - * @param message DeleteEnvironmentRequest + * Creates a plain object from a DeleteExperimentRequest message. Also converts values to other types if specified. + * @param message DeleteExperimentRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteEnvironmentRequest to JSON. + * Converts this DeleteExperimentRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a LookupEnvironmentHistoryRequest. */ - interface ILookupEnvironmentHistoryRequest { + /** Properties of a StartExperimentRequest. */ + interface IStartExperimentRequest { - /** LookupEnvironmentHistoryRequest name */ + /** StartExperimentRequest name */ name?: (string|null); - - /** LookupEnvironmentHistoryRequest pageSize */ - pageSize?: (number|null); - - /** LookupEnvironmentHistoryRequest pageToken */ - pageToken?: (string|null); } - /** Represents a LookupEnvironmentHistoryRequest. */ - class LookupEnvironmentHistoryRequest implements ILookupEnvironmentHistoryRequest { + /** Represents a StartExperimentRequest. */ + class StartExperimentRequest implements IStartExperimentRequest { /** - * Constructs a new LookupEnvironmentHistoryRequest. + * Constructs a new StartExperimentRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ILookupEnvironmentHistoryRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IStartExperimentRequest); - /** LookupEnvironmentHistoryRequest name. */ + /** StartExperimentRequest name. */ public name: string; - /** LookupEnvironmentHistoryRequest pageSize. */ - public pageSize: number; - - /** LookupEnvironmentHistoryRequest pageToken. */ - public pageToken: string; - /** - * Creates a new LookupEnvironmentHistoryRequest instance using the specified properties. + * Creates a new StartExperimentRequest instance using the specified properties. * @param [properties] Properties to set - * @returns LookupEnvironmentHistoryRequest instance + * @returns StartExperimentRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ILookupEnvironmentHistoryRequest): google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IStartExperimentRequest): google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest; /** - * Encodes the specified LookupEnvironmentHistoryRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest.verify|verify} messages. - * @param message LookupEnvironmentHistoryRequest message or plain object to encode + * Encodes the specified StartExperimentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest.verify|verify} messages. + * @param message StartExperimentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.ILookupEnvironmentHistoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IStartExperimentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified LookupEnvironmentHistoryRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest.verify|verify} messages. - * @param message LookupEnvironmentHistoryRequest message or plain object to encode + * Encodes the specified StartExperimentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest.verify|verify} messages. + * @param message StartExperimentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ILookupEnvironmentHistoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IStartExperimentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a LookupEnvironmentHistoryRequest message from the specified reader or buffer. + * Decodes a StartExperimentRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns LookupEnvironmentHistoryRequest + * @returns StartExperimentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest; /** - * Decodes a LookupEnvironmentHistoryRequest message from the specified reader or buffer, length delimited. + * Decodes a StartExperimentRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns LookupEnvironmentHistoryRequest + * @returns StartExperimentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest; /** - * Verifies a LookupEnvironmentHistoryRequest message. + * Verifies a StartExperimentRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a LookupEnvironmentHistoryRequest message from a plain object. Also converts values to their respective internal types. + * Creates a StartExperimentRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns LookupEnvironmentHistoryRequest + * @returns StartExperimentRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest; /** - * Creates a plain object from a LookupEnvironmentHistoryRequest message. Also converts values to other types if specified. - * @param message LookupEnvironmentHistoryRequest + * Creates a plain object from a StartExperimentRequest message. Also converts values to other types if specified. + * @param message StartExperimentRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this LookupEnvironmentHistoryRequest to JSON. + * Converts this StartExperimentRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a LookupEnvironmentHistoryResponse. */ - interface ILookupEnvironmentHistoryResponse { - - /** LookupEnvironmentHistoryResponse environments */ - environments?: (google.cloud.dialogflow.cx.v3beta1.IEnvironment[]|null); + /** Properties of a StopExperimentRequest. */ + interface IStopExperimentRequest { - /** LookupEnvironmentHistoryResponse nextPageToken */ - nextPageToken?: (string|null); + /** StopExperimentRequest name */ + name?: (string|null); } - /** Represents a LookupEnvironmentHistoryResponse. */ - class LookupEnvironmentHistoryResponse implements ILookupEnvironmentHistoryResponse { + /** Represents a StopExperimentRequest. */ + class StopExperimentRequest implements IStopExperimentRequest { /** - * Constructs a new LookupEnvironmentHistoryResponse. + * Constructs a new StopExperimentRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ILookupEnvironmentHistoryResponse); - - /** LookupEnvironmentHistoryResponse environments. */ - public environments: google.cloud.dialogflow.cx.v3beta1.IEnvironment[]; + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IStopExperimentRequest); - /** LookupEnvironmentHistoryResponse nextPageToken. */ - public nextPageToken: string; + /** StopExperimentRequest name. */ + public name: string; /** - * Creates a new LookupEnvironmentHistoryResponse instance using the specified properties. + * Creates a new StopExperimentRequest instance using the specified properties. * @param [properties] Properties to set - * @returns LookupEnvironmentHistoryResponse instance + * @returns StopExperimentRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ILookupEnvironmentHistoryResponse): google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IStopExperimentRequest): google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest; /** - * Encodes the specified LookupEnvironmentHistoryResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse.verify|verify} messages. - * @param message LookupEnvironmentHistoryResponse message or plain object to encode + * Encodes the specified StopExperimentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest.verify|verify} messages. + * @param message StopExperimentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.ILookupEnvironmentHistoryResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IStopExperimentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified LookupEnvironmentHistoryResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse.verify|verify} messages. - * @param message LookupEnvironmentHistoryResponse message or plain object to encode + * Encodes the specified StopExperimentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest.verify|verify} messages. + * @param message StopExperimentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ILookupEnvironmentHistoryResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IStopExperimentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a LookupEnvironmentHistoryResponse message from the specified reader or buffer. + * Decodes a StopExperimentRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns LookupEnvironmentHistoryResponse + * @returns StopExperimentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest; /** - * Decodes a LookupEnvironmentHistoryResponse message from the specified reader or buffer, length delimited. + * Decodes a StopExperimentRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns LookupEnvironmentHistoryResponse + * @returns StopExperimentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest; /** - * Verifies a LookupEnvironmentHistoryResponse message. + * Verifies a StopExperimentRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a LookupEnvironmentHistoryResponse message from a plain object. Also converts values to their respective internal types. + * Creates a StopExperimentRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns LookupEnvironmentHistoryResponse + * @returns StopExperimentRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest; /** - * Creates a plain object from a LookupEnvironmentHistoryResponse message. Also converts values to other types if specified. - * @param message LookupEnvironmentHistoryResponse + * Creates a plain object from a StopExperimentRequest message. Also converts values to other types if specified. + * @param message StopExperimentRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this LookupEnvironmentHistoryResponse to JSON. + * Converts this StopExperimentRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; @@ -34113,6 +37929,9 @@ export namespace google { /** ResourceDescriptor singular */ singular?: (string|null); + + /** ResourceDescriptor style */ + style?: (google.api.ResourceDescriptor.Style[]|null); } /** Represents a ResourceDescriptor. */ @@ -34142,6 +37961,9 @@ export namespace google { /** ResourceDescriptor singular. */ public singular: string; + /** ResourceDescriptor style. */ + public style: google.api.ResourceDescriptor.Style[]; + /** * Creates a new ResourceDescriptor instance using the specified properties. * @param [properties] Properties to set @@ -34221,6 +38043,12 @@ export namespace google { ORIGINALLY_SINGLE_PATTERN = 1, FUTURE_MULTI_PATTERN = 2 } + + /** Style enum. */ + enum Style { + STYLE_UNSPECIFIED = 0, + DECLARATIVE_FRIENDLY = 1 + } } /** Properties of a ResourceReference. */ diff --git a/protos/protos.js b/protos/protos.js index a4620fc8..690dc139 100644 --- a/protos/protos.js +++ b/protos/protos.js @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -18560,234 +18560,302 @@ return LookupEnvironmentHistoryResponse; })(); - v3.Intents = (function() { + v3.Experiments = (function() { /** - * Constructs a new Intents service. + * Constructs a new Experiments service. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents an Intents + * @classdesc Represents an Experiments * @extends $protobuf.rpc.Service * @constructor * @param {$protobuf.RPCImpl} rpcImpl RPC implementation * @param {boolean} [requestDelimited=false] Whether requests are length-delimited * @param {boolean} [responseDelimited=false] Whether responses are length-delimited */ - function Intents(rpcImpl, requestDelimited, responseDelimited) { + function Experiments(rpcImpl, requestDelimited, responseDelimited) { $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); } - (Intents.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Intents; + (Experiments.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Experiments; /** - * Creates new Intents service using the specified rpc implementation. + * Creates new Experiments service using the specified rpc implementation. * @function create - * @memberof google.cloud.dialogflow.cx.v3.Intents + * @memberof google.cloud.dialogflow.cx.v3.Experiments * @static * @param {$protobuf.RPCImpl} rpcImpl RPC implementation * @param {boolean} [requestDelimited=false] Whether requests are length-delimited * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {Intents} RPC service. Useful where requests and/or responses are streamed. + * @returns {Experiments} RPC service. Useful where requests and/or responses are streamed. */ - Intents.create = function create(rpcImpl, requestDelimited, responseDelimited) { + Experiments.create = function create(rpcImpl, requestDelimited, responseDelimited) { return new this(rpcImpl, requestDelimited, responseDelimited); }; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Intents#listIntents}. - * @memberof google.cloud.dialogflow.cx.v3.Intents - * @typedef ListIntentsCallback + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Experiments#listExperiments}. + * @memberof google.cloud.dialogflow.cx.v3.Experiments + * @typedef ListExperimentsCallback * @type {function} * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.ListIntentsResponse} [response] ListIntentsResponse + * @param {google.cloud.dialogflow.cx.v3.ListExperimentsResponse} [response] ListExperimentsResponse */ /** - * Calls ListIntents. - * @function listIntents - * @memberof google.cloud.dialogflow.cx.v3.Intents + * Calls ListExperiments. + * @function listExperiments + * @memberof google.cloud.dialogflow.cx.v3.Experiments * @instance - * @param {google.cloud.dialogflow.cx.v3.IListIntentsRequest} request ListIntentsRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Intents.ListIntentsCallback} callback Node-style callback called with the error, if any, and ListIntentsResponse + * @param {google.cloud.dialogflow.cx.v3.IListExperimentsRequest} request ListExperimentsRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Experiments.ListExperimentsCallback} callback Node-style callback called with the error, if any, and ListExperimentsResponse * @returns {undefined} * @variation 1 */ - Object.defineProperty(Intents.prototype.listIntents = function listIntents(request, callback) { - return this.rpcCall(listIntents, $root.google.cloud.dialogflow.cx.v3.ListIntentsRequest, $root.google.cloud.dialogflow.cx.v3.ListIntentsResponse, request, callback); - }, "name", { value: "ListIntents" }); + Object.defineProperty(Experiments.prototype.listExperiments = function listExperiments(request, callback) { + return this.rpcCall(listExperiments, $root.google.cloud.dialogflow.cx.v3.ListExperimentsRequest, $root.google.cloud.dialogflow.cx.v3.ListExperimentsResponse, request, callback); + }, "name", { value: "ListExperiments" }); /** - * Calls ListIntents. - * @function listIntents - * @memberof google.cloud.dialogflow.cx.v3.Intents + * Calls ListExperiments. + * @function listExperiments + * @memberof google.cloud.dialogflow.cx.v3.Experiments * @instance - * @param {google.cloud.dialogflow.cx.v3.IListIntentsRequest} request ListIntentsRequest message or plain object - * @returns {Promise} Promise + * @param {google.cloud.dialogflow.cx.v3.IListExperimentsRequest} request ListExperimentsRequest message or plain object + * @returns {Promise} Promise * @variation 2 */ /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Intents#getIntent}. - * @memberof google.cloud.dialogflow.cx.v3.Intents - * @typedef GetIntentCallback + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Experiments#getExperiment}. + * @memberof google.cloud.dialogflow.cx.v3.Experiments + * @typedef GetExperimentCallback * @type {function} * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.Intent} [response] Intent + * @param {google.cloud.dialogflow.cx.v3.Experiment} [response] Experiment */ /** - * Calls GetIntent. - * @function getIntent - * @memberof google.cloud.dialogflow.cx.v3.Intents + * Calls GetExperiment. + * @function getExperiment + * @memberof google.cloud.dialogflow.cx.v3.Experiments * @instance - * @param {google.cloud.dialogflow.cx.v3.IGetIntentRequest} request GetIntentRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Intents.GetIntentCallback} callback Node-style callback called with the error, if any, and Intent + * @param {google.cloud.dialogflow.cx.v3.IGetExperimentRequest} request GetExperimentRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Experiments.GetExperimentCallback} callback Node-style callback called with the error, if any, and Experiment * @returns {undefined} * @variation 1 */ - Object.defineProperty(Intents.prototype.getIntent = function getIntent(request, callback) { - return this.rpcCall(getIntent, $root.google.cloud.dialogflow.cx.v3.GetIntentRequest, $root.google.cloud.dialogflow.cx.v3.Intent, request, callback); - }, "name", { value: "GetIntent" }); + Object.defineProperty(Experiments.prototype.getExperiment = function getExperiment(request, callback) { + return this.rpcCall(getExperiment, $root.google.cloud.dialogflow.cx.v3.GetExperimentRequest, $root.google.cloud.dialogflow.cx.v3.Experiment, request, callback); + }, "name", { value: "GetExperiment" }); /** - * Calls GetIntent. - * @function getIntent - * @memberof google.cloud.dialogflow.cx.v3.Intents + * Calls GetExperiment. + * @function getExperiment + * @memberof google.cloud.dialogflow.cx.v3.Experiments * @instance - * @param {google.cloud.dialogflow.cx.v3.IGetIntentRequest} request GetIntentRequest message or plain object - * @returns {Promise} Promise + * @param {google.cloud.dialogflow.cx.v3.IGetExperimentRequest} request GetExperimentRequest message or plain object + * @returns {Promise} Promise * @variation 2 */ /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Intents#createIntent}. - * @memberof google.cloud.dialogflow.cx.v3.Intents - * @typedef CreateIntentCallback + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Experiments#createExperiment}. + * @memberof google.cloud.dialogflow.cx.v3.Experiments + * @typedef CreateExperimentCallback * @type {function} * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.Intent} [response] Intent + * @param {google.cloud.dialogflow.cx.v3.Experiment} [response] Experiment */ /** - * Calls CreateIntent. - * @function createIntent - * @memberof google.cloud.dialogflow.cx.v3.Intents + * Calls CreateExperiment. + * @function createExperiment + * @memberof google.cloud.dialogflow.cx.v3.Experiments * @instance - * @param {google.cloud.dialogflow.cx.v3.ICreateIntentRequest} request CreateIntentRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Intents.CreateIntentCallback} callback Node-style callback called with the error, if any, and Intent + * @param {google.cloud.dialogflow.cx.v3.ICreateExperimentRequest} request CreateExperimentRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Experiments.CreateExperimentCallback} callback Node-style callback called with the error, if any, and Experiment * @returns {undefined} * @variation 1 */ - Object.defineProperty(Intents.prototype.createIntent = function createIntent(request, callback) { - return this.rpcCall(createIntent, $root.google.cloud.dialogflow.cx.v3.CreateIntentRequest, $root.google.cloud.dialogflow.cx.v3.Intent, request, callback); - }, "name", { value: "CreateIntent" }); + Object.defineProperty(Experiments.prototype.createExperiment = function createExperiment(request, callback) { + return this.rpcCall(createExperiment, $root.google.cloud.dialogflow.cx.v3.CreateExperimentRequest, $root.google.cloud.dialogflow.cx.v3.Experiment, request, callback); + }, "name", { value: "CreateExperiment" }); /** - * Calls CreateIntent. - * @function createIntent - * @memberof google.cloud.dialogflow.cx.v3.Intents + * Calls CreateExperiment. + * @function createExperiment + * @memberof google.cloud.dialogflow.cx.v3.Experiments * @instance - * @param {google.cloud.dialogflow.cx.v3.ICreateIntentRequest} request CreateIntentRequest message or plain object - * @returns {Promise} Promise + * @param {google.cloud.dialogflow.cx.v3.ICreateExperimentRequest} request CreateExperimentRequest message or plain object + * @returns {Promise} Promise * @variation 2 */ /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Intents#updateIntent}. - * @memberof google.cloud.dialogflow.cx.v3.Intents - * @typedef UpdateIntentCallback + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Experiments#updateExperiment}. + * @memberof google.cloud.dialogflow.cx.v3.Experiments + * @typedef UpdateExperimentCallback * @type {function} * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.Intent} [response] Intent + * @param {google.cloud.dialogflow.cx.v3.Experiment} [response] Experiment */ /** - * Calls UpdateIntent. - * @function updateIntent - * @memberof google.cloud.dialogflow.cx.v3.Intents + * Calls UpdateExperiment. + * @function updateExperiment + * @memberof google.cloud.dialogflow.cx.v3.Experiments * @instance - * @param {google.cloud.dialogflow.cx.v3.IUpdateIntentRequest} request UpdateIntentRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Intents.UpdateIntentCallback} callback Node-style callback called with the error, if any, and Intent + * @param {google.cloud.dialogflow.cx.v3.IUpdateExperimentRequest} request UpdateExperimentRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Experiments.UpdateExperimentCallback} callback Node-style callback called with the error, if any, and Experiment * @returns {undefined} * @variation 1 */ - Object.defineProperty(Intents.prototype.updateIntent = function updateIntent(request, callback) { - return this.rpcCall(updateIntent, $root.google.cloud.dialogflow.cx.v3.UpdateIntentRequest, $root.google.cloud.dialogflow.cx.v3.Intent, request, callback); - }, "name", { value: "UpdateIntent" }); + Object.defineProperty(Experiments.prototype.updateExperiment = function updateExperiment(request, callback) { + return this.rpcCall(updateExperiment, $root.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest, $root.google.cloud.dialogflow.cx.v3.Experiment, request, callback); + }, "name", { value: "UpdateExperiment" }); /** - * Calls UpdateIntent. - * @function updateIntent - * @memberof google.cloud.dialogflow.cx.v3.Intents + * Calls UpdateExperiment. + * @function updateExperiment + * @memberof google.cloud.dialogflow.cx.v3.Experiments * @instance - * @param {google.cloud.dialogflow.cx.v3.IUpdateIntentRequest} request UpdateIntentRequest message or plain object - * @returns {Promise} Promise + * @param {google.cloud.dialogflow.cx.v3.IUpdateExperimentRequest} request UpdateExperimentRequest message or plain object + * @returns {Promise} Promise * @variation 2 */ /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Intents#deleteIntent}. - * @memberof google.cloud.dialogflow.cx.v3.Intents - * @typedef DeleteIntentCallback + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Experiments#deleteExperiment}. + * @memberof google.cloud.dialogflow.cx.v3.Experiments + * @typedef DeleteExperimentCallback * @type {function} * @param {Error|null} error Error, if any * @param {google.protobuf.Empty} [response] Empty */ /** - * Calls DeleteIntent. - * @function deleteIntent - * @memberof google.cloud.dialogflow.cx.v3.Intents + * Calls DeleteExperiment. + * @function deleteExperiment + * @memberof google.cloud.dialogflow.cx.v3.Experiments * @instance - * @param {google.cloud.dialogflow.cx.v3.IDeleteIntentRequest} request DeleteIntentRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Intents.DeleteIntentCallback} callback Node-style callback called with the error, if any, and Empty + * @param {google.cloud.dialogflow.cx.v3.IDeleteExperimentRequest} request DeleteExperimentRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Experiments.DeleteExperimentCallback} callback Node-style callback called with the error, if any, and Empty * @returns {undefined} * @variation 1 */ - Object.defineProperty(Intents.prototype.deleteIntent = function deleteIntent(request, callback) { - return this.rpcCall(deleteIntent, $root.google.cloud.dialogflow.cx.v3.DeleteIntentRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteIntent" }); + Object.defineProperty(Experiments.prototype.deleteExperiment = function deleteExperiment(request, callback) { + return this.rpcCall(deleteExperiment, $root.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteExperiment" }); /** - * Calls DeleteIntent. - * @function deleteIntent - * @memberof google.cloud.dialogflow.cx.v3.Intents + * Calls DeleteExperiment. + * @function deleteExperiment + * @memberof google.cloud.dialogflow.cx.v3.Experiments * @instance - * @param {google.cloud.dialogflow.cx.v3.IDeleteIntentRequest} request DeleteIntentRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.IDeleteExperimentRequest} request DeleteExperimentRequest message or plain object * @returns {Promise} Promise * @variation 2 */ - return Intents; - })(); + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Experiments#startExperiment}. + * @memberof google.cloud.dialogflow.cx.v3.Experiments + * @typedef StartExperimentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.Experiment} [response] Experiment + */ - v3.Intent = (function() { + /** + * Calls StartExperiment. + * @function startExperiment + * @memberof google.cloud.dialogflow.cx.v3.Experiments + * @instance + * @param {google.cloud.dialogflow.cx.v3.IStartExperimentRequest} request StartExperimentRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Experiments.StartExperimentCallback} callback Node-style callback called with the error, if any, and Experiment + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Experiments.prototype.startExperiment = function startExperiment(request, callback) { + return this.rpcCall(startExperiment, $root.google.cloud.dialogflow.cx.v3.StartExperimentRequest, $root.google.cloud.dialogflow.cx.v3.Experiment, request, callback); + }, "name", { value: "StartExperiment" }); /** - * Properties of an Intent. - * @memberof google.cloud.dialogflow.cx.v3 - * @interface IIntent - * @property {string|null} [name] Intent name - * @property {string|null} [displayName] Intent displayName - * @property {Array.|null} [trainingPhrases] Intent trainingPhrases - * @property {Array.|null} [parameters] Intent parameters - * @property {number|null} [priority] Intent priority - * @property {boolean|null} [isFallback] Intent isFallback - * @property {Object.|null} [labels] Intent labels - * @property {string|null} [description] Intent description + * Calls StartExperiment. + * @function startExperiment + * @memberof google.cloud.dialogflow.cx.v3.Experiments + * @instance + * @param {google.cloud.dialogflow.cx.v3.IStartExperimentRequest} request StartExperimentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ /** - * Constructs a new Intent. + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Experiments#stopExperiment}. + * @memberof google.cloud.dialogflow.cx.v3.Experiments + * @typedef StopExperimentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.Experiment} [response] Experiment + */ + + /** + * Calls StopExperiment. + * @function stopExperiment + * @memberof google.cloud.dialogflow.cx.v3.Experiments + * @instance + * @param {google.cloud.dialogflow.cx.v3.IStopExperimentRequest} request StopExperimentRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Experiments.StopExperimentCallback} callback Node-style callback called with the error, if any, and Experiment + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Experiments.prototype.stopExperiment = function stopExperiment(request, callback) { + return this.rpcCall(stopExperiment, $root.google.cloud.dialogflow.cx.v3.StopExperimentRequest, $root.google.cloud.dialogflow.cx.v3.Experiment, request, callback); + }, "name", { value: "StopExperiment" }); + + /** + * Calls StopExperiment. + * @function stopExperiment + * @memberof google.cloud.dialogflow.cx.v3.Experiments + * @instance + * @param {google.cloud.dialogflow.cx.v3.IStopExperimentRequest} request StopExperimentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Experiments; + })(); + + v3.Experiment = (function() { + + /** + * Properties of an Experiment. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents an Intent. - * @implements IIntent + * @interface IExperiment + * @property {string|null} [name] Experiment name + * @property {string|null} [displayName] Experiment displayName + * @property {string|null} [description] Experiment description + * @property {google.cloud.dialogflow.cx.v3.Experiment.State|null} [state] Experiment state + * @property {google.cloud.dialogflow.cx.v3.Experiment.IDefinition|null} [definition] Experiment definition + * @property {google.cloud.dialogflow.cx.v3.Experiment.IResult|null} [result] Experiment result + * @property {google.protobuf.ITimestamp|null} [createTime] Experiment createTime + * @property {google.protobuf.ITimestamp|null} [startTime] Experiment startTime + * @property {google.protobuf.ITimestamp|null} [endTime] Experiment endTime + * @property {google.protobuf.ITimestamp|null} [lastUpdateTime] Experiment lastUpdateTime + * @property {google.protobuf.IDuration|null} [experimentLength] Experiment experimentLength + * @property {Array.|null} [variantsHistory] Experiment variantsHistory + */ + + /** + * Constructs a new Experiment. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents an Experiment. + * @implements IExperiment * @constructor - * @param {google.cloud.dialogflow.cx.v3.IIntent=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IExperiment=} [properties] Properties to set */ - function Intent(properties) { - this.trainingPhrases = []; - this.parameters = []; - this.labels = {}; + function Experiment(properties) { + this.variantsHistory = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -18795,143 +18863,181 @@ } /** - * Intent name. + * Experiment name. * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.Intent + * @memberof google.cloud.dialogflow.cx.v3.Experiment * @instance */ - Intent.prototype.name = ""; + Experiment.prototype.name = ""; /** - * Intent displayName. + * Experiment displayName. * @member {string} displayName - * @memberof google.cloud.dialogflow.cx.v3.Intent + * @memberof google.cloud.dialogflow.cx.v3.Experiment * @instance */ - Intent.prototype.displayName = ""; + Experiment.prototype.displayName = ""; /** - * Intent trainingPhrases. - * @member {Array.} trainingPhrases - * @memberof google.cloud.dialogflow.cx.v3.Intent + * Experiment description. + * @member {string} description + * @memberof google.cloud.dialogflow.cx.v3.Experiment * @instance */ - Intent.prototype.trainingPhrases = $util.emptyArray; + Experiment.prototype.description = ""; /** - * Intent parameters. - * @member {Array.} parameters - * @memberof google.cloud.dialogflow.cx.v3.Intent + * Experiment state. + * @member {google.cloud.dialogflow.cx.v3.Experiment.State} state + * @memberof google.cloud.dialogflow.cx.v3.Experiment * @instance */ - Intent.prototype.parameters = $util.emptyArray; + Experiment.prototype.state = 0; /** - * Intent priority. - * @member {number} priority - * @memberof google.cloud.dialogflow.cx.v3.Intent + * Experiment definition. + * @member {google.cloud.dialogflow.cx.v3.Experiment.IDefinition|null|undefined} definition + * @memberof google.cloud.dialogflow.cx.v3.Experiment * @instance */ - Intent.prototype.priority = 0; + Experiment.prototype.definition = null; /** - * Intent isFallback. - * @member {boolean} isFallback - * @memberof google.cloud.dialogflow.cx.v3.Intent + * Experiment result. + * @member {google.cloud.dialogflow.cx.v3.Experiment.IResult|null|undefined} result + * @memberof google.cloud.dialogflow.cx.v3.Experiment * @instance */ - Intent.prototype.isFallback = false; + Experiment.prototype.result = null; /** - * Intent labels. - * @member {Object.} labels - * @memberof google.cloud.dialogflow.cx.v3.Intent + * Experiment createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.dialogflow.cx.v3.Experiment * @instance */ - Intent.prototype.labels = $util.emptyObject; + Experiment.prototype.createTime = null; /** - * Intent description. - * @member {string} description - * @memberof google.cloud.dialogflow.cx.v3.Intent + * Experiment startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.cloud.dialogflow.cx.v3.Experiment * @instance */ - Intent.prototype.description = ""; + Experiment.prototype.startTime = null; /** - * Creates a new Intent instance using the specified properties. + * Experiment endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.dialogflow.cx.v3.Experiment + * @instance + */ + Experiment.prototype.endTime = null; + + /** + * Experiment lastUpdateTime. + * @member {google.protobuf.ITimestamp|null|undefined} lastUpdateTime + * @memberof google.cloud.dialogflow.cx.v3.Experiment + * @instance + */ + Experiment.prototype.lastUpdateTime = null; + + /** + * Experiment experimentLength. + * @member {google.protobuf.IDuration|null|undefined} experimentLength + * @memberof google.cloud.dialogflow.cx.v3.Experiment + * @instance + */ + Experiment.prototype.experimentLength = null; + + /** + * Experiment variantsHistory. + * @member {Array.} variantsHistory + * @memberof google.cloud.dialogflow.cx.v3.Experiment + * @instance + */ + Experiment.prototype.variantsHistory = $util.emptyArray; + + /** + * Creates a new Experiment instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.Intent + * @memberof google.cloud.dialogflow.cx.v3.Experiment * @static - * @param {google.cloud.dialogflow.cx.v3.IIntent=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.Intent} Intent instance + * @param {google.cloud.dialogflow.cx.v3.IExperiment=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Experiment} Experiment instance */ - Intent.create = function create(properties) { - return new Intent(properties); + Experiment.create = function create(properties) { + return new Experiment(properties); }; /** - * Encodes the specified Intent message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Intent.verify|verify} messages. + * Encodes the specified Experiment message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Experiment.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.Intent + * @memberof google.cloud.dialogflow.cx.v3.Experiment * @static - * @param {google.cloud.dialogflow.cx.v3.IIntent} message Intent message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IExperiment} message Experiment message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Intent.encode = function encode(message, writer) { + Experiment.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.trainingPhrases != null && message.trainingPhrases.length) - for (var i = 0; i < message.trainingPhrases.length; ++i) - $root.google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.encode(message.trainingPhrases[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.parameters != null && message.parameters.length) - for (var i = 0; i < message.parameters.length; ++i) - $root.google.cloud.dialogflow.cx.v3.Intent.Parameter.encode(message.parameters[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.priority != null && Object.hasOwnProperty.call(message, "priority")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.priority); - if (message.isFallback != null && Object.hasOwnProperty.call(message, "isFallback")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.isFallback); - if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 7, wireType 2 =*/58).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.description); + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.state); + if (message.definition != null && Object.hasOwnProperty.call(message, "definition")) + $root.google.cloud.dialogflow.cx.v3.Experiment.Definition.encode(message.definition, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.result != null && Object.hasOwnProperty.call(message, "result")) + $root.google.cloud.dialogflow.cx.v3.Experiment.Result.encode(message.result, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.lastUpdateTime != null && Object.hasOwnProperty.call(message, "lastUpdateTime")) + $root.google.protobuf.Timestamp.encode(message.lastUpdateTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.experimentLength != null && Object.hasOwnProperty.call(message, "experimentLength")) + $root.google.protobuf.Duration.encode(message.experimentLength, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.variantsHistory != null && message.variantsHistory.length) + for (var i = 0; i < message.variantsHistory.length; ++i) + $root.google.cloud.dialogflow.cx.v3.VariantsHistory.encode(message.variantsHistory[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); return writer; }; /** - * Encodes the specified Intent message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Intent.verify|verify} messages. + * Encodes the specified Experiment message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Experiment.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Intent + * @memberof google.cloud.dialogflow.cx.v3.Experiment * @static - * @param {google.cloud.dialogflow.cx.v3.IIntent} message Intent message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IExperiment} message Experiment message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Intent.encodeDelimited = function encodeDelimited(message, writer) { + Experiment.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Intent message from the specified reader or buffer. + * Decodes an Experiment message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.Intent + * @memberof google.cloud.dialogflow.cx.v3.Experiment * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.Intent} Intent + * @returns {google.cloud.dialogflow.cx.v3.Experiment} Experiment * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Intent.decode = function decode(reader, length) { + Experiment.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.Intent(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.Experiment(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -18942,45 +19048,36 @@ message.displayName = reader.string(); break; case 3: - if (!(message.trainingPhrases && message.trainingPhrases.length)) - message.trainingPhrases = []; - message.trainingPhrases.push($root.google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.decode(reader, reader.uint32())); + message.description = reader.string(); break; case 4: - if (!(message.parameters && message.parameters.length)) - message.parameters = []; - message.parameters.push($root.google.cloud.dialogflow.cx.v3.Intent.Parameter.decode(reader, reader.uint32())); + message.state = reader.int32(); break; case 5: - message.priority = reader.int32(); + message.definition = $root.google.cloud.dialogflow.cx.v3.Experiment.Definition.decode(reader, reader.uint32()); break; case 6: - message.isFallback = reader.bool(); + message.result = $root.google.cloud.dialogflow.cx.v3.Experiment.Result.decode(reader, reader.uint32()); break; case 7: - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.labels[key] = value; + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; case 8: - message.description = reader.string(); + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 9: + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 10: + message.lastUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 11: + message.experimentLength = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 12: + if (!(message.variantsHistory && message.variantsHistory.length)) + message.variantsHistory = []; + message.variantsHistory.push($root.google.cloud.dialogflow.cx.v3.VariantsHistory.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -18991,30 +19088,30 @@ }; /** - * Decodes an Intent message from the specified reader or buffer, length delimited. + * Decodes an Experiment message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Intent + * @memberof google.cloud.dialogflow.cx.v3.Experiment * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.Intent} Intent + * @returns {google.cloud.dialogflow.cx.v3.Experiment} Experiment * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Intent.decodeDelimited = function decodeDelimited(reader) { + Experiment.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Intent message. + * Verifies an Experiment message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.Intent + * @memberof google.cloud.dialogflow.cx.v3.Experiment * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Intent.verify = function verify(message) { + Experiment.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) @@ -19023,183 +19120,238 @@ if (message.displayName != null && message.hasOwnProperty("displayName")) if (!$util.isString(message.displayName)) return "displayName: string expected"; - if (message.trainingPhrases != null && message.hasOwnProperty("trainingPhrases")) { - if (!Array.isArray(message.trainingPhrases)) - return "trainingPhrases: array expected"; - for (var i = 0; i < message.trainingPhrases.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.verify(message.trainingPhrases[i]); - if (error) - return "trainingPhrases." + error; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; } + if (message.definition != null && message.hasOwnProperty("definition")) { + var error = $root.google.cloud.dialogflow.cx.v3.Experiment.Definition.verify(message.definition); + if (error) + return "definition." + error; } - if (message.parameters != null && message.hasOwnProperty("parameters")) { - if (!Array.isArray(message.parameters)) - return "parameters: array expected"; - for (var i = 0; i < message.parameters.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.Intent.Parameter.verify(message.parameters[i]); + if (message.result != null && message.hasOwnProperty("result")) { + var error = $root.google.cloud.dialogflow.cx.v3.Experiment.Result.verify(message.result); + if (error) + return "result." + error; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.lastUpdateTime != null && message.hasOwnProperty("lastUpdateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.lastUpdateTime); + if (error) + return "lastUpdateTime." + error; + } + if (message.experimentLength != null && message.hasOwnProperty("experimentLength")) { + var error = $root.google.protobuf.Duration.verify(message.experimentLength); + if (error) + return "experimentLength." + error; + } + if (message.variantsHistory != null && message.hasOwnProperty("variantsHistory")) { + if (!Array.isArray(message.variantsHistory)) + return "variantsHistory: array expected"; + for (var i = 0; i < message.variantsHistory.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.VariantsHistory.verify(message.variantsHistory[i]); if (error) - return "parameters." + error; + return "variantsHistory." + error; } } - if (message.priority != null && message.hasOwnProperty("priority")) - if (!$util.isInteger(message.priority)) - return "priority: integer expected"; - if (message.isFallback != null && message.hasOwnProperty("isFallback")) - if (typeof message.isFallback !== "boolean") - return "isFallback: boolean expected"; - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; return null; }; /** - * Creates an Intent message from a plain object. Also converts values to their respective internal types. + * Creates an Experiment message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.Intent + * @memberof google.cloud.dialogflow.cx.v3.Experiment * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.Intent} Intent + * @returns {google.cloud.dialogflow.cx.v3.Experiment} Experiment */ - Intent.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.Intent) + Experiment.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.Experiment) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.Intent(); + var message = new $root.google.cloud.dialogflow.cx.v3.Experiment(); if (object.name != null) message.name = String(object.name); if (object.displayName != null) message.displayName = String(object.displayName); - if (object.trainingPhrases) { - if (!Array.isArray(object.trainingPhrases)) - throw TypeError(".google.cloud.dialogflow.cx.v3.Intent.trainingPhrases: array expected"); - message.trainingPhrases = []; - for (var i = 0; i < object.trainingPhrases.length; ++i) { - if (typeof object.trainingPhrases[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.Intent.trainingPhrases: object expected"); - message.trainingPhrases[i] = $root.google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.fromObject(object.trainingPhrases[i]); - } + if (object.description != null) + message.description = String(object.description); + switch (object.state) { + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "DRAFT": + case 1: + message.state = 1; + break; + case "RUNNING": + case 2: + message.state = 2; + break; + case "DONE": + case 3: + message.state = 3; + break; } - if (object.parameters) { - if (!Array.isArray(object.parameters)) - throw TypeError(".google.cloud.dialogflow.cx.v3.Intent.parameters: array expected"); - message.parameters = []; - for (var i = 0; i < object.parameters.length; ++i) { - if (typeof object.parameters[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.Intent.parameters: object expected"); - message.parameters[i] = $root.google.cloud.dialogflow.cx.v3.Intent.Parameter.fromObject(object.parameters[i]); - } + if (object.definition != null) { + if (typeof object.definition !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Experiment.definition: object expected"); + message.definition = $root.google.cloud.dialogflow.cx.v3.Experiment.Definition.fromObject(object.definition); } - if (object.priority != null) - message.priority = object.priority | 0; - if (object.isFallback != null) - message.isFallback = Boolean(object.isFallback); - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.Intent.labels: object expected"); - message.labels = {}; - for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) - message.labels[keys[i]] = String(object.labels[keys[i]]); + if (object.result != null) { + if (typeof object.result !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Experiment.result: object expected"); + message.result = $root.google.cloud.dialogflow.cx.v3.Experiment.Result.fromObject(object.result); + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Experiment.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Experiment.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Experiment.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + if (object.lastUpdateTime != null) { + if (typeof object.lastUpdateTime !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Experiment.lastUpdateTime: object expected"); + message.lastUpdateTime = $root.google.protobuf.Timestamp.fromObject(object.lastUpdateTime); + } + if (object.experimentLength != null) { + if (typeof object.experimentLength !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Experiment.experimentLength: object expected"); + message.experimentLength = $root.google.protobuf.Duration.fromObject(object.experimentLength); + } + if (object.variantsHistory) { + if (!Array.isArray(object.variantsHistory)) + throw TypeError(".google.cloud.dialogflow.cx.v3.Experiment.variantsHistory: array expected"); + message.variantsHistory = []; + for (var i = 0; i < object.variantsHistory.length; ++i) { + if (typeof object.variantsHistory[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Experiment.variantsHistory: object expected"); + message.variantsHistory[i] = $root.google.cloud.dialogflow.cx.v3.VariantsHistory.fromObject(object.variantsHistory[i]); + } } - if (object.description != null) - message.description = String(object.description); return message; }; /** - * Creates a plain object from an Intent message. Also converts values to other types if specified. + * Creates a plain object from an Experiment message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.Intent + * @memberof google.cloud.dialogflow.cx.v3.Experiment * @static - * @param {google.cloud.dialogflow.cx.v3.Intent} message Intent + * @param {google.cloud.dialogflow.cx.v3.Experiment} message Experiment * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Intent.toObject = function toObject(message, options) { + Experiment.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.trainingPhrases = []; - object.parameters = []; - } - if (options.objects || options.defaults) - object.labels = {}; + if (options.arrays || options.defaults) + object.variantsHistory = []; if (options.defaults) { object.name = ""; object.displayName = ""; - object.priority = 0; - object.isFallback = false; object.description = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.definition = null; + object.result = null; + object.createTime = null; + object.startTime = null; + object.endTime = null; + object.lastUpdateTime = null; + object.experimentLength = null; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; if (message.displayName != null && message.hasOwnProperty("displayName")) object.displayName = message.displayName; - if (message.trainingPhrases && message.trainingPhrases.length) { - object.trainingPhrases = []; - for (var j = 0; j < message.trainingPhrases.length; ++j) - object.trainingPhrases[j] = $root.google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.toObject(message.trainingPhrases[j], options); - } - if (message.parameters && message.parameters.length) { - object.parameters = []; - for (var j = 0; j < message.parameters.length; ++j) - object.parameters[j] = $root.google.cloud.dialogflow.cx.v3.Intent.Parameter.toObject(message.parameters[j], options); - } - if (message.priority != null && message.hasOwnProperty("priority")) - object.priority = message.priority; - if (message.isFallback != null && message.hasOwnProperty("isFallback")) - object.isFallback = message.isFallback; - var keys2; - if (message.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; - for (var j = 0; j < keys2.length; ++j) - object.labels[keys2[j]] = message.labels[keys2[j]]; - } if (message.description != null && message.hasOwnProperty("description")) object.description = message.description; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.Experiment.State[message.state] : message.state; + if (message.definition != null && message.hasOwnProperty("definition")) + object.definition = $root.google.cloud.dialogflow.cx.v3.Experiment.Definition.toObject(message.definition, options); + if (message.result != null && message.hasOwnProperty("result")) + object.result = $root.google.cloud.dialogflow.cx.v3.Experiment.Result.toObject(message.result, options); + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.lastUpdateTime != null && message.hasOwnProperty("lastUpdateTime")) + object.lastUpdateTime = $root.google.protobuf.Timestamp.toObject(message.lastUpdateTime, options); + if (message.experimentLength != null && message.hasOwnProperty("experimentLength")) + object.experimentLength = $root.google.protobuf.Duration.toObject(message.experimentLength, options); + if (message.variantsHistory && message.variantsHistory.length) { + object.variantsHistory = []; + for (var j = 0; j < message.variantsHistory.length; ++j) + object.variantsHistory[j] = $root.google.cloud.dialogflow.cx.v3.VariantsHistory.toObject(message.variantsHistory[j], options); + } return object; }; /** - * Converts this Intent to JSON. + * Converts this Experiment to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.Intent + * @memberof google.cloud.dialogflow.cx.v3.Experiment * @instance * @returns {Object.} JSON object */ - Intent.prototype.toJSON = function toJSON() { + Experiment.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - Intent.TrainingPhrase = (function() { + Experiment.Definition = (function() { /** - * Properties of a TrainingPhrase. - * @memberof google.cloud.dialogflow.cx.v3.Intent - * @interface ITrainingPhrase - * @property {string|null} [id] TrainingPhrase id - * @property {Array.|null} [parts] TrainingPhrase parts - * @property {number|null} [repeatCount] TrainingPhrase repeatCount + * Properties of a Definition. + * @memberof google.cloud.dialogflow.cx.v3.Experiment + * @interface IDefinition + * @property {string|null} [condition] Definition condition + * @property {google.cloud.dialogflow.cx.v3.IVersionVariants|null} [versionVariants] Definition versionVariants */ /** - * Constructs a new TrainingPhrase. - * @memberof google.cloud.dialogflow.cx.v3.Intent - * @classdesc Represents a TrainingPhrase. - * @implements ITrainingPhrase + * Constructs a new Definition. + * @memberof google.cloud.dialogflow.cx.v3.Experiment + * @classdesc Represents a Definition. + * @implements IDefinition * @constructor - * @param {google.cloud.dialogflow.cx.v3.Intent.ITrainingPhrase=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.Experiment.IDefinition=} [properties] Properties to set */ - function TrainingPhrase(properties) { - this.parts = []; + function Definition(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -19207,104 +19359,102 @@ } /** - * TrainingPhrase id. - * @member {string} id - * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase + * Definition condition. + * @member {string} condition + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Definition * @instance */ - TrainingPhrase.prototype.id = ""; + Definition.prototype.condition = ""; /** - * TrainingPhrase parts. - * @member {Array.} parts - * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase + * Definition versionVariants. + * @member {google.cloud.dialogflow.cx.v3.IVersionVariants|null|undefined} versionVariants + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Definition * @instance */ - TrainingPhrase.prototype.parts = $util.emptyArray; + Definition.prototype.versionVariants = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * TrainingPhrase repeatCount. - * @member {number} repeatCount - * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase + * Definition variants. + * @member {"versionVariants"|undefined} variants + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Definition * @instance */ - TrainingPhrase.prototype.repeatCount = 0; + Object.defineProperty(Definition.prototype, "variants", { + get: $util.oneOfGetter($oneOfFields = ["versionVariants"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new TrainingPhrase instance using the specified properties. + * Creates a new Definition instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Definition * @static - * @param {google.cloud.dialogflow.cx.v3.Intent.ITrainingPhrase=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase} TrainingPhrase instance + * @param {google.cloud.dialogflow.cx.v3.Experiment.IDefinition=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Experiment.Definition} Definition instance */ - TrainingPhrase.create = function create(properties) { - return new TrainingPhrase(properties); + Definition.create = function create(properties) { + return new Definition(properties); }; /** - * Encodes the specified TrainingPhrase message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.verify|verify} messages. + * Encodes the specified Definition message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Experiment.Definition.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Definition * @static - * @param {google.cloud.dialogflow.cx.v3.Intent.ITrainingPhrase} message TrainingPhrase message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.Experiment.IDefinition} message Definition message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TrainingPhrase.encode = function encode(message, writer) { + Definition.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); - if (message.parts != null && message.parts.length) - for (var i = 0; i < message.parts.length; ++i) - $root.google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part.encode(message.parts[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.repeatCount != null && Object.hasOwnProperty.call(message, "repeatCount")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.repeatCount); + if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.condition); + if (message.versionVariants != null && Object.hasOwnProperty.call(message, "versionVariants")) + $root.google.cloud.dialogflow.cx.v3.VersionVariants.encode(message.versionVariants, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified TrainingPhrase message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.verify|verify} messages. + * Encodes the specified Definition message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Experiment.Definition.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Definition * @static - * @param {google.cloud.dialogflow.cx.v3.Intent.ITrainingPhrase} message TrainingPhrase message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.Experiment.IDefinition} message Definition message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TrainingPhrase.encodeDelimited = function encodeDelimited(message, writer) { + Definition.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TrainingPhrase message from the specified reader or buffer. + * Decodes a Definition message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Definition * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase} TrainingPhrase + * @returns {google.cloud.dialogflow.cx.v3.Experiment.Definition} Definition * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TrainingPhrase.decode = function decode(reader, length) { + Definition.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.Experiment.Definition(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.id = reader.string(); + message.condition = reader.string(); break; case 2: - if (!(message.parts && message.parts.length)) - message.parts = []; - message.parts.push($root.google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part.decode(reader, reader.uint32())); - break; - case 3: - message.repeatCount = reader.int32(); + message.versionVariants = $root.google.cloud.dialogflow.cx.v3.VersionVariants.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -19315,140 +19465,362 @@ }; /** - * Decodes a TrainingPhrase message from the specified reader or buffer, length delimited. + * Decodes a Definition message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Definition * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase} TrainingPhrase + * @returns {google.cloud.dialogflow.cx.v3.Experiment.Definition} Definition * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TrainingPhrase.decodeDelimited = function decodeDelimited(reader) { + Definition.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TrainingPhrase message. + * Verifies a Definition message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Definition * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TrainingPhrase.verify = function verify(message) { + Definition.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isString(message.id)) - return "id: string expected"; - if (message.parts != null && message.hasOwnProperty("parts")) { - if (!Array.isArray(message.parts)) - return "parts: array expected"; - for (var i = 0; i < message.parts.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part.verify(message.parts[i]); + var properties = {}; + if (message.condition != null && message.hasOwnProperty("condition")) + if (!$util.isString(message.condition)) + return "condition: string expected"; + if (message.versionVariants != null && message.hasOwnProperty("versionVariants")) { + properties.variants = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3.VersionVariants.verify(message.versionVariants); if (error) - return "parts." + error; + return "versionVariants." + error; } } - if (message.repeatCount != null && message.hasOwnProperty("repeatCount")) - if (!$util.isInteger(message.repeatCount)) - return "repeatCount: integer expected"; return null; }; /** - * Creates a TrainingPhrase message from a plain object. Also converts values to their respective internal types. + * Creates a Definition message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Definition * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase} TrainingPhrase + * @returns {google.cloud.dialogflow.cx.v3.Experiment.Definition} Definition */ - TrainingPhrase.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase) + Definition.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.Experiment.Definition) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase(); - if (object.id != null) - message.id = String(object.id); - if (object.parts) { - if (!Array.isArray(object.parts)) - throw TypeError(".google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.parts: array expected"); - message.parts = []; - for (var i = 0; i < object.parts.length; ++i) { - if (typeof object.parts[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.parts: object expected"); - message.parts[i] = $root.google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part.fromObject(object.parts[i]); - } + var message = new $root.google.cloud.dialogflow.cx.v3.Experiment.Definition(); + if (object.condition != null) + message.condition = String(object.condition); + if (object.versionVariants != null) { + if (typeof object.versionVariants !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Experiment.Definition.versionVariants: object expected"); + message.versionVariants = $root.google.cloud.dialogflow.cx.v3.VersionVariants.fromObject(object.versionVariants); } - if (object.repeatCount != null) - message.repeatCount = object.repeatCount | 0; return message; }; /** - * Creates a plain object from a TrainingPhrase message. Also converts values to other types if specified. + * Creates a plain object from a Definition message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Definition * @static - * @param {google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase} message TrainingPhrase + * @param {google.cloud.dialogflow.cx.v3.Experiment.Definition} message Definition * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TrainingPhrase.toObject = function toObject(message, options) { + Definition.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.parts = []; - if (options.defaults) { - object.id = ""; - object.repeatCount = 0; + if (options.defaults) + object.condition = ""; + if (message.condition != null && message.hasOwnProperty("condition")) + object.condition = message.condition; + if (message.versionVariants != null && message.hasOwnProperty("versionVariants")) { + object.versionVariants = $root.google.cloud.dialogflow.cx.v3.VersionVariants.toObject(message.versionVariants, options); + if (options.oneofs) + object.variants = "versionVariants"; } - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; - if (message.parts && message.parts.length) { - object.parts = []; - for (var j = 0; j < message.parts.length; ++j) - object.parts[j] = $root.google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part.toObject(message.parts[j], options); + return object; + }; + + /** + * Converts this Definition to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Definition + * @instance + * @returns {Object.} JSON object + */ + Definition.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Definition; + })(); + + Experiment.Result = (function() { + + /** + * Properties of a Result. + * @memberof google.cloud.dialogflow.cx.v3.Experiment + * @interface IResult + * @property {Array.|null} [versionMetrics] Result versionMetrics + * @property {google.protobuf.ITimestamp|null} [lastUpdateTime] Result lastUpdateTime + */ + + /** + * Constructs a new Result. + * @memberof google.cloud.dialogflow.cx.v3.Experiment + * @classdesc Represents a Result. + * @implements IResult + * @constructor + * @param {google.cloud.dialogflow.cx.v3.Experiment.IResult=} [properties] Properties to set + */ + function Result(properties) { + this.versionMetrics = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Result versionMetrics. + * @member {Array.} versionMetrics + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result + * @instance + */ + Result.prototype.versionMetrics = $util.emptyArray; + + /** + * Result lastUpdateTime. + * @member {google.protobuf.ITimestamp|null|undefined} lastUpdateTime + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result + * @instance + */ + Result.prototype.lastUpdateTime = null; + + /** + * Creates a new Result instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result + * @static + * @param {google.cloud.dialogflow.cx.v3.Experiment.IResult=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Experiment.Result} Result instance + */ + Result.create = function create(properties) { + return new Result(properties); + }; + + /** + * Encodes the specified Result message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Experiment.Result.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result + * @static + * @param {google.cloud.dialogflow.cx.v3.Experiment.IResult} message Result message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Result.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.versionMetrics != null && message.versionMetrics.length) + for (var i = 0; i < message.versionMetrics.length; ++i) + $root.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics.encode(message.versionMetrics[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.lastUpdateTime != null && Object.hasOwnProperty.call(message, "lastUpdateTime")) + $root.google.protobuf.Timestamp.encode(message.lastUpdateTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Result message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Experiment.Result.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result + * @static + * @param {google.cloud.dialogflow.cx.v3.Experiment.IResult} message Result message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Result.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Result message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3.Experiment.Result} Result + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Result.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.Experiment.Result(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.versionMetrics && message.versionMetrics.length)) + message.versionMetrics = []; + message.versionMetrics.push($root.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics.decode(reader, reader.uint32())); + break; + case 2: + message.lastUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } } - if (message.repeatCount != null && message.hasOwnProperty("repeatCount")) - object.repeatCount = message.repeatCount; + return message; + }; + + /** + * Decodes a Result message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.Experiment.Result} Result + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Result.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Result message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Result.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.versionMetrics != null && message.hasOwnProperty("versionMetrics")) { + if (!Array.isArray(message.versionMetrics)) + return "versionMetrics: array expected"; + for (var i = 0; i < message.versionMetrics.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics.verify(message.versionMetrics[i]); + if (error) + return "versionMetrics." + error; + } + } + if (message.lastUpdateTime != null && message.hasOwnProperty("lastUpdateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.lastUpdateTime); + if (error) + return "lastUpdateTime." + error; + } + return null; + }; + + /** + * Creates a Result message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.Experiment.Result} Result + */ + Result.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.Experiment.Result) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.Experiment.Result(); + if (object.versionMetrics) { + if (!Array.isArray(object.versionMetrics)) + throw TypeError(".google.cloud.dialogflow.cx.v3.Experiment.Result.versionMetrics: array expected"); + message.versionMetrics = []; + for (var i = 0; i < object.versionMetrics.length; ++i) { + if (typeof object.versionMetrics[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Experiment.Result.versionMetrics: object expected"); + message.versionMetrics[i] = $root.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics.fromObject(object.versionMetrics[i]); + } + } + if (object.lastUpdateTime != null) { + if (typeof object.lastUpdateTime !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Experiment.Result.lastUpdateTime: object expected"); + message.lastUpdateTime = $root.google.protobuf.Timestamp.fromObject(object.lastUpdateTime); + } + return message; + }; + + /** + * Creates a plain object from a Result message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result + * @static + * @param {google.cloud.dialogflow.cx.v3.Experiment.Result} message Result + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Result.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.versionMetrics = []; + if (options.defaults) + object.lastUpdateTime = null; + if (message.versionMetrics && message.versionMetrics.length) { + object.versionMetrics = []; + for (var j = 0; j < message.versionMetrics.length; ++j) + object.versionMetrics[j] = $root.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics.toObject(message.versionMetrics[j], options); + } + if (message.lastUpdateTime != null && message.hasOwnProperty("lastUpdateTime")) + object.lastUpdateTime = $root.google.protobuf.Timestamp.toObject(message.lastUpdateTime, options); return object; }; /** - * Converts this TrainingPhrase to JSON. + * Converts this Result to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result * @instance * @returns {Object.} JSON object */ - TrainingPhrase.prototype.toJSON = function toJSON() { + Result.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - TrainingPhrase.Part = (function() { + Result.ConfidenceInterval = (function() { /** - * Properties of a Part. - * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase - * @interface IPart - * @property {string|null} [text] Part text - * @property {string|null} [parameterId] Part parameterId + * Properties of a ConfidenceInterval. + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result + * @interface IConfidenceInterval + * @property {number|null} [confidenceLevel] ConfidenceInterval confidenceLevel + * @property {number|null} [ratio] ConfidenceInterval ratio + * @property {number|null} [lowerBound] ConfidenceInterval lowerBound + * @property {number|null} [upperBound] ConfidenceInterval upperBound */ /** - * Constructs a new Part. - * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase - * @classdesc Represents a Part. - * @implements IPart + * Constructs a new ConfidenceInterval. + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result + * @classdesc Represents a ConfidenceInterval. + * @implements IConfidenceInterval * @constructor - * @param {google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.IPart=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.Experiment.Result.IConfidenceInterval=} [properties] Properties to set */ - function Part(properties) { + function ConfidenceInterval(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -19456,88 +19828,114 @@ } /** - * Part text. - * @member {string} text - * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part + * ConfidenceInterval confidenceLevel. + * @member {number} confidenceLevel + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval * @instance */ - Part.prototype.text = ""; + ConfidenceInterval.prototype.confidenceLevel = 0; /** - * Part parameterId. - * @member {string} parameterId - * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part + * ConfidenceInterval ratio. + * @member {number} ratio + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval * @instance */ - Part.prototype.parameterId = ""; + ConfidenceInterval.prototype.ratio = 0; /** - * Creates a new Part instance using the specified properties. + * ConfidenceInterval lowerBound. + * @member {number} lowerBound + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval + * @instance + */ + ConfidenceInterval.prototype.lowerBound = 0; + + /** + * ConfidenceInterval upperBound. + * @member {number} upperBound + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval + * @instance + */ + ConfidenceInterval.prototype.upperBound = 0; + + /** + * Creates a new ConfidenceInterval instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval * @static - * @param {google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.IPart=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part} Part instance + * @param {google.cloud.dialogflow.cx.v3.Experiment.Result.IConfidenceInterval=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval} ConfidenceInterval instance */ - Part.create = function create(properties) { - return new Part(properties); + ConfidenceInterval.create = function create(properties) { + return new ConfidenceInterval(properties); }; /** - * Encodes the specified Part message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part.verify|verify} messages. + * Encodes the specified ConfidenceInterval message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval * @static - * @param {google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.IPart} message Part message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.Experiment.Result.IConfidenceInterval} message ConfidenceInterval message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Part.encode = function encode(message, writer) { + ConfidenceInterval.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.text != null && Object.hasOwnProperty.call(message, "text")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.text); - if (message.parameterId != null && Object.hasOwnProperty.call(message, "parameterId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.parameterId); + if (message.confidenceLevel != null && Object.hasOwnProperty.call(message, "confidenceLevel")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.confidenceLevel); + if (message.ratio != null && Object.hasOwnProperty.call(message, "ratio")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.ratio); + if (message.lowerBound != null && Object.hasOwnProperty.call(message, "lowerBound")) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.lowerBound); + if (message.upperBound != null && Object.hasOwnProperty.call(message, "upperBound")) + writer.uint32(/* id 4, wireType 1 =*/33).double(message.upperBound); return writer; }; /** - * Encodes the specified Part message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part.verify|verify} messages. + * Encodes the specified ConfidenceInterval message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval * @static - * @param {google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.IPart} message Part message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.Experiment.Result.IConfidenceInterval} message ConfidenceInterval message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Part.encodeDelimited = function encodeDelimited(message, writer) { + ConfidenceInterval.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Part message from the specified reader or buffer. + * Decodes a ConfidenceInterval message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part} Part + * @returns {google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval} ConfidenceInterval * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Part.decode = function decode(reader, length) { + ConfidenceInterval.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.text = reader.string(); + message.confidenceLevel = reader.double(); break; case 2: - message.parameterId = reader.string(); + message.ratio = reader.double(); + break; + case 3: + message.lowerBound = reader.double(); + break; + case 4: + message.upperBound = reader.double(); break; default: reader.skipType(tag & 7); @@ -19548,380 +19946,722 @@ }; /** - * Decodes a Part message from the specified reader or buffer, length delimited. + * Decodes a ConfidenceInterval message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part} Part + * @returns {google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval} ConfidenceInterval * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Part.decodeDelimited = function decodeDelimited(reader) { + ConfidenceInterval.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Part message. + * Verifies a ConfidenceInterval message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Part.verify = function verify(message) { + ConfidenceInterval.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.text != null && message.hasOwnProperty("text")) - if (!$util.isString(message.text)) - return "text: string expected"; - if (message.parameterId != null && message.hasOwnProperty("parameterId")) - if (!$util.isString(message.parameterId)) - return "parameterId: string expected"; + if (message.confidenceLevel != null && message.hasOwnProperty("confidenceLevel")) + if (typeof message.confidenceLevel !== "number") + return "confidenceLevel: number expected"; + if (message.ratio != null && message.hasOwnProperty("ratio")) + if (typeof message.ratio !== "number") + return "ratio: number expected"; + if (message.lowerBound != null && message.hasOwnProperty("lowerBound")) + if (typeof message.lowerBound !== "number") + return "lowerBound: number expected"; + if (message.upperBound != null && message.hasOwnProperty("upperBound")) + if (typeof message.upperBound !== "number") + return "upperBound: number expected"; return null; }; /** - * Creates a Part message from a plain object. Also converts values to their respective internal types. + * Creates a ConfidenceInterval message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part} Part + * @returns {google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval} ConfidenceInterval */ - Part.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part) + ConfidenceInterval.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part(); - if (object.text != null) - message.text = String(object.text); - if (object.parameterId != null) - message.parameterId = String(object.parameterId); + var message = new $root.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval(); + if (object.confidenceLevel != null) + message.confidenceLevel = Number(object.confidenceLevel); + if (object.ratio != null) + message.ratio = Number(object.ratio); + if (object.lowerBound != null) + message.lowerBound = Number(object.lowerBound); + if (object.upperBound != null) + message.upperBound = Number(object.upperBound); return message; }; /** - * Creates a plain object from a Part message. Also converts values to other types if specified. + * Creates a plain object from a ConfidenceInterval message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval * @static - * @param {google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part} message Part + * @param {google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval} message ConfidenceInterval * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Part.toObject = function toObject(message, options) { + ConfidenceInterval.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.text = ""; - object.parameterId = ""; + object.confidenceLevel = 0; + object.ratio = 0; + object.lowerBound = 0; + object.upperBound = 0; } - if (message.text != null && message.hasOwnProperty("text")) - object.text = message.text; - if (message.parameterId != null && message.hasOwnProperty("parameterId")) - object.parameterId = message.parameterId; + if (message.confidenceLevel != null && message.hasOwnProperty("confidenceLevel")) + object.confidenceLevel = options.json && !isFinite(message.confidenceLevel) ? String(message.confidenceLevel) : message.confidenceLevel; + if (message.ratio != null && message.hasOwnProperty("ratio")) + object.ratio = options.json && !isFinite(message.ratio) ? String(message.ratio) : message.ratio; + if (message.lowerBound != null && message.hasOwnProperty("lowerBound")) + object.lowerBound = options.json && !isFinite(message.lowerBound) ? String(message.lowerBound) : message.lowerBound; + if (message.upperBound != null && message.hasOwnProperty("upperBound")) + object.upperBound = options.json && !isFinite(message.upperBound) ? String(message.upperBound) : message.upperBound; return object; }; /** - * Converts this Part to JSON. + * Converts this ConfidenceInterval to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval * @instance * @returns {Object.} JSON object */ - Part.prototype.toJSON = function toJSON() { + ConfidenceInterval.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Part; + return ConfidenceInterval; })(); - return TrainingPhrase; - })(); + Result.Metric = (function() { - Intent.Parameter = (function() { + /** + * Properties of a Metric. + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result + * @interface IMetric + * @property {google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType|null} [type] Metric type + * @property {number|null} [ratio] Metric ratio + * @property {google.cloud.dialogflow.cx.v3.Experiment.Result.IConfidenceInterval|null} [confidenceInterval] Metric confidenceInterval + */ - /** - * Properties of a Parameter. - * @memberof google.cloud.dialogflow.cx.v3.Intent - * @interface IParameter - * @property {string|null} [id] Parameter id - * @property {string|null} [entityType] Parameter entityType - * @property {boolean|null} [isList] Parameter isList - * @property {boolean|null} [redact] Parameter redact - */ + /** + * Constructs a new Metric. + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result + * @classdesc Represents a Metric. + * @implements IMetric + * @constructor + * @param {google.cloud.dialogflow.cx.v3.Experiment.Result.IMetric=} [properties] Properties to set + */ + function Metric(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Constructs a new Parameter. - * @memberof google.cloud.dialogflow.cx.v3.Intent - * @classdesc Represents a Parameter. - * @implements IParameter - * @constructor - * @param {google.cloud.dialogflow.cx.v3.Intent.IParameter=} [properties] Properties to set - */ - function Parameter(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Metric type. + * @member {google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType} type + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.Metric + * @instance + */ + Metric.prototype.type = 0; - /** - * Parameter id. - * @member {string} id - * @memberof google.cloud.dialogflow.cx.v3.Intent.Parameter - * @instance - */ - Parameter.prototype.id = ""; + /** + * Metric ratio. + * @member {number} ratio + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.Metric + * @instance + */ + Metric.prototype.ratio = 0; - /** - * Parameter entityType. - * @member {string} entityType - * @memberof google.cloud.dialogflow.cx.v3.Intent.Parameter - * @instance - */ - Parameter.prototype.entityType = ""; + /** + * Metric confidenceInterval. + * @member {google.cloud.dialogflow.cx.v3.Experiment.Result.IConfidenceInterval|null|undefined} confidenceInterval + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.Metric + * @instance + */ + Metric.prototype.confidenceInterval = null; - /** - * Parameter isList. - * @member {boolean} isList - * @memberof google.cloud.dialogflow.cx.v3.Intent.Parameter - * @instance - */ - Parameter.prototype.isList = false; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * Parameter redact. - * @member {boolean} redact - * @memberof google.cloud.dialogflow.cx.v3.Intent.Parameter - * @instance - */ - Parameter.prototype.redact = false; + /** + * Metric value. + * @member {"ratio"|undefined} value + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.Metric + * @instance + */ + Object.defineProperty(Metric.prototype, "value", { + get: $util.oneOfGetter($oneOfFields = ["ratio"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Creates a new Parameter instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.Intent.Parameter - * @static - * @param {google.cloud.dialogflow.cx.v3.Intent.IParameter=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.Intent.Parameter} Parameter instance - */ - Parameter.create = function create(properties) { - return new Parameter(properties); - }; + /** + * Creates a new Metric instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.Metric + * @static + * @param {google.cloud.dialogflow.cx.v3.Experiment.Result.IMetric=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Experiment.Result.Metric} Metric instance + */ + Metric.create = function create(properties) { + return new Metric(properties); + }; - /** - * Encodes the specified Parameter message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Intent.Parameter.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.Intent.Parameter - * @static - * @param {google.cloud.dialogflow.cx.v3.Intent.IParameter} message Parameter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Parameter.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); - if (message.entityType != null && Object.hasOwnProperty.call(message, "entityType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.entityType); - if (message.isList != null && Object.hasOwnProperty.call(message, "isList")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.isList); - if (message.redact != null && Object.hasOwnProperty.call(message, "redact")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.redact); - return writer; - }; + /** + * Encodes the specified Metric message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Experiment.Result.Metric.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.Metric + * @static + * @param {google.cloud.dialogflow.cx.v3.Experiment.Result.IMetric} message Metric message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Metric.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); + if (message.ratio != null && Object.hasOwnProperty.call(message, "ratio")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.ratio); + if (message.confidenceInterval != null && Object.hasOwnProperty.call(message, "confidenceInterval")) + $root.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval.encode(message.confidenceInterval, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; - /** - * Encodes the specified Parameter message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Intent.Parameter.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Intent.Parameter - * @static - * @param {google.cloud.dialogflow.cx.v3.Intent.IParameter} message Parameter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Parameter.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified Metric message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Experiment.Result.Metric.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.Metric + * @static + * @param {google.cloud.dialogflow.cx.v3.Experiment.Result.IMetric} message Metric message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Metric.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a Parameter message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.Intent.Parameter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.Intent.Parameter} Parameter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Parameter.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.Intent.Parameter(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.id = reader.string(); - break; - case 2: - message.entityType = reader.string(); - break; - case 3: - message.isList = reader.bool(); - break; - case 4: - message.redact = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; + /** + * Decodes a Metric message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.Metric + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3.Experiment.Result.Metric} Metric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Metric.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type = reader.int32(); + break; + case 2: + message.ratio = reader.double(); + break; + case 3: + message.confidenceInterval = $root.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } } - } - return message; - }; - - /** - * Decodes a Parameter message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Intent.Parameter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.Intent.Parameter} Parameter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Parameter.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + return message; + }; - /** - * Verifies a Parameter message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.Intent.Parameter - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Parameter.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isString(message.id)) - return "id: string expected"; - if (message.entityType != null && message.hasOwnProperty("entityType")) - if (!$util.isString(message.entityType)) - return "entityType: string expected"; - if (message.isList != null && message.hasOwnProperty("isList")) - if (typeof message.isList !== "boolean") - return "isList: boolean expected"; - if (message.redact != null && message.hasOwnProperty("redact")) - if (typeof message.redact !== "boolean") - return "redact: boolean expected"; - return null; - }; + /** + * Decodes a Metric message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.Metric + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.Experiment.Result.Metric} Metric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Metric.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a Parameter message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.Intent.Parameter - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.Intent.Parameter} Parameter - */ - Parameter.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.Intent.Parameter) + /** + * Verifies a Metric message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.Metric + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Metric.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.ratio != null && message.hasOwnProperty("ratio")) { + properties.value = 1; + if (typeof message.ratio !== "number") + return "ratio: number expected"; + } + if (message.confidenceInterval != null && message.hasOwnProperty("confidenceInterval")) { + var error = $root.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval.verify(message.confidenceInterval); + if (error) + return "confidenceInterval." + error; + } + return null; + }; + + /** + * Creates a Metric message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.Metric + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.Experiment.Result.Metric} Metric + */ + Metric.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric(); + switch (object.type) { + case "METRIC_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "CONTAINED_SESSION_NO_CALLBACK_RATE": + case 1: + message.type = 1; + break; + case "LIVE_AGENT_HANDOFF_RATE": + case 2: + message.type = 2; + break; + case "CALLBACK_SESSION_RATE": + case 3: + message.type = 3; + break; + case "ABANDONED_SESSION_RATE": + case 4: + message.type = 4; + break; + case "SESSION_END_RATE": + case 5: + message.type = 5; + break; + } + if (object.ratio != null) + message.ratio = Number(object.ratio); + if (object.confidenceInterval != null) { + if (typeof object.confidenceInterval !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Experiment.Result.Metric.confidenceInterval: object expected"); + message.confidenceInterval = $root.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval.fromObject(object.confidenceInterval); + } + return message; + }; + + /** + * Creates a plain object from a Metric message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.Metric + * @static + * @param {google.cloud.dialogflow.cx.v3.Experiment.Result.Metric} message Metric + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Metric.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = options.enums === String ? "METRIC_UNSPECIFIED" : 0; + object.confidenceInterval = null; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType[message.type] : message.type; + if (message.ratio != null && message.hasOwnProperty("ratio")) { + object.ratio = options.json && !isFinite(message.ratio) ? String(message.ratio) : message.ratio; + if (options.oneofs) + object.value = "ratio"; + } + if (message.confidenceInterval != null && message.hasOwnProperty("confidenceInterval")) + object.confidenceInterval = $root.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval.toObject(message.confidenceInterval, options); return object; - var message = new $root.google.cloud.dialogflow.cx.v3.Intent.Parameter(); - if (object.id != null) - message.id = String(object.id); - if (object.entityType != null) - message.entityType = String(object.entityType); - if (object.isList != null) - message.isList = Boolean(object.isList); - if (object.redact != null) - message.redact = Boolean(object.redact); - return message; - }; + }; - /** - * Creates a plain object from a Parameter message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.Intent.Parameter - * @static - * @param {google.cloud.dialogflow.cx.v3.Intent.Parameter} message Parameter - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Parameter.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.id = ""; - object.entityType = ""; - object.isList = false; - object.redact = false; + /** + * Converts this Metric to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.Metric + * @instance + * @returns {Object.} JSON object + */ + Metric.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Metric; + })(); + + Result.VersionMetrics = (function() { + + /** + * Properties of a VersionMetrics. + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result + * @interface IVersionMetrics + * @property {string|null} [version] VersionMetrics version + * @property {Array.|null} [metrics] VersionMetrics metrics + * @property {number|null} [sessionCount] VersionMetrics sessionCount + */ + + /** + * Constructs a new VersionMetrics. + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result + * @classdesc Represents a VersionMetrics. + * @implements IVersionMetrics + * @constructor + * @param {google.cloud.dialogflow.cx.v3.Experiment.Result.IVersionMetrics=} [properties] Properties to set + */ + function VersionMetrics(properties) { + this.metrics = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; - if (message.entityType != null && message.hasOwnProperty("entityType")) - object.entityType = message.entityType; - if (message.isList != null && message.hasOwnProperty("isList")) - object.isList = message.isList; - if (message.redact != null && message.hasOwnProperty("redact")) - object.redact = message.redact; - return object; - }; + + /** + * VersionMetrics version. + * @member {string} version + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics + * @instance + */ + VersionMetrics.prototype.version = ""; + + /** + * VersionMetrics metrics. + * @member {Array.} metrics + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics + * @instance + */ + VersionMetrics.prototype.metrics = $util.emptyArray; + + /** + * VersionMetrics sessionCount. + * @member {number} sessionCount + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics + * @instance + */ + VersionMetrics.prototype.sessionCount = 0; + + /** + * Creates a new VersionMetrics instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics + * @static + * @param {google.cloud.dialogflow.cx.v3.Experiment.Result.IVersionMetrics=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics} VersionMetrics instance + */ + VersionMetrics.create = function create(properties) { + return new VersionMetrics(properties); + }; + + /** + * Encodes the specified VersionMetrics message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics + * @static + * @param {google.cloud.dialogflow.cx.v3.Experiment.Result.IVersionMetrics} message VersionMetrics message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VersionMetrics.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); + if (message.metrics != null && message.metrics.length) + for (var i = 0; i < message.metrics.length; ++i) + $root.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric.encode(message.metrics[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.sessionCount != null && Object.hasOwnProperty.call(message, "sessionCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.sessionCount); + return writer; + }; + + /** + * Encodes the specified VersionMetrics message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics + * @static + * @param {google.cloud.dialogflow.cx.v3.Experiment.Result.IVersionMetrics} message VersionMetrics message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VersionMetrics.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VersionMetrics message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics} VersionMetrics + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VersionMetrics.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.version = reader.string(); + break; + case 2: + if (!(message.metrics && message.metrics.length)) + message.metrics = []; + message.metrics.push($root.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric.decode(reader, reader.uint32())); + break; + case 3: + message.sessionCount = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VersionMetrics message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics} VersionMetrics + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VersionMetrics.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VersionMetrics message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VersionMetrics.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.metrics != null && message.hasOwnProperty("metrics")) { + if (!Array.isArray(message.metrics)) + return "metrics: array expected"; + for (var i = 0; i < message.metrics.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric.verify(message.metrics[i]); + if (error) + return "metrics." + error; + } + } + if (message.sessionCount != null && message.hasOwnProperty("sessionCount")) + if (!$util.isInteger(message.sessionCount)) + return "sessionCount: integer expected"; + return null; + }; + + /** + * Creates a VersionMetrics message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics} VersionMetrics + */ + VersionMetrics.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics(); + if (object.version != null) + message.version = String(object.version); + if (object.metrics) { + if (!Array.isArray(object.metrics)) + throw TypeError(".google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics.metrics: array expected"); + message.metrics = []; + for (var i = 0; i < object.metrics.length; ++i) { + if (typeof object.metrics[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics.metrics: object expected"); + message.metrics[i] = $root.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric.fromObject(object.metrics[i]); + } + } + if (object.sessionCount != null) + message.sessionCount = object.sessionCount | 0; + return message; + }; + + /** + * Creates a plain object from a VersionMetrics message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics + * @static + * @param {google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics} message VersionMetrics + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VersionMetrics.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.metrics = []; + if (options.defaults) { + object.version = ""; + object.sessionCount = 0; + } + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.metrics && message.metrics.length) { + object.metrics = []; + for (var j = 0; j < message.metrics.length; ++j) + object.metrics[j] = $root.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric.toObject(message.metrics[j], options); + } + if (message.sessionCount != null && message.hasOwnProperty("sessionCount")) + object.sessionCount = message.sessionCount; + return object; + }; + + /** + * Converts this VersionMetrics to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics + * @instance + * @returns {Object.} JSON object + */ + VersionMetrics.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return VersionMetrics; + })(); /** - * Converts this Parameter to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.Intent.Parameter - * @instance - * @returns {Object.} JSON object - */ - Parameter.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + * MetricType enum. + * @name google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType + * @enum {number} + * @property {number} METRIC_UNSPECIFIED=0 METRIC_UNSPECIFIED value + * @property {number} CONTAINED_SESSION_NO_CALLBACK_RATE=1 CONTAINED_SESSION_NO_CALLBACK_RATE value + * @property {number} LIVE_AGENT_HANDOFF_RATE=2 LIVE_AGENT_HANDOFF_RATE value + * @property {number} CALLBACK_SESSION_RATE=3 CALLBACK_SESSION_RATE value + * @property {number} ABANDONED_SESSION_RATE=4 ABANDONED_SESSION_RATE value + * @property {number} SESSION_END_RATE=5 SESSION_END_RATE value + */ + Result.MetricType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "METRIC_UNSPECIFIED"] = 0; + values[valuesById[1] = "CONTAINED_SESSION_NO_CALLBACK_RATE"] = 1; + values[valuesById[2] = "LIVE_AGENT_HANDOFF_RATE"] = 2; + values[valuesById[3] = "CALLBACK_SESSION_RATE"] = 3; + values[valuesById[4] = "ABANDONED_SESSION_RATE"] = 4; + values[valuesById[5] = "SESSION_END_RATE"] = 5; + return values; + })(); - return Parameter; + return Result; })(); - return Intent; + /** + * State enum. + * @name google.cloud.dialogflow.cx.v3.Experiment.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} DRAFT=1 DRAFT value + * @property {number} RUNNING=2 RUNNING value + * @property {number} DONE=3 DONE value + */ + Experiment.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DRAFT"] = 1; + values[valuesById[2] = "RUNNING"] = 2; + values[valuesById[3] = "DONE"] = 3; + return values; + })(); + + return Experiment; })(); - v3.ListIntentsRequest = (function() { + v3.VersionVariants = (function() { /** - * Properties of a ListIntentsRequest. + * Properties of a VersionVariants. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IListIntentsRequest - * @property {string|null} [parent] ListIntentsRequest parent - * @property {string|null} [languageCode] ListIntentsRequest languageCode - * @property {google.cloud.dialogflow.cx.v3.IntentView|null} [intentView] ListIntentsRequest intentView - * @property {number|null} [pageSize] ListIntentsRequest pageSize - * @property {string|null} [pageToken] ListIntentsRequest pageToken + * @interface IVersionVariants + * @property {Array.|null} [variants] VersionVariants variants */ /** - * Constructs a new ListIntentsRequest. + * Constructs a new VersionVariants. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a ListIntentsRequest. - * @implements IListIntentsRequest + * @classdesc Represents a VersionVariants. + * @implements IVersionVariants * @constructor - * @param {google.cloud.dialogflow.cx.v3.IListIntentsRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IVersionVariants=} [properties] Properties to set */ - function ListIntentsRequest(properties) { + function VersionVariants(properties) { + this.variants = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -19929,127 +20669,78 @@ } /** - * ListIntentsRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3.ListIntentsRequest - * @instance - */ - ListIntentsRequest.prototype.parent = ""; - - /** - * ListIntentsRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3.ListIntentsRequest - * @instance - */ - ListIntentsRequest.prototype.languageCode = ""; - - /** - * ListIntentsRequest intentView. - * @member {google.cloud.dialogflow.cx.v3.IntentView} intentView - * @memberof google.cloud.dialogflow.cx.v3.ListIntentsRequest - * @instance - */ - ListIntentsRequest.prototype.intentView = 0; - - /** - * ListIntentsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dialogflow.cx.v3.ListIntentsRequest - * @instance - */ - ListIntentsRequest.prototype.pageSize = 0; - - /** - * ListIntentsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dialogflow.cx.v3.ListIntentsRequest + * VersionVariants variants. + * @member {Array.} variants + * @memberof google.cloud.dialogflow.cx.v3.VersionVariants * @instance */ - ListIntentsRequest.prototype.pageToken = ""; + VersionVariants.prototype.variants = $util.emptyArray; /** - * Creates a new ListIntentsRequest instance using the specified properties. + * Creates a new VersionVariants instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.ListIntentsRequest + * @memberof google.cloud.dialogflow.cx.v3.VersionVariants * @static - * @param {google.cloud.dialogflow.cx.v3.IListIntentsRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ListIntentsRequest} ListIntentsRequest instance + * @param {google.cloud.dialogflow.cx.v3.IVersionVariants=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.VersionVariants} VersionVariants instance */ - ListIntentsRequest.create = function create(properties) { - return new ListIntentsRequest(properties); + VersionVariants.create = function create(properties) { + return new VersionVariants(properties); }; /** - * Encodes the specified ListIntentsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListIntentsRequest.verify|verify} messages. + * Encodes the specified VersionVariants message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.VersionVariants.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ListIntentsRequest + * @memberof google.cloud.dialogflow.cx.v3.VersionVariants * @static - * @param {google.cloud.dialogflow.cx.v3.IListIntentsRequest} message ListIntentsRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IVersionVariants} message VersionVariants message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListIntentsRequest.encode = function encode(message, writer) { + VersionVariants.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); - if (message.intentView != null && Object.hasOwnProperty.call(message, "intentView")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.intentView); + if (message.variants != null && message.variants.length) + for (var i = 0; i < message.variants.length; ++i) + $root.google.cloud.dialogflow.cx.v3.VersionVariants.Variant.encode(message.variants[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListIntentsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListIntentsRequest.verify|verify} messages. + * Encodes the specified VersionVariants message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.VersionVariants.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListIntentsRequest + * @memberof google.cloud.dialogflow.cx.v3.VersionVariants * @static - * @param {google.cloud.dialogflow.cx.v3.IListIntentsRequest} message ListIntentsRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IVersionVariants} message VersionVariants message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListIntentsRequest.encodeDelimited = function encodeDelimited(message, writer) { + VersionVariants.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListIntentsRequest message from the specified reader or buffer. + * Decodes a VersionVariants message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ListIntentsRequest + * @memberof google.cloud.dialogflow.cx.v3.VersionVariants * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.ListIntentsRequest} ListIntentsRequest + * @returns {google.cloud.dialogflow.cx.v3.VersionVariants} VersionVariants * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListIntentsRequest.decode = function decode(reader, length) { + VersionVariants.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ListIntentsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.VersionVariants(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); - break; - case 2: - message.languageCode = reader.string(); - break; - case 5: - message.intentView = reader.int32(); - break; - case 3: - message.pageSize = reader.int32(); - break; - case 4: - message.pageToken = reader.string(); + if (!(message.variants && message.variants.length)) + message.variants = []; + message.variants.push($root.google.cloud.dialogflow.cx.v3.VersionVariants.Variant.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -20060,160 +20751,357 @@ }; /** - * Decodes a ListIntentsRequest message from the specified reader or buffer, length delimited. + * Decodes a VersionVariants message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListIntentsRequest + * @memberof google.cloud.dialogflow.cx.v3.VersionVariants * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ListIntentsRequest} ListIntentsRequest + * @returns {google.cloud.dialogflow.cx.v3.VersionVariants} VersionVariants * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListIntentsRequest.decodeDelimited = function decodeDelimited(reader) { + VersionVariants.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListIntentsRequest message. + * Verifies a VersionVariants message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ListIntentsRequest + * @memberof google.cloud.dialogflow.cx.v3.VersionVariants * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListIntentsRequest.verify = function verify(message) { + VersionVariants.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; - if (message.intentView != null && message.hasOwnProperty("intentView")) - switch (message.intentView) { - default: - return "intentView: enum value expected"; - case 0: - case 1: - case 2: - break; + if (message.variants != null && message.hasOwnProperty("variants")) { + if (!Array.isArray(message.variants)) + return "variants: array expected"; + for (var i = 0; i < message.variants.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.VersionVariants.Variant.verify(message.variants[i]); + if (error) + return "variants." + error; } - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; + } return null; }; /** - * Creates a ListIntentsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a VersionVariants message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ListIntentsRequest + * @memberof google.cloud.dialogflow.cx.v3.VersionVariants * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ListIntentsRequest} ListIntentsRequest + * @returns {google.cloud.dialogflow.cx.v3.VersionVariants} VersionVariants */ - ListIntentsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListIntentsRequest) + VersionVariants.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.VersionVariants) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.ListIntentsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.languageCode != null) - message.languageCode = String(object.languageCode); - switch (object.intentView) { - case "INTENT_VIEW_UNSPECIFIED": - case 0: - message.intentView = 0; - break; - case "INTENT_VIEW_PARTIAL": - case 1: - message.intentView = 1; - break; - case "INTENT_VIEW_FULL": - case 2: - message.intentView = 2; - break; + var message = new $root.google.cloud.dialogflow.cx.v3.VersionVariants(); + if (object.variants) { + if (!Array.isArray(object.variants)) + throw TypeError(".google.cloud.dialogflow.cx.v3.VersionVariants.variants: array expected"); + message.variants = []; + for (var i = 0; i < object.variants.length; ++i) { + if (typeof object.variants[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.VersionVariants.variants: object expected"); + message.variants[i] = $root.google.cloud.dialogflow.cx.v3.VersionVariants.Variant.fromObject(object.variants[i]); + } } - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); return message; }; /** - * Creates a plain object from a ListIntentsRequest message. Also converts values to other types if specified. + * Creates a plain object from a VersionVariants message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ListIntentsRequest + * @memberof google.cloud.dialogflow.cx.v3.VersionVariants * @static - * @param {google.cloud.dialogflow.cx.v3.ListIntentsRequest} message ListIntentsRequest + * @param {google.cloud.dialogflow.cx.v3.VersionVariants} message VersionVariants * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListIntentsRequest.toObject = function toObject(message, options) { + VersionVariants.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.languageCode = ""; - object.pageSize = 0; - object.pageToken = ""; - object.intentView = options.enums === String ? "INTENT_VIEW_UNSPECIFIED" : 0; + if (options.arrays || options.defaults) + object.variants = []; + if (message.variants && message.variants.length) { + object.variants = []; + for (var j = 0; j < message.variants.length; ++j) + object.variants[j] = $root.google.cloud.dialogflow.cx.v3.VersionVariants.Variant.toObject(message.variants[j], options); } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.intentView != null && message.hasOwnProperty("intentView")) - object.intentView = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.IntentView[message.intentView] : message.intentView; return object; }; /** - * Converts this ListIntentsRequest to JSON. + * Converts this VersionVariants to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ListIntentsRequest + * @memberof google.cloud.dialogflow.cx.v3.VersionVariants * @instance * @returns {Object.} JSON object */ - ListIntentsRequest.prototype.toJSON = function toJSON() { + VersionVariants.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListIntentsRequest; - })(); + VersionVariants.Variant = (function() { - v3.ListIntentsResponse = (function() { + /** + * Properties of a Variant. + * @memberof google.cloud.dialogflow.cx.v3.VersionVariants + * @interface IVariant + * @property {string|null} [version] Variant version + * @property {number|null} [trafficAllocation] Variant trafficAllocation + * @property {boolean|null} [isControlGroup] Variant isControlGroup + */ - /** - * Properties of a ListIntentsResponse. - * @memberof google.cloud.dialogflow.cx.v3 - * @interface IListIntentsResponse - * @property {Array.|null} [intents] ListIntentsResponse intents - * @property {string|null} [nextPageToken] ListIntentsResponse nextPageToken - */ + /** + * Constructs a new Variant. + * @memberof google.cloud.dialogflow.cx.v3.VersionVariants + * @classdesc Represents a Variant. + * @implements IVariant + * @constructor + * @param {google.cloud.dialogflow.cx.v3.VersionVariants.IVariant=} [properties] Properties to set + */ + function Variant(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Constructs a new ListIntentsResponse. - * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a ListIntentsResponse. - * @implements IListIntentsResponse - * @constructor - * @param {google.cloud.dialogflow.cx.v3.IListIntentsResponse=} [properties] Properties to set + /** + * Variant version. + * @member {string} version + * @memberof google.cloud.dialogflow.cx.v3.VersionVariants.Variant + * @instance + */ + Variant.prototype.version = ""; + + /** + * Variant trafficAllocation. + * @member {number} trafficAllocation + * @memberof google.cloud.dialogflow.cx.v3.VersionVariants.Variant + * @instance + */ + Variant.prototype.trafficAllocation = 0; + + /** + * Variant isControlGroup. + * @member {boolean} isControlGroup + * @memberof google.cloud.dialogflow.cx.v3.VersionVariants.Variant + * @instance + */ + Variant.prototype.isControlGroup = false; + + /** + * Creates a new Variant instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.VersionVariants.Variant + * @static + * @param {google.cloud.dialogflow.cx.v3.VersionVariants.IVariant=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.VersionVariants.Variant} Variant instance + */ + Variant.create = function create(properties) { + return new Variant(properties); + }; + + /** + * Encodes the specified Variant message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.VersionVariants.Variant.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.VersionVariants.Variant + * @static + * @param {google.cloud.dialogflow.cx.v3.VersionVariants.IVariant} message Variant message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Variant.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); + if (message.trafficAllocation != null && Object.hasOwnProperty.call(message, "trafficAllocation")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.trafficAllocation); + if (message.isControlGroup != null && Object.hasOwnProperty.call(message, "isControlGroup")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.isControlGroup); + return writer; + }; + + /** + * Encodes the specified Variant message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.VersionVariants.Variant.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.VersionVariants.Variant + * @static + * @param {google.cloud.dialogflow.cx.v3.VersionVariants.IVariant} message Variant message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Variant.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Variant message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.VersionVariants.Variant + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3.VersionVariants.Variant} Variant + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Variant.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.VersionVariants.Variant(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.version = reader.string(); + break; + case 2: + message.trafficAllocation = reader.float(); + break; + case 3: + message.isControlGroup = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Variant message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.VersionVariants.Variant + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.VersionVariants.Variant} Variant + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Variant.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Variant message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.VersionVariants.Variant + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Variant.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.trafficAllocation != null && message.hasOwnProperty("trafficAllocation")) + if (typeof message.trafficAllocation !== "number") + return "trafficAllocation: number expected"; + if (message.isControlGroup != null && message.hasOwnProperty("isControlGroup")) + if (typeof message.isControlGroup !== "boolean") + return "isControlGroup: boolean expected"; + return null; + }; + + /** + * Creates a Variant message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.VersionVariants.Variant + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.VersionVariants.Variant} Variant + */ + Variant.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.VersionVariants.Variant) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.VersionVariants.Variant(); + if (object.version != null) + message.version = String(object.version); + if (object.trafficAllocation != null) + message.trafficAllocation = Number(object.trafficAllocation); + if (object.isControlGroup != null) + message.isControlGroup = Boolean(object.isControlGroup); + return message; + }; + + /** + * Creates a plain object from a Variant message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.VersionVariants.Variant + * @static + * @param {google.cloud.dialogflow.cx.v3.VersionVariants.Variant} message Variant + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Variant.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.version = ""; + object.trafficAllocation = 0; + object.isControlGroup = false; + } + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.trafficAllocation != null && message.hasOwnProperty("trafficAllocation")) + object.trafficAllocation = options.json && !isFinite(message.trafficAllocation) ? String(message.trafficAllocation) : message.trafficAllocation; + if (message.isControlGroup != null && message.hasOwnProperty("isControlGroup")) + object.isControlGroup = message.isControlGroup; + return object; + }; + + /** + * Converts this Variant to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.VersionVariants.Variant + * @instance + * @returns {Object.} JSON object + */ + Variant.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Variant; + })(); + + return VersionVariants; + })(); + + v3.VariantsHistory = (function() { + + /** + * Properties of a VariantsHistory. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IVariantsHistory + * @property {google.cloud.dialogflow.cx.v3.IVersionVariants|null} [versionVariants] VariantsHistory versionVariants + * @property {google.protobuf.ITimestamp|null} [updateTime] VariantsHistory updateTime */ - function ListIntentsResponse(properties) { - this.intents = []; + + /** + * Constructs a new VariantsHistory. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a VariantsHistory. + * @implements IVariantsHistory + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IVariantsHistory=} [properties] Properties to set + */ + function VariantsHistory(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -20221,91 +21109,102 @@ } /** - * ListIntentsResponse intents. - * @member {Array.} intents - * @memberof google.cloud.dialogflow.cx.v3.ListIntentsResponse + * VariantsHistory versionVariants. + * @member {google.cloud.dialogflow.cx.v3.IVersionVariants|null|undefined} versionVariants + * @memberof google.cloud.dialogflow.cx.v3.VariantsHistory * @instance */ - ListIntentsResponse.prototype.intents = $util.emptyArray; + VariantsHistory.prototype.versionVariants = null; /** - * ListIntentsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dialogflow.cx.v3.ListIntentsResponse + * VariantsHistory updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dialogflow.cx.v3.VariantsHistory * @instance */ - ListIntentsResponse.prototype.nextPageToken = ""; + VariantsHistory.prototype.updateTime = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * Creates a new ListIntentsResponse instance using the specified properties. + * VariantsHistory variants. + * @member {"versionVariants"|undefined} variants + * @memberof google.cloud.dialogflow.cx.v3.VariantsHistory + * @instance + */ + Object.defineProperty(VariantsHistory.prototype, "variants", { + get: $util.oneOfGetter($oneOfFields = ["versionVariants"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new VariantsHistory instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.ListIntentsResponse + * @memberof google.cloud.dialogflow.cx.v3.VariantsHistory * @static - * @param {google.cloud.dialogflow.cx.v3.IListIntentsResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ListIntentsResponse} ListIntentsResponse instance + * @param {google.cloud.dialogflow.cx.v3.IVariantsHistory=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.VariantsHistory} VariantsHistory instance */ - ListIntentsResponse.create = function create(properties) { - return new ListIntentsResponse(properties); + VariantsHistory.create = function create(properties) { + return new VariantsHistory(properties); }; /** - * Encodes the specified ListIntentsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListIntentsResponse.verify|verify} messages. + * Encodes the specified VariantsHistory message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.VariantsHistory.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ListIntentsResponse + * @memberof google.cloud.dialogflow.cx.v3.VariantsHistory * @static - * @param {google.cloud.dialogflow.cx.v3.IListIntentsResponse} message ListIntentsResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IVariantsHistory} message VariantsHistory message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListIntentsResponse.encode = function encode(message, writer) { + VariantsHistory.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.intents != null && message.intents.length) - for (var i = 0; i < message.intents.length; ++i) - $root.google.cloud.dialogflow.cx.v3.Intent.encode(message.intents[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.versionVariants != null && Object.hasOwnProperty.call(message, "versionVariants")) + $root.google.cloud.dialogflow.cx.v3.VersionVariants.encode(message.versionVariants, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListIntentsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListIntentsResponse.verify|verify} messages. + * Encodes the specified VariantsHistory message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.VariantsHistory.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListIntentsResponse + * @memberof google.cloud.dialogflow.cx.v3.VariantsHistory * @static - * @param {google.cloud.dialogflow.cx.v3.IListIntentsResponse} message ListIntentsResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IVariantsHistory} message VariantsHistory message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListIntentsResponse.encodeDelimited = function encodeDelimited(message, writer) { + VariantsHistory.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListIntentsResponse message from the specified reader or buffer. + * Decodes a VariantsHistory message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ListIntentsResponse + * @memberof google.cloud.dialogflow.cx.v3.VariantsHistory * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.ListIntentsResponse} ListIntentsResponse + * @returns {google.cloud.dialogflow.cx.v3.VariantsHistory} VariantsHistory * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListIntentsResponse.decode = function decode(reader, length) { + VariantsHistory.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ListIntentsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.VariantsHistory(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.intents && message.intents.length)) - message.intents = []; - message.intents.push($root.google.cloud.dialogflow.cx.v3.Intent.decode(reader, reader.uint32())); + message.versionVariants = $root.google.cloud.dialogflow.cx.v3.VersionVariants.decode(reader, reader.uint32()); break; case 2: - message.nextPageToken = reader.string(); + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -20316,134 +21215,133 @@ }; /** - * Decodes a ListIntentsResponse message from the specified reader or buffer, length delimited. + * Decodes a VariantsHistory message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListIntentsResponse + * @memberof google.cloud.dialogflow.cx.v3.VariantsHistory * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ListIntentsResponse} ListIntentsResponse + * @returns {google.cloud.dialogflow.cx.v3.VariantsHistory} VariantsHistory * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListIntentsResponse.decodeDelimited = function decodeDelimited(reader) { + VariantsHistory.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListIntentsResponse message. + * Verifies a VariantsHistory message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ListIntentsResponse + * @memberof google.cloud.dialogflow.cx.v3.VariantsHistory * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListIntentsResponse.verify = function verify(message) { + VariantsHistory.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.intents != null && message.hasOwnProperty("intents")) { - if (!Array.isArray(message.intents)) - return "intents: array expected"; - for (var i = 0; i < message.intents.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.Intent.verify(message.intents[i]); + var properties = {}; + if (message.versionVariants != null && message.hasOwnProperty("versionVariants")) { + properties.variants = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3.VersionVariants.verify(message.versionVariants); if (error) - return "intents." + error; + return "versionVariants." + error; } } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } return null; }; /** - * Creates a ListIntentsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a VariantsHistory message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ListIntentsResponse + * @memberof google.cloud.dialogflow.cx.v3.VariantsHistory * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ListIntentsResponse} ListIntentsResponse + * @returns {google.cloud.dialogflow.cx.v3.VariantsHistory} VariantsHistory */ - ListIntentsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListIntentsResponse) + VariantsHistory.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.VariantsHistory) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.ListIntentsResponse(); - if (object.intents) { - if (!Array.isArray(object.intents)) - throw TypeError(".google.cloud.dialogflow.cx.v3.ListIntentsResponse.intents: array expected"); - message.intents = []; - for (var i = 0; i < object.intents.length; ++i) { - if (typeof object.intents[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.ListIntentsResponse.intents: object expected"); - message.intents[i] = $root.google.cloud.dialogflow.cx.v3.Intent.fromObject(object.intents[i]); - } + var message = new $root.google.cloud.dialogflow.cx.v3.VariantsHistory(); + if (object.versionVariants != null) { + if (typeof object.versionVariants !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.VariantsHistory.versionVariants: object expected"); + message.versionVariants = $root.google.cloud.dialogflow.cx.v3.VersionVariants.fromObject(object.versionVariants); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.VariantsHistory.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a ListIntentsResponse message. Also converts values to other types if specified. + * Creates a plain object from a VariantsHistory message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ListIntentsResponse + * @memberof google.cloud.dialogflow.cx.v3.VariantsHistory * @static - * @param {google.cloud.dialogflow.cx.v3.ListIntentsResponse} message ListIntentsResponse + * @param {google.cloud.dialogflow.cx.v3.VariantsHistory} message VariantsHistory * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListIntentsResponse.toObject = function toObject(message, options) { + VariantsHistory.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.intents = []; if (options.defaults) - object.nextPageToken = ""; - if (message.intents && message.intents.length) { - object.intents = []; - for (var j = 0; j < message.intents.length; ++j) - object.intents[j] = $root.google.cloud.dialogflow.cx.v3.Intent.toObject(message.intents[j], options); + object.updateTime = null; + if (message.versionVariants != null && message.hasOwnProperty("versionVariants")) { + object.versionVariants = $root.google.cloud.dialogflow.cx.v3.VersionVariants.toObject(message.versionVariants, options); + if (options.oneofs) + object.variants = "versionVariants"; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); return object; }; /** - * Converts this ListIntentsResponse to JSON. + * Converts this VariantsHistory to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ListIntentsResponse + * @memberof google.cloud.dialogflow.cx.v3.VariantsHistory * @instance * @returns {Object.} JSON object */ - ListIntentsResponse.prototype.toJSON = function toJSON() { + VariantsHistory.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListIntentsResponse; + return VariantsHistory; })(); - v3.GetIntentRequest = (function() { + v3.ListExperimentsRequest = (function() { /** - * Properties of a GetIntentRequest. + * Properties of a ListExperimentsRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IGetIntentRequest - * @property {string|null} [name] GetIntentRequest name - * @property {string|null} [languageCode] GetIntentRequest languageCode + * @interface IListExperimentsRequest + * @property {string|null} [parent] ListExperimentsRequest parent + * @property {number|null} [pageSize] ListExperimentsRequest pageSize + * @property {string|null} [pageToken] ListExperimentsRequest pageToken */ /** - * Constructs a new GetIntentRequest. + * Constructs a new ListExperimentsRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a GetIntentRequest. - * @implements IGetIntentRequest + * @classdesc Represents a ListExperimentsRequest. + * @implements IListExperimentsRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IGetIntentRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IListExperimentsRequest=} [properties] Properties to set */ - function GetIntentRequest(properties) { + function ListExperimentsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -20451,88 +21349,101 @@ } /** - * GetIntentRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.GetIntentRequest + * ListExperimentsRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3.ListExperimentsRequest * @instance */ - GetIntentRequest.prototype.name = ""; + ListExperimentsRequest.prototype.parent = ""; /** - * GetIntentRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3.GetIntentRequest + * ListExperimentsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dialogflow.cx.v3.ListExperimentsRequest * @instance */ - GetIntentRequest.prototype.languageCode = ""; + ListExperimentsRequest.prototype.pageSize = 0; /** - * Creates a new GetIntentRequest instance using the specified properties. + * ListExperimentsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dialogflow.cx.v3.ListExperimentsRequest + * @instance + */ + ListExperimentsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListExperimentsRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.GetIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListExperimentsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IGetIntentRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.GetIntentRequest} GetIntentRequest instance + * @param {google.cloud.dialogflow.cx.v3.IListExperimentsRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ListExperimentsRequest} ListExperimentsRequest instance */ - GetIntentRequest.create = function create(properties) { - return new GetIntentRequest(properties); + ListExperimentsRequest.create = function create(properties) { + return new ListExperimentsRequest(properties); }; /** - * Encodes the specified GetIntentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetIntentRequest.verify|verify} messages. + * Encodes the specified ListExperimentsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListExperimentsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.GetIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListExperimentsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IGetIntentRequest} message GetIntentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListExperimentsRequest} message ListExperimentsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetIntentRequest.encode = function encode(message, writer) { + ListExperimentsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); return writer; }; /** - * Encodes the specified GetIntentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetIntentRequest.verify|verify} messages. + * Encodes the specified ListExperimentsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListExperimentsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.GetIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListExperimentsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IGetIntentRequest} message GetIntentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListExperimentsRequest} message ListExperimentsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetIntentRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListExperimentsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetIntentRequest message from the specified reader or buffer. + * Decodes a ListExperimentsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.GetIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListExperimentsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.GetIntentRequest} GetIntentRequest + * @returns {google.cloud.dialogflow.cx.v3.ListExperimentsRequest} ListExperimentsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetIntentRequest.decode = function decode(reader, length) { + ListExperimentsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.GetIntentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ListExperimentsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.parent = reader.string(); break; case 2: - message.languageCode = reader.string(); + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -20543,118 +21454,126 @@ }; /** - * Decodes a GetIntentRequest message from the specified reader or buffer, length delimited. + * Decodes a ListExperimentsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.GetIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListExperimentsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.GetIntentRequest} GetIntentRequest + * @returns {google.cloud.dialogflow.cx.v3.ListExperimentsRequest} ListExperimentsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetIntentRequest.decodeDelimited = function decodeDelimited(reader) { + ListExperimentsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetIntentRequest message. + * Verifies a ListExperimentsRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.GetIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListExperimentsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetIntentRequest.verify = function verify(message) { + ListExperimentsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; return null; }; /** - * Creates a GetIntentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListExperimentsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.GetIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListExperimentsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.GetIntentRequest} GetIntentRequest + * @returns {google.cloud.dialogflow.cx.v3.ListExperimentsRequest} ListExperimentsRequest */ - GetIntentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.GetIntentRequest) + ListExperimentsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListExperimentsRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.GetIntentRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.languageCode != null) - message.languageCode = String(object.languageCode); + var message = new $root.google.cloud.dialogflow.cx.v3.ListExperimentsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); return message; }; /** - * Creates a plain object from a GetIntentRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListExperimentsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.GetIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListExperimentsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.GetIntentRequest} message GetIntentRequest + * @param {google.cloud.dialogflow.cx.v3.ListExperimentsRequest} message ListExperimentsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetIntentRequest.toObject = function toObject(message, options) { + ListExperimentsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.languageCode = ""; + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; return object; }; /** - * Converts this GetIntentRequest to JSON. + * Converts this ListExperimentsRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.GetIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListExperimentsRequest * @instance * @returns {Object.} JSON object */ - GetIntentRequest.prototype.toJSON = function toJSON() { + ListExperimentsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetIntentRequest; + return ListExperimentsRequest; })(); - v3.CreateIntentRequest = (function() { + v3.ListExperimentsResponse = (function() { /** - * Properties of a CreateIntentRequest. + * Properties of a ListExperimentsResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @interface ICreateIntentRequest - * @property {string|null} [parent] CreateIntentRequest parent - * @property {google.cloud.dialogflow.cx.v3.IIntent|null} [intent] CreateIntentRequest intent - * @property {string|null} [languageCode] CreateIntentRequest languageCode + * @interface IListExperimentsResponse + * @property {Array.|null} [experiments] ListExperimentsResponse experiments + * @property {string|null} [nextPageToken] ListExperimentsResponse nextPageToken */ /** - * Constructs a new CreateIntentRequest. + * Constructs a new ListExperimentsResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a CreateIntentRequest. - * @implements ICreateIntentRequest + * @classdesc Represents a ListExperimentsResponse. + * @implements IListExperimentsResponse * @constructor - * @param {google.cloud.dialogflow.cx.v3.ICreateIntentRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IListExperimentsResponse=} [properties] Properties to set */ - function CreateIntentRequest(properties) { + function ListExperimentsResponse(properties) { + this.experiments = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -20662,101 +21581,91 @@ } /** - * CreateIntentRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3.CreateIntentRequest - * @instance - */ - CreateIntentRequest.prototype.parent = ""; - - /** - * CreateIntentRequest intent. - * @member {google.cloud.dialogflow.cx.v3.IIntent|null|undefined} intent - * @memberof google.cloud.dialogflow.cx.v3.CreateIntentRequest + * ListExperimentsResponse experiments. + * @member {Array.} experiments + * @memberof google.cloud.dialogflow.cx.v3.ListExperimentsResponse * @instance */ - CreateIntentRequest.prototype.intent = null; + ListExperimentsResponse.prototype.experiments = $util.emptyArray; /** - * CreateIntentRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3.CreateIntentRequest + * ListExperimentsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dialogflow.cx.v3.ListExperimentsResponse * @instance */ - CreateIntentRequest.prototype.languageCode = ""; + ListExperimentsResponse.prototype.nextPageToken = ""; /** - * Creates a new CreateIntentRequest instance using the specified properties. + * Creates a new ListExperimentsResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.CreateIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListExperimentsResponse * @static - * @param {google.cloud.dialogflow.cx.v3.ICreateIntentRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.CreateIntentRequest} CreateIntentRequest instance + * @param {google.cloud.dialogflow.cx.v3.IListExperimentsResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ListExperimentsResponse} ListExperimentsResponse instance */ - CreateIntentRequest.create = function create(properties) { - return new CreateIntentRequest(properties); + ListExperimentsResponse.create = function create(properties) { + return new ListExperimentsResponse(properties); }; /** - * Encodes the specified CreateIntentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateIntentRequest.verify|verify} messages. + * Encodes the specified ListExperimentsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListExperimentsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.CreateIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListExperimentsResponse * @static - * @param {google.cloud.dialogflow.cx.v3.ICreateIntentRequest} message CreateIntentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListExperimentsResponse} message ListExperimentsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateIntentRequest.encode = function encode(message, writer) { + ListExperimentsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.intent != null && Object.hasOwnProperty.call(message, "intent")) - $root.google.cloud.dialogflow.cx.v3.Intent.encode(message.intent, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.languageCode); + if (message.experiments != null && message.experiments.length) + for (var i = 0; i < message.experiments.length; ++i) + $root.google.cloud.dialogflow.cx.v3.Experiment.encode(message.experiments[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified CreateIntentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateIntentRequest.verify|verify} messages. + * Encodes the specified ListExperimentsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListExperimentsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.CreateIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListExperimentsResponse * @static - * @param {google.cloud.dialogflow.cx.v3.ICreateIntentRequest} message CreateIntentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListExperimentsResponse} message ListExperimentsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateIntentRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListExperimentsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateIntentRequest message from the specified reader or buffer. + * Decodes a ListExperimentsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.CreateIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListExperimentsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.CreateIntentRequest} CreateIntentRequest + * @returns {google.cloud.dialogflow.cx.v3.ListExperimentsResponse} ListExperimentsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateIntentRequest.decode = function decode(reader, length) { + ListExperimentsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.CreateIntentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ListExperimentsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); + if (!(message.experiments && message.experiments.length)) + message.experiments = []; + message.experiments.push($root.google.cloud.dialogflow.cx.v3.Experiment.decode(reader, reader.uint32())); break; case 2: - message.intent = $root.google.cloud.dialogflow.cx.v3.Intent.decode(reader, reader.uint32()); - break; - case 3: - message.languageCode = reader.string(); + message.nextPageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -20767,131 +21676,133 @@ }; /** - * Decodes a CreateIntentRequest message from the specified reader or buffer, length delimited. + * Decodes a ListExperimentsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.CreateIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListExperimentsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.CreateIntentRequest} CreateIntentRequest + * @returns {google.cloud.dialogflow.cx.v3.ListExperimentsResponse} ListExperimentsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateIntentRequest.decodeDelimited = function decodeDelimited(reader) { + ListExperimentsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateIntentRequest message. + * Verifies a ListExperimentsResponse message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.CreateIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListExperimentsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateIntentRequest.verify = function verify(message) { + ListExperimentsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.intent != null && message.hasOwnProperty("intent")) { - var error = $root.google.cloud.dialogflow.cx.v3.Intent.verify(message.intent); - if (error) - return "intent." + error; + if (message.experiments != null && message.hasOwnProperty("experiments")) { + if (!Array.isArray(message.experiments)) + return "experiments: array expected"; + for (var i = 0; i < message.experiments.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.Experiment.verify(message.experiments[i]); + if (error) + return "experiments." + error; + } } - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a CreateIntentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListExperimentsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.CreateIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListExperimentsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.CreateIntentRequest} CreateIntentRequest + * @returns {google.cloud.dialogflow.cx.v3.ListExperimentsResponse} ListExperimentsResponse */ - CreateIntentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.CreateIntentRequest) + ListExperimentsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListExperimentsResponse) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.CreateIntentRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.intent != null) { - if (typeof object.intent !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.CreateIntentRequest.intent: object expected"); - message.intent = $root.google.cloud.dialogflow.cx.v3.Intent.fromObject(object.intent); + var message = new $root.google.cloud.dialogflow.cx.v3.ListExperimentsResponse(); + if (object.experiments) { + if (!Array.isArray(object.experiments)) + throw TypeError(".google.cloud.dialogflow.cx.v3.ListExperimentsResponse.experiments: array expected"); + message.experiments = []; + for (var i = 0; i < object.experiments.length; ++i) { + if (typeof object.experiments[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.ListExperimentsResponse.experiments: object expected"); + message.experiments[i] = $root.google.cloud.dialogflow.cx.v3.Experiment.fromObject(object.experiments[i]); + } } - if (object.languageCode != null) - message.languageCode = String(object.languageCode); + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a CreateIntentRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListExperimentsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.CreateIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListExperimentsResponse * @static - * @param {google.cloud.dialogflow.cx.v3.CreateIntentRequest} message CreateIntentRequest + * @param {google.cloud.dialogflow.cx.v3.ListExperimentsResponse} message ListExperimentsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateIntentRequest.toObject = function toObject(message, options) { + ListExperimentsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.intent = null; - object.languageCode = ""; + if (options.arrays || options.defaults) + object.experiments = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.experiments && message.experiments.length) { + object.experiments = []; + for (var j = 0; j < message.experiments.length; ++j) + object.experiments[j] = $root.google.cloud.dialogflow.cx.v3.Experiment.toObject(message.experiments[j], options); } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.intent != null && message.hasOwnProperty("intent")) - object.intent = $root.google.cloud.dialogflow.cx.v3.Intent.toObject(message.intent, options); - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this CreateIntentRequest to JSON. + * Converts this ListExperimentsResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.CreateIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListExperimentsResponse * @instance * @returns {Object.} JSON object */ - CreateIntentRequest.prototype.toJSON = function toJSON() { + ListExperimentsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CreateIntentRequest; + return ListExperimentsResponse; })(); - v3.UpdateIntentRequest = (function() { + v3.GetExperimentRequest = (function() { /** - * Properties of an UpdateIntentRequest. + * Properties of a GetExperimentRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IUpdateIntentRequest - * @property {google.cloud.dialogflow.cx.v3.IIntent|null} [intent] UpdateIntentRequest intent - * @property {string|null} [languageCode] UpdateIntentRequest languageCode - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateIntentRequest updateMask + * @interface IGetExperimentRequest + * @property {string|null} [name] GetExperimentRequest name */ /** - * Constructs a new UpdateIntentRequest. + * Constructs a new GetExperimentRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents an UpdateIntentRequest. - * @implements IUpdateIntentRequest + * @classdesc Represents a GetExperimentRequest. + * @implements IGetExperimentRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IUpdateIntentRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IGetExperimentRequest=} [properties] Properties to set */ - function UpdateIntentRequest(properties) { + function GetExperimentRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -20899,101 +21810,75 @@ } /** - * UpdateIntentRequest intent. - * @member {google.cloud.dialogflow.cx.v3.IIntent|null|undefined} intent - * @memberof google.cloud.dialogflow.cx.v3.UpdateIntentRequest - * @instance - */ - UpdateIntentRequest.prototype.intent = null; - - /** - * UpdateIntentRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3.UpdateIntentRequest - * @instance - */ - UpdateIntentRequest.prototype.languageCode = ""; - - /** - * UpdateIntentRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.dialogflow.cx.v3.UpdateIntentRequest + * GetExperimentRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.GetExperimentRequest * @instance */ - UpdateIntentRequest.prototype.updateMask = null; + GetExperimentRequest.prototype.name = ""; /** - * Creates a new UpdateIntentRequest instance using the specified properties. + * Creates a new GetExperimentRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.UpdateIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.GetExperimentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IUpdateIntentRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.UpdateIntentRequest} UpdateIntentRequest instance + * @param {google.cloud.dialogflow.cx.v3.IGetExperimentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.GetExperimentRequest} GetExperimentRequest instance */ - UpdateIntentRequest.create = function create(properties) { - return new UpdateIntentRequest(properties); + GetExperimentRequest.create = function create(properties) { + return new GetExperimentRequest(properties); }; /** - * Encodes the specified UpdateIntentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateIntentRequest.verify|verify} messages. + * Encodes the specified GetExperimentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetExperimentRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.UpdateIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.GetExperimentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IUpdateIntentRequest} message UpdateIntentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IGetExperimentRequest} message GetExperimentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateIntentRequest.encode = function encode(message, writer) { + GetExperimentRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.intent != null && Object.hasOwnProperty.call(message, "intent")) - $root.google.cloud.dialogflow.cx.v3.Intent.encode(message.intent, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified UpdateIntentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateIntentRequest.verify|verify} messages. + * Encodes the specified GetExperimentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetExperimentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.UpdateIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.GetExperimentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IUpdateIntentRequest} message UpdateIntentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IGetExperimentRequest} message GetExperimentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateIntentRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetExperimentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateIntentRequest message from the specified reader or buffer. + * Decodes a GetExperimentRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.UpdateIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.GetExperimentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.UpdateIntentRequest} UpdateIntentRequest + * @returns {google.cloud.dialogflow.cx.v3.GetExperimentRequest} GetExperimentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateIntentRequest.decode = function decode(reader, length) { + GetExperimentRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.UpdateIntentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.GetExperimentRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.intent = $root.google.cloud.dialogflow.cx.v3.Intent.decode(reader, reader.uint32()); - break; - case 2: - message.languageCode = reader.string(); - break; - case 3: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -21004,134 +21889,108 @@ }; /** - * Decodes an UpdateIntentRequest message from the specified reader or buffer, length delimited. + * Decodes a GetExperimentRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.UpdateIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.GetExperimentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.UpdateIntentRequest} UpdateIntentRequest + * @returns {google.cloud.dialogflow.cx.v3.GetExperimentRequest} GetExperimentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateIntentRequest.decodeDelimited = function decodeDelimited(reader) { + GetExperimentRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateIntentRequest message. + * Verifies a GetExperimentRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.UpdateIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.GetExperimentRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateIntentRequest.verify = function verify(message) { + GetExperimentRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.intent != null && message.hasOwnProperty("intent")) { - var error = $root.google.cloud.dialogflow.cx.v3.Intent.verify(message.intent); - if (error) - return "intent." + error; - } - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates an UpdateIntentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetExperimentRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.UpdateIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.GetExperimentRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.UpdateIntentRequest} UpdateIntentRequest + * @returns {google.cloud.dialogflow.cx.v3.GetExperimentRequest} GetExperimentRequest */ - UpdateIntentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.UpdateIntentRequest) + GetExperimentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.GetExperimentRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.UpdateIntentRequest(); - if (object.intent != null) { - if (typeof object.intent !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.UpdateIntentRequest.intent: object expected"); - message.intent = $root.google.cloud.dialogflow.cx.v3.Intent.fromObject(object.intent); - } - if (object.languageCode != null) - message.languageCode = String(object.languageCode); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.UpdateIntentRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } + var message = new $root.google.cloud.dialogflow.cx.v3.GetExperimentRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from an UpdateIntentRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetExperimentRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.UpdateIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.GetExperimentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.UpdateIntentRequest} message UpdateIntentRequest + * @param {google.cloud.dialogflow.cx.v3.GetExperimentRequest} message GetExperimentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateIntentRequest.toObject = function toObject(message, options) { + GetExperimentRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.intent = null; - object.languageCode = ""; - object.updateMask = null; - } - if (message.intent != null && message.hasOwnProperty("intent")) - object.intent = $root.google.cloud.dialogflow.cx.v3.Intent.toObject(message.intent, options); - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this UpdateIntentRequest to JSON. + * Converts this GetExperimentRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.UpdateIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.GetExperimentRequest * @instance * @returns {Object.} JSON object */ - UpdateIntentRequest.prototype.toJSON = function toJSON() { + GetExperimentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UpdateIntentRequest; + return GetExperimentRequest; })(); - v3.DeleteIntentRequest = (function() { + v3.CreateExperimentRequest = (function() { /** - * Properties of a DeleteIntentRequest. + * Properties of a CreateExperimentRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IDeleteIntentRequest - * @property {string|null} [name] DeleteIntentRequest name + * @interface ICreateExperimentRequest + * @property {string|null} [parent] CreateExperimentRequest parent + * @property {google.cloud.dialogflow.cx.v3.IExperiment|null} [experiment] CreateExperimentRequest experiment */ /** - * Constructs a new DeleteIntentRequest. + * Constructs a new CreateExperimentRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a DeleteIntentRequest. - * @implements IDeleteIntentRequest + * @classdesc Represents a CreateExperimentRequest. + * @implements ICreateExperimentRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IDeleteIntentRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.ICreateExperimentRequest=} [properties] Properties to set */ - function DeleteIntentRequest(properties) { + function CreateExperimentRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21139,75 +21998,88 @@ } /** - * DeleteIntentRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.DeleteIntentRequest + * CreateExperimentRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3.CreateExperimentRequest * @instance */ - DeleteIntentRequest.prototype.name = ""; + CreateExperimentRequest.prototype.parent = ""; /** - * Creates a new DeleteIntentRequest instance using the specified properties. + * CreateExperimentRequest experiment. + * @member {google.cloud.dialogflow.cx.v3.IExperiment|null|undefined} experiment + * @memberof google.cloud.dialogflow.cx.v3.CreateExperimentRequest + * @instance + */ + CreateExperimentRequest.prototype.experiment = null; + + /** + * Creates a new CreateExperimentRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.DeleteIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateExperimentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IDeleteIntentRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.DeleteIntentRequest} DeleteIntentRequest instance + * @param {google.cloud.dialogflow.cx.v3.ICreateExperimentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.CreateExperimentRequest} CreateExperimentRequest instance */ - DeleteIntentRequest.create = function create(properties) { - return new DeleteIntentRequest(properties); + CreateExperimentRequest.create = function create(properties) { + return new CreateExperimentRequest(properties); }; /** - * Encodes the specified DeleteIntentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteIntentRequest.verify|verify} messages. + * Encodes the specified CreateExperimentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateExperimentRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.DeleteIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateExperimentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IDeleteIntentRequest} message DeleteIntentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ICreateExperimentRequest} message CreateExperimentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteIntentRequest.encode = function encode(message, writer) { + CreateExperimentRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.experiment != null && Object.hasOwnProperty.call(message, "experiment")) + $root.google.cloud.dialogflow.cx.v3.Experiment.encode(message.experiment, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified DeleteIntentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteIntentRequest.verify|verify} messages. + * Encodes the specified CreateExperimentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateExperimentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.DeleteIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateExperimentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IDeleteIntentRequest} message DeleteIntentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ICreateExperimentRequest} message CreateExperimentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteIntentRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreateExperimentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteIntentRequest message from the specified reader or buffer. + * Decodes a CreateExperimentRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.DeleteIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateExperimentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.DeleteIntentRequest} DeleteIntentRequest + * @returns {google.cloud.dialogflow.cx.v3.CreateExperimentRequest} CreateExperimentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteIntentRequest.decode = function decode(reader, length) { + CreateExperimentRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.DeleteIntentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.CreateExperimentRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.parent = reader.string(); + break; + case 2: + message.experiment = $root.google.cloud.dialogflow.cx.v3.Experiment.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -21218,323 +22090,122 @@ }; /** - * Decodes a DeleteIntentRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateExperimentRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.DeleteIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateExperimentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.DeleteIntentRequest} DeleteIntentRequest + * @returns {google.cloud.dialogflow.cx.v3.CreateExperimentRequest} CreateExperimentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteIntentRequest.decodeDelimited = function decodeDelimited(reader) { + CreateExperimentRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteIntentRequest message. + * Verifies a CreateExperimentRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.DeleteIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateExperimentRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteIntentRequest.verify = function verify(message) { + CreateExperimentRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.experiment != null && message.hasOwnProperty("experiment")) { + var error = $root.google.cloud.dialogflow.cx.v3.Experiment.verify(message.experiment); + if (error) + return "experiment." + error; + } return null; }; /** - * Creates a DeleteIntentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateExperimentRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.DeleteIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateExperimentRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.DeleteIntentRequest} DeleteIntentRequest + * @returns {google.cloud.dialogflow.cx.v3.CreateExperimentRequest} CreateExperimentRequest */ - DeleteIntentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.DeleteIntentRequest) + CreateExperimentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.CreateExperimentRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.DeleteIntentRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.dialogflow.cx.v3.CreateExperimentRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.experiment != null) { + if (typeof object.experiment !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.CreateExperimentRequest.experiment: object expected"); + message.experiment = $root.google.cloud.dialogflow.cx.v3.Experiment.fromObject(object.experiment); + } return message; }; /** - * Creates a plain object from a DeleteIntentRequest message. Also converts values to other types if specified. + * Creates a plain object from a CreateExperimentRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.DeleteIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateExperimentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.DeleteIntentRequest} message DeleteIntentRequest + * @param {google.cloud.dialogflow.cx.v3.CreateExperimentRequest} message CreateExperimentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteIntentRequest.toObject = function toObject(message, options) { + CreateExperimentRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (options.defaults) { + object.parent = ""; + object.experiment = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.experiment != null && message.hasOwnProperty("experiment")) + object.experiment = $root.google.cloud.dialogflow.cx.v3.Experiment.toObject(message.experiment, options); return object; }; /** - * Converts this DeleteIntentRequest to JSON. + * Converts this CreateExperimentRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.DeleteIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateExperimentRequest * @instance * @returns {Object.} JSON object */ - DeleteIntentRequest.prototype.toJSON = function toJSON() { + CreateExperimentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeleteIntentRequest; - })(); - - /** - * IntentView enum. - * @name google.cloud.dialogflow.cx.v3.IntentView - * @enum {number} - * @property {number} INTENT_VIEW_UNSPECIFIED=0 INTENT_VIEW_UNSPECIFIED value - * @property {number} INTENT_VIEW_PARTIAL=1 INTENT_VIEW_PARTIAL value - * @property {number} INTENT_VIEW_FULL=2 INTENT_VIEW_FULL value - */ - v3.IntentView = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "INTENT_VIEW_UNSPECIFIED"] = 0; - values[valuesById[1] = "INTENT_VIEW_PARTIAL"] = 1; - values[valuesById[2] = "INTENT_VIEW_FULL"] = 2; - return values; - })(); - - v3.SecuritySettingsService = (function() { - - /** - * Constructs a new SecuritySettingsService service. - * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a SecuritySettingsService - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function SecuritySettingsService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (SecuritySettingsService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = SecuritySettingsService; - - /** - * Creates new SecuritySettingsService service using the specified rpc implementation. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService - * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {SecuritySettingsService} RPC service. Useful where requests and/or responses are streamed. - */ - SecuritySettingsService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.SecuritySettingsService#createSecuritySettings}. - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService - * @typedef CreateSecuritySettingsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.SecuritySettings} [response] SecuritySettings - */ - - /** - * Calls CreateSecuritySettings. - * @function createSecuritySettings - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService - * @instance - * @param {google.cloud.dialogflow.cx.v3.ICreateSecuritySettingsRequest} request CreateSecuritySettingsRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.SecuritySettingsService.CreateSecuritySettingsCallback} callback Node-style callback called with the error, if any, and SecuritySettings - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(SecuritySettingsService.prototype.createSecuritySettings = function createSecuritySettings(request, callback) { - return this.rpcCall(createSecuritySettings, $root.google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest, $root.google.cloud.dialogflow.cx.v3.SecuritySettings, request, callback); - }, "name", { value: "CreateSecuritySettings" }); - - /** - * Calls CreateSecuritySettings. - * @function createSecuritySettings - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService - * @instance - * @param {google.cloud.dialogflow.cx.v3.ICreateSecuritySettingsRequest} request CreateSecuritySettingsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.SecuritySettingsService#getSecuritySettings}. - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService - * @typedef GetSecuritySettingsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.SecuritySettings} [response] SecuritySettings - */ - - /** - * Calls GetSecuritySettings. - * @function getSecuritySettings - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService - * @instance - * @param {google.cloud.dialogflow.cx.v3.IGetSecuritySettingsRequest} request GetSecuritySettingsRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.SecuritySettingsService.GetSecuritySettingsCallback} callback Node-style callback called with the error, if any, and SecuritySettings - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(SecuritySettingsService.prototype.getSecuritySettings = function getSecuritySettings(request, callback) { - return this.rpcCall(getSecuritySettings, $root.google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest, $root.google.cloud.dialogflow.cx.v3.SecuritySettings, request, callback); - }, "name", { value: "GetSecuritySettings" }); - - /** - * Calls GetSecuritySettings. - * @function getSecuritySettings - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService - * @instance - * @param {google.cloud.dialogflow.cx.v3.IGetSecuritySettingsRequest} request GetSecuritySettingsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.SecuritySettingsService#updateSecuritySettings}. - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService - * @typedef UpdateSecuritySettingsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.SecuritySettings} [response] SecuritySettings - */ - - /** - * Calls UpdateSecuritySettings. - * @function updateSecuritySettings - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService - * @instance - * @param {google.cloud.dialogflow.cx.v3.IUpdateSecuritySettingsRequest} request UpdateSecuritySettingsRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.SecuritySettingsService.UpdateSecuritySettingsCallback} callback Node-style callback called with the error, if any, and SecuritySettings - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(SecuritySettingsService.prototype.updateSecuritySettings = function updateSecuritySettings(request, callback) { - return this.rpcCall(updateSecuritySettings, $root.google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest, $root.google.cloud.dialogflow.cx.v3.SecuritySettings, request, callback); - }, "name", { value: "UpdateSecuritySettings" }); - - /** - * Calls UpdateSecuritySettings. - * @function updateSecuritySettings - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService - * @instance - * @param {google.cloud.dialogflow.cx.v3.IUpdateSecuritySettingsRequest} request UpdateSecuritySettingsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.SecuritySettingsService#listSecuritySettings}. - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService - * @typedef ListSecuritySettingsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse} [response] ListSecuritySettingsResponse - */ - - /** - * Calls ListSecuritySettings. - * @function listSecuritySettings - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService - * @instance - * @param {google.cloud.dialogflow.cx.v3.IListSecuritySettingsRequest} request ListSecuritySettingsRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.SecuritySettingsService.ListSecuritySettingsCallback} callback Node-style callback called with the error, if any, and ListSecuritySettingsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(SecuritySettingsService.prototype.listSecuritySettings = function listSecuritySettings(request, callback) { - return this.rpcCall(listSecuritySettings, $root.google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest, $root.google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse, request, callback); - }, "name", { value: "ListSecuritySettings" }); - - /** - * Calls ListSecuritySettings. - * @function listSecuritySettings - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService - * @instance - * @param {google.cloud.dialogflow.cx.v3.IListSecuritySettingsRequest} request ListSecuritySettingsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.SecuritySettingsService#deleteSecuritySettings}. - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService - * @typedef DeleteSecuritySettingsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls DeleteSecuritySettings. - * @function deleteSecuritySettings - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService - * @instance - * @param {google.cloud.dialogflow.cx.v3.IDeleteSecuritySettingsRequest} request DeleteSecuritySettingsRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.SecuritySettingsService.DeleteSecuritySettingsCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(SecuritySettingsService.prototype.deleteSecuritySettings = function deleteSecuritySettings(request, callback) { - return this.rpcCall(deleteSecuritySettings, $root.google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteSecuritySettings" }); - - /** - * Calls DeleteSecuritySettings. - * @function deleteSecuritySettings - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService - * @instance - * @param {google.cloud.dialogflow.cx.v3.IDeleteSecuritySettingsRequest} request DeleteSecuritySettingsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return SecuritySettingsService; + return CreateExperimentRequest; })(); - v3.GetSecuritySettingsRequest = (function() { + v3.UpdateExperimentRequest = (function() { /** - * Properties of a GetSecuritySettingsRequest. + * Properties of an UpdateExperimentRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IGetSecuritySettingsRequest - * @property {string|null} [name] GetSecuritySettingsRequest name + * @interface IUpdateExperimentRequest + * @property {google.cloud.dialogflow.cx.v3.IExperiment|null} [experiment] UpdateExperimentRequest experiment + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateExperimentRequest updateMask */ /** - * Constructs a new GetSecuritySettingsRequest. + * Constructs a new UpdateExperimentRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a GetSecuritySettingsRequest. - * @implements IGetSecuritySettingsRequest + * @classdesc Represents an UpdateExperimentRequest. + * @implements IUpdateExperimentRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IGetSecuritySettingsRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IUpdateExperimentRequest=} [properties] Properties to set */ - function GetSecuritySettingsRequest(properties) { + function UpdateExperimentRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21542,75 +22213,88 @@ } /** - * GetSecuritySettingsRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest + * UpdateExperimentRequest experiment. + * @member {google.cloud.dialogflow.cx.v3.IExperiment|null|undefined} experiment + * @memberof google.cloud.dialogflow.cx.v3.UpdateExperimentRequest * @instance */ - GetSecuritySettingsRequest.prototype.name = ""; + UpdateExperimentRequest.prototype.experiment = null; /** - * Creates a new GetSecuritySettingsRequest instance using the specified properties. + * UpdateExperimentRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dialogflow.cx.v3.UpdateExperimentRequest + * @instance + */ + UpdateExperimentRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateExperimentRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.UpdateExperimentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IGetSecuritySettingsRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest} GetSecuritySettingsRequest instance + * @param {google.cloud.dialogflow.cx.v3.IUpdateExperimentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.UpdateExperimentRequest} UpdateExperimentRequest instance */ - GetSecuritySettingsRequest.create = function create(properties) { - return new GetSecuritySettingsRequest(properties); + UpdateExperimentRequest.create = function create(properties) { + return new UpdateExperimentRequest(properties); }; /** - * Encodes the specified GetSecuritySettingsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest.verify|verify} messages. + * Encodes the specified UpdateExperimentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateExperimentRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.UpdateExperimentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IGetSecuritySettingsRequest} message GetSecuritySettingsRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IUpdateExperimentRequest} message UpdateExperimentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSecuritySettingsRequest.encode = function encode(message, writer) { + UpdateExperimentRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.experiment != null && Object.hasOwnProperty.call(message, "experiment")) + $root.google.cloud.dialogflow.cx.v3.Experiment.encode(message.experiment, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetSecuritySettingsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest.verify|verify} messages. + * Encodes the specified UpdateExperimentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateExperimentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.UpdateExperimentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IGetSecuritySettingsRequest} message GetSecuritySettingsRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IUpdateExperimentRequest} message UpdateExperimentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSecuritySettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + UpdateExperimentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetSecuritySettingsRequest message from the specified reader or buffer. + * Decodes an UpdateExperimentRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.UpdateExperimentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest} GetSecuritySettingsRequest + * @returns {google.cloud.dialogflow.cx.v3.UpdateExperimentRequest} UpdateExperimentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetSecuritySettingsRequest.decode = function decode(reader, length) { + UpdateExperimentRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.experiment = $root.google.cloud.dialogflow.cx.v3.Experiment.decode(reader, reader.uint32()); + break; + case 2: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -21621,108 +22305,126 @@ }; /** - * Decodes a GetSecuritySettingsRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateExperimentRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.UpdateExperimentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest} GetSecuritySettingsRequest + * @returns {google.cloud.dialogflow.cx.v3.UpdateExperimentRequest} UpdateExperimentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetSecuritySettingsRequest.decodeDelimited = function decodeDelimited(reader) { + UpdateExperimentRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetSecuritySettingsRequest message. + * Verifies an UpdateExperimentRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.UpdateExperimentRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetSecuritySettingsRequest.verify = function verify(message) { + UpdateExperimentRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.experiment != null && message.hasOwnProperty("experiment")) { + var error = $root.google.cloud.dialogflow.cx.v3.Experiment.verify(message.experiment); + if (error) + return "experiment." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } return null; }; /** - * Creates a GetSecuritySettingsRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateExperimentRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.UpdateExperimentRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest} GetSecuritySettingsRequest + * @returns {google.cloud.dialogflow.cx.v3.UpdateExperimentRequest} UpdateExperimentRequest */ - GetSecuritySettingsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest) + UpdateExperimentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest(); + if (object.experiment != null) { + if (typeof object.experiment !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.UpdateExperimentRequest.experiment: object expected"); + message.experiment = $root.google.cloud.dialogflow.cx.v3.Experiment.fromObject(object.experiment); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.UpdateExperimentRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } return message; }; /** - * Creates a plain object from a GetSecuritySettingsRequest message. Also converts values to other types if specified. + * Creates a plain object from an UpdateExperimentRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.UpdateExperimentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest} message GetSecuritySettingsRequest + * @param {google.cloud.dialogflow.cx.v3.UpdateExperimentRequest} message UpdateExperimentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetSecuritySettingsRequest.toObject = function toObject(message, options) { + UpdateExperimentRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; + if (options.defaults) { + object.experiment = null; + object.updateMask = null; + } + if (message.experiment != null && message.hasOwnProperty("experiment")) + object.experiment = $root.google.cloud.dialogflow.cx.v3.Experiment.toObject(message.experiment, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; }; /** - * Converts this GetSecuritySettingsRequest to JSON. + * Converts this UpdateExperimentRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.UpdateExperimentRequest * @instance * @returns {Object.} JSON object */ - GetSecuritySettingsRequest.prototype.toJSON = function toJSON() { + UpdateExperimentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetSecuritySettingsRequest; + return UpdateExperimentRequest; })(); - v3.UpdateSecuritySettingsRequest = (function() { + v3.DeleteExperimentRequest = (function() { /** - * Properties of an UpdateSecuritySettingsRequest. + * Properties of a DeleteExperimentRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IUpdateSecuritySettingsRequest - * @property {google.cloud.dialogflow.cx.v3.ISecuritySettings|null} [securitySettings] UpdateSecuritySettingsRequest securitySettings - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateSecuritySettingsRequest updateMask + * @interface IDeleteExperimentRequest + * @property {string|null} [name] DeleteExperimentRequest name */ /** - * Constructs a new UpdateSecuritySettingsRequest. + * Constructs a new DeleteExperimentRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents an UpdateSecuritySettingsRequest. - * @implements IUpdateSecuritySettingsRequest + * @classdesc Represents a DeleteExperimentRequest. + * @implements IDeleteExperimentRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IUpdateSecuritySettingsRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IDeleteExperimentRequest=} [properties] Properties to set */ - function UpdateSecuritySettingsRequest(properties) { + function DeleteExperimentRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21730,88 +22432,75 @@ } /** - * UpdateSecuritySettingsRequest securitySettings. - * @member {google.cloud.dialogflow.cx.v3.ISecuritySettings|null|undefined} securitySettings - * @memberof google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest - * @instance - */ - UpdateSecuritySettingsRequest.prototype.securitySettings = null; - - /** - * UpdateSecuritySettingsRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest + * DeleteExperimentRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.DeleteExperimentRequest * @instance */ - UpdateSecuritySettingsRequest.prototype.updateMask = null; + DeleteExperimentRequest.prototype.name = ""; /** - * Creates a new UpdateSecuritySettingsRequest instance using the specified properties. + * Creates a new DeleteExperimentRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteExperimentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IUpdateSecuritySettingsRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest} UpdateSecuritySettingsRequest instance + * @param {google.cloud.dialogflow.cx.v3.IDeleteExperimentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.DeleteExperimentRequest} DeleteExperimentRequest instance */ - UpdateSecuritySettingsRequest.create = function create(properties) { - return new UpdateSecuritySettingsRequest(properties); + DeleteExperimentRequest.create = function create(properties) { + return new DeleteExperimentRequest(properties); }; /** - * Encodes the specified UpdateSecuritySettingsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest.verify|verify} messages. + * Encodes the specified DeleteExperimentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteExperimentRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteExperimentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IUpdateSecuritySettingsRequest} message UpdateSecuritySettingsRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IDeleteExperimentRequest} message DeleteExperimentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateSecuritySettingsRequest.encode = function encode(message, writer) { + DeleteExperimentRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.securitySettings != null && Object.hasOwnProperty.call(message, "securitySettings")) - $root.google.cloud.dialogflow.cx.v3.SecuritySettings.encode(message.securitySettings, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified UpdateSecuritySettingsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest.verify|verify} messages. + * Encodes the specified DeleteExperimentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteExperimentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteExperimentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IUpdateSecuritySettingsRequest} message UpdateSecuritySettingsRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IDeleteExperimentRequest} message DeleteExperimentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateSecuritySettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeleteExperimentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateSecuritySettingsRequest message from the specified reader or buffer. + * Decodes a DeleteExperimentRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteExperimentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest} UpdateSecuritySettingsRequest + * @returns {google.cloud.dialogflow.cx.v3.DeleteExperimentRequest} DeleteExperimentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateSecuritySettingsRequest.decode = function decode(reader, length) { + DeleteExperimentRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.securitySettings = $root.google.cloud.dialogflow.cx.v3.SecuritySettings.decode(reader, reader.uint32()); - break; - case 2: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -21822,128 +22511,107 @@ }; /** - * Decodes an UpdateSecuritySettingsRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteExperimentRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteExperimentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest} UpdateSecuritySettingsRequest + * @returns {google.cloud.dialogflow.cx.v3.DeleteExperimentRequest} DeleteExperimentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateSecuritySettingsRequest.decodeDelimited = function decodeDelimited(reader) { + DeleteExperimentRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateSecuritySettingsRequest message. + * Verifies a DeleteExperimentRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteExperimentRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateSecuritySettingsRequest.verify = function verify(message) { + DeleteExperimentRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.securitySettings != null && message.hasOwnProperty("securitySettings")) { - var error = $root.google.cloud.dialogflow.cx.v3.SecuritySettings.verify(message.securitySettings); - if (error) - return "securitySettings." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates an UpdateSecuritySettingsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteExperimentRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteExperimentRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest} UpdateSecuritySettingsRequest + * @returns {google.cloud.dialogflow.cx.v3.DeleteExperimentRequest} DeleteExperimentRequest */ - UpdateSecuritySettingsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest) + DeleteExperimentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest(); - if (object.securitySettings != null) { - if (typeof object.securitySettings !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest.securitySettings: object expected"); - message.securitySettings = $root.google.cloud.dialogflow.cx.v3.SecuritySettings.fromObject(object.securitySettings); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } + var message = new $root.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from an UpdateSecuritySettingsRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeleteExperimentRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteExperimentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest} message UpdateSecuritySettingsRequest + * @param {google.cloud.dialogflow.cx.v3.DeleteExperimentRequest} message DeleteExperimentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateSecuritySettingsRequest.toObject = function toObject(message, options) { + DeleteExperimentRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.securitySettings = null; - object.updateMask = null; - } - if (message.securitySettings != null && message.hasOwnProperty("securitySettings")) - object.securitySettings = $root.google.cloud.dialogflow.cx.v3.SecuritySettings.toObject(message.securitySettings, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this UpdateSecuritySettingsRequest to JSON. + * Converts this DeleteExperimentRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteExperimentRequest * @instance * @returns {Object.} JSON object */ - UpdateSecuritySettingsRequest.prototype.toJSON = function toJSON() { + DeleteExperimentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UpdateSecuritySettingsRequest; + return DeleteExperimentRequest; })(); - v3.ListSecuritySettingsRequest = (function() { + v3.StartExperimentRequest = (function() { /** - * Properties of a ListSecuritySettingsRequest. + * Properties of a StartExperimentRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IListSecuritySettingsRequest - * @property {string|null} [parent] ListSecuritySettingsRequest parent - * @property {number|null} [pageSize] ListSecuritySettingsRequest pageSize - * @property {string|null} [pageToken] ListSecuritySettingsRequest pageToken + * @interface IStartExperimentRequest + * @property {string|null} [name] StartExperimentRequest name */ /** - * Constructs a new ListSecuritySettingsRequest. + * Constructs a new StartExperimentRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a ListSecuritySettingsRequest. - * @implements IListSecuritySettingsRequest + * @classdesc Represents a StartExperimentRequest. + * @implements IStartExperimentRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IListSecuritySettingsRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IStartExperimentRequest=} [properties] Properties to set */ - function ListSecuritySettingsRequest(properties) { + function StartExperimentRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21951,101 +22619,75 @@ } /** - * ListSecuritySettingsRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest - * @instance - */ - ListSecuritySettingsRequest.prototype.parent = ""; - - /** - * ListSecuritySettingsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest - * @instance - */ - ListSecuritySettingsRequest.prototype.pageSize = 0; - - /** - * ListSecuritySettingsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest + * StartExperimentRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.StartExperimentRequest * @instance */ - ListSecuritySettingsRequest.prototype.pageToken = ""; + StartExperimentRequest.prototype.name = ""; /** - * Creates a new ListSecuritySettingsRequest instance using the specified properties. + * Creates a new StartExperimentRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.StartExperimentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IListSecuritySettingsRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest} ListSecuritySettingsRequest instance + * @param {google.cloud.dialogflow.cx.v3.IStartExperimentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.StartExperimentRequest} StartExperimentRequest instance */ - ListSecuritySettingsRequest.create = function create(properties) { - return new ListSecuritySettingsRequest(properties); + StartExperimentRequest.create = function create(properties) { + return new StartExperimentRequest(properties); }; /** - * Encodes the specified ListSecuritySettingsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest.verify|verify} messages. + * Encodes the specified StartExperimentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.StartExperimentRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.StartExperimentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IListSecuritySettingsRequest} message ListSecuritySettingsRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IStartExperimentRequest} message StartExperimentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListSecuritySettingsRequest.encode = function encode(message, writer) { + StartExperimentRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified ListSecuritySettingsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest.verify|verify} messages. + * Encodes the specified StartExperimentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.StartExperimentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.StartExperimentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IListSecuritySettingsRequest} message ListSecuritySettingsRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IStartExperimentRequest} message StartExperimentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListSecuritySettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + StartExperimentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListSecuritySettingsRequest message from the specified reader or buffer. + * Decodes a StartExperimentRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.StartExperimentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest} ListSecuritySettingsRequest + * @returns {google.cloud.dialogflow.cx.v3.StartExperimentRequest} StartExperimentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListSecuritySettingsRequest.decode = function decode(reader, length) { + StartExperimentRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.StartExperimentRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -22056,126 +22698,107 @@ }; /** - * Decodes a ListSecuritySettingsRequest message from the specified reader or buffer, length delimited. + * Decodes a StartExperimentRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.StartExperimentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest} ListSecuritySettingsRequest + * @returns {google.cloud.dialogflow.cx.v3.StartExperimentRequest} StartExperimentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListSecuritySettingsRequest.decodeDelimited = function decodeDelimited(reader) { + StartExperimentRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListSecuritySettingsRequest message. + * Verifies a StartExperimentRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.StartExperimentRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListSecuritySettingsRequest.verify = function verify(message) { + StartExperimentRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a ListSecuritySettingsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a StartExperimentRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.StartExperimentRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest} ListSecuritySettingsRequest + * @returns {google.cloud.dialogflow.cx.v3.StartExperimentRequest} StartExperimentRequest */ - ListSecuritySettingsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest) + StartExperimentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.StartExperimentRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); + var message = new $root.google.cloud.dialogflow.cx.v3.StartExperimentRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a ListSecuritySettingsRequest message. Also converts values to other types if specified. + * Creates a plain object from a StartExperimentRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.StartExperimentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest} message ListSecuritySettingsRequest + * @param {google.cloud.dialogflow.cx.v3.StartExperimentRequest} message StartExperimentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListSecuritySettingsRequest.toObject = function toObject(message, options) { + StartExperimentRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this ListSecuritySettingsRequest to JSON. + * Converts this StartExperimentRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.StartExperimentRequest * @instance * @returns {Object.} JSON object */ - ListSecuritySettingsRequest.prototype.toJSON = function toJSON() { + StartExperimentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListSecuritySettingsRequest; + return StartExperimentRequest; })(); - v3.ListSecuritySettingsResponse = (function() { + v3.StopExperimentRequest = (function() { /** - * Properties of a ListSecuritySettingsResponse. + * Properties of a StopExperimentRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IListSecuritySettingsResponse - * @property {Array.|null} [securitySettings] ListSecuritySettingsResponse securitySettings - * @property {string|null} [nextPageToken] ListSecuritySettingsResponse nextPageToken + * @interface IStopExperimentRequest + * @property {string|null} [name] StopExperimentRequest name */ /** - * Constructs a new ListSecuritySettingsResponse. + * Constructs a new StopExperimentRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a ListSecuritySettingsResponse. - * @implements IListSecuritySettingsResponse + * @classdesc Represents a StopExperimentRequest. + * @implements IStopExperimentRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IListSecuritySettingsResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IStopExperimentRequest=} [properties] Properties to set */ - function ListSecuritySettingsResponse(properties) { - this.securitySettings = []; + function StopExperimentRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -22183,91 +22806,75 @@ } /** - * ListSecuritySettingsResponse securitySettings. - * @member {Array.} securitySettings - * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse - * @instance - */ - ListSecuritySettingsResponse.prototype.securitySettings = $util.emptyArray; - - /** - * ListSecuritySettingsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse + * StopExperimentRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.StopExperimentRequest * @instance */ - ListSecuritySettingsResponse.prototype.nextPageToken = ""; + StopExperimentRequest.prototype.name = ""; /** - * Creates a new ListSecuritySettingsResponse instance using the specified properties. + * Creates a new StopExperimentRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse + * @memberof google.cloud.dialogflow.cx.v3.StopExperimentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IListSecuritySettingsResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse} ListSecuritySettingsResponse instance + * @param {google.cloud.dialogflow.cx.v3.IStopExperimentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.StopExperimentRequest} StopExperimentRequest instance */ - ListSecuritySettingsResponse.create = function create(properties) { - return new ListSecuritySettingsResponse(properties); + StopExperimentRequest.create = function create(properties) { + return new StopExperimentRequest(properties); }; /** - * Encodes the specified ListSecuritySettingsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse.verify|verify} messages. + * Encodes the specified StopExperimentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.StopExperimentRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse + * @memberof google.cloud.dialogflow.cx.v3.StopExperimentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IListSecuritySettingsResponse} message ListSecuritySettingsResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IStopExperimentRequest} message StopExperimentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListSecuritySettingsResponse.encode = function encode(message, writer) { + StopExperimentRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.securitySettings != null && message.securitySettings.length) - for (var i = 0; i < message.securitySettings.length; ++i) - $root.google.cloud.dialogflow.cx.v3.SecuritySettings.encode(message.securitySettings[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified ListSecuritySettingsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse.verify|verify} messages. + * Encodes the specified StopExperimentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.StopExperimentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse + * @memberof google.cloud.dialogflow.cx.v3.StopExperimentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IListSecuritySettingsResponse} message ListSecuritySettingsResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IStopExperimentRequest} message StopExperimentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListSecuritySettingsResponse.encodeDelimited = function encodeDelimited(message, writer) { + StopExperimentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListSecuritySettingsResponse message from the specified reader or buffer. + * Decodes a StopExperimentRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse + * @memberof google.cloud.dialogflow.cx.v3.StopExperimentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse} ListSecuritySettingsResponse + * @returns {google.cloud.dialogflow.cx.v3.StopExperimentRequest} StopExperimentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListSecuritySettingsResponse.decode = function decode(reader, length) { + StopExperimentRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.StopExperimentRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.securitySettings && message.securitySettings.length)) - message.securitySettings = []; - message.securitySettings.push($root.google.cloud.dialogflow.cx.v3.SecuritySettings.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -22278,348 +22885,317 @@ }; /** - * Decodes a ListSecuritySettingsResponse message from the specified reader or buffer, length delimited. + * Decodes a StopExperimentRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse + * @memberof google.cloud.dialogflow.cx.v3.StopExperimentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse} ListSecuritySettingsResponse + * @returns {google.cloud.dialogflow.cx.v3.StopExperimentRequest} StopExperimentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListSecuritySettingsResponse.decodeDelimited = function decodeDelimited(reader) { + StopExperimentRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListSecuritySettingsResponse message. + * Verifies a StopExperimentRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse + * @memberof google.cloud.dialogflow.cx.v3.StopExperimentRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListSecuritySettingsResponse.verify = function verify(message) { + StopExperimentRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.securitySettings != null && message.hasOwnProperty("securitySettings")) { - if (!Array.isArray(message.securitySettings)) - return "securitySettings: array expected"; - for (var i = 0; i < message.securitySettings.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.SecuritySettings.verify(message.securitySettings[i]); - if (error) - return "securitySettings." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a ListSecuritySettingsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a StopExperimentRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse + * @memberof google.cloud.dialogflow.cx.v3.StopExperimentRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse} ListSecuritySettingsResponse + * @returns {google.cloud.dialogflow.cx.v3.StopExperimentRequest} StopExperimentRequest */ - ListSecuritySettingsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse) + StopExperimentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.StopExperimentRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse(); - if (object.securitySettings) { - if (!Array.isArray(object.securitySettings)) - throw TypeError(".google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse.securitySettings: array expected"); - message.securitySettings = []; - for (var i = 0; i < object.securitySettings.length; ++i) { - if (typeof object.securitySettings[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse.securitySettings: object expected"); - message.securitySettings[i] = $root.google.cloud.dialogflow.cx.v3.SecuritySettings.fromObject(object.securitySettings[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); + var message = new $root.google.cloud.dialogflow.cx.v3.StopExperimentRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a ListSecuritySettingsResponse message. Also converts values to other types if specified. + * Creates a plain object from a StopExperimentRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse + * @memberof google.cloud.dialogflow.cx.v3.StopExperimentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse} message ListSecuritySettingsResponse + * @param {google.cloud.dialogflow.cx.v3.StopExperimentRequest} message StopExperimentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListSecuritySettingsResponse.toObject = function toObject(message, options) { + StopExperimentRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.securitySettings = []; if (options.defaults) - object.nextPageToken = ""; - if (message.securitySettings && message.securitySettings.length) { - object.securitySettings = []; - for (var j = 0; j < message.securitySettings.length; ++j) - object.securitySettings[j] = $root.google.cloud.dialogflow.cx.v3.SecuritySettings.toObject(message.securitySettings[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this ListSecuritySettingsResponse to JSON. + * Converts this StopExperimentRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse + * @memberof google.cloud.dialogflow.cx.v3.StopExperimentRequest * @instance * @returns {Object.} JSON object */ - ListSecuritySettingsResponse.prototype.toJSON = function toJSON() { + StopExperimentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListSecuritySettingsResponse; + return StopExperimentRequest; })(); - v3.CreateSecuritySettingsRequest = (function() { + v3.Intents = (function() { /** - * Properties of a CreateSecuritySettingsRequest. + * Constructs a new Intents service. * @memberof google.cloud.dialogflow.cx.v3 - * @interface ICreateSecuritySettingsRequest - * @property {string|null} [parent] CreateSecuritySettingsRequest parent - * @property {google.cloud.dialogflow.cx.v3.ISecuritySettings|null} [securitySettings] CreateSecuritySettingsRequest securitySettings + * @classdesc Represents an Intents + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited */ + function Intents(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Intents.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Intents; /** - * Constructs a new CreateSecuritySettingsRequest. - * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a CreateSecuritySettingsRequest. - * @implements ICreateSecuritySettingsRequest - * @constructor - * @param {google.cloud.dialogflow.cx.v3.ICreateSecuritySettingsRequest=} [properties] Properties to set + * Creates new Intents service using the specified rpc implementation. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.Intents + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Intents} RPC service. Useful where requests and/or responses are streamed. */ - function CreateSecuritySettingsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + Intents.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; /** - * CreateSecuritySettingsRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Intents#listIntents}. + * @memberof google.cloud.dialogflow.cx.v3.Intents + * @typedef ListIntentsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.ListIntentsResponse} [response] ListIntentsResponse + */ + + /** + * Calls ListIntents. + * @function listIntents + * @memberof google.cloud.dialogflow.cx.v3.Intents * @instance + * @param {google.cloud.dialogflow.cx.v3.IListIntentsRequest} request ListIntentsRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Intents.ListIntentsCallback} callback Node-style callback called with the error, if any, and ListIntentsResponse + * @returns {undefined} + * @variation 1 */ - CreateSecuritySettingsRequest.prototype.parent = ""; + Object.defineProperty(Intents.prototype.listIntents = function listIntents(request, callback) { + return this.rpcCall(listIntents, $root.google.cloud.dialogflow.cx.v3.ListIntentsRequest, $root.google.cloud.dialogflow.cx.v3.ListIntentsResponse, request, callback); + }, "name", { value: "ListIntents" }); /** - * CreateSecuritySettingsRequest securitySettings. - * @member {google.cloud.dialogflow.cx.v3.ISecuritySettings|null|undefined} securitySettings - * @memberof google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest + * Calls ListIntents. + * @function listIntents + * @memberof google.cloud.dialogflow.cx.v3.Intents * @instance + * @param {google.cloud.dialogflow.cx.v3.IListIntentsRequest} request ListIntentsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - CreateSecuritySettingsRequest.prototype.securitySettings = null; /** - * Creates a new CreateSecuritySettingsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.ICreateSecuritySettingsRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest} CreateSecuritySettingsRequest instance + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Intents#getIntent}. + * @memberof google.cloud.dialogflow.cx.v3.Intents + * @typedef GetIntentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.Intent} [response] Intent */ - CreateSecuritySettingsRequest.create = function create(properties) { - return new CreateSecuritySettingsRequest(properties); - }; /** - * Encodes the specified CreateSecuritySettingsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.ICreateSecuritySettingsRequest} message CreateSecuritySettingsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls GetIntent. + * @function getIntent + * @memberof google.cloud.dialogflow.cx.v3.Intents + * @instance + * @param {google.cloud.dialogflow.cx.v3.IGetIntentRequest} request GetIntentRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Intents.GetIntentCallback} callback Node-style callback called with the error, if any, and Intent + * @returns {undefined} + * @variation 1 */ - CreateSecuritySettingsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.securitySettings != null && Object.hasOwnProperty.call(message, "securitySettings")) - $root.google.cloud.dialogflow.cx.v3.SecuritySettings.encode(message.securitySettings, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; + Object.defineProperty(Intents.prototype.getIntent = function getIntent(request, callback) { + return this.rpcCall(getIntent, $root.google.cloud.dialogflow.cx.v3.GetIntentRequest, $root.google.cloud.dialogflow.cx.v3.Intent, request, callback); + }, "name", { value: "GetIntent" }); /** - * Encodes the specified CreateSecuritySettingsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.ICreateSecuritySettingsRequest} message CreateSecuritySettingsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls GetIntent. + * @function getIntent + * @memberof google.cloud.dialogflow.cx.v3.Intents + * @instance + * @param {google.cloud.dialogflow.cx.v3.IGetIntentRequest} request GetIntentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - CreateSecuritySettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; /** - * Decodes a CreateSecuritySettingsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest} CreateSecuritySettingsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Intents#createIntent}. + * @memberof google.cloud.dialogflow.cx.v3.Intents + * @typedef CreateIntentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.Intent} [response] Intent */ - CreateSecuritySettingsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.securitySettings = $root.google.cloud.dialogflow.cx.v3.SecuritySettings.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes a CreateSecuritySettingsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest} CreateSecuritySettingsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls CreateIntent. + * @function createIntent + * @memberof google.cloud.dialogflow.cx.v3.Intents + * @instance + * @param {google.cloud.dialogflow.cx.v3.ICreateIntentRequest} request CreateIntentRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Intents.CreateIntentCallback} callback Node-style callback called with the error, if any, and Intent + * @returns {undefined} + * @variation 1 */ - CreateSecuritySettingsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + Object.defineProperty(Intents.prototype.createIntent = function createIntent(request, callback) { + return this.rpcCall(createIntent, $root.google.cloud.dialogflow.cx.v3.CreateIntentRequest, $root.google.cloud.dialogflow.cx.v3.Intent, request, callback); + }, "name", { value: "CreateIntent" }); /** - * Verifies a CreateSecuritySettingsRequest message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls CreateIntent. + * @function createIntent + * @memberof google.cloud.dialogflow.cx.v3.Intents + * @instance + * @param {google.cloud.dialogflow.cx.v3.ICreateIntentRequest} request CreateIntentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - CreateSecuritySettingsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.securitySettings != null && message.hasOwnProperty("securitySettings")) { - var error = $root.google.cloud.dialogflow.cx.v3.SecuritySettings.verify(message.securitySettings); - if (error) - return "securitySettings." + error; - } - return null; - }; /** - * Creates a CreateSecuritySettingsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest} CreateSecuritySettingsRequest + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Intents#updateIntent}. + * @memberof google.cloud.dialogflow.cx.v3.Intents + * @typedef UpdateIntentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.Intent} [response] Intent */ - CreateSecuritySettingsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.securitySettings != null) { - if (typeof object.securitySettings !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest.securitySettings: object expected"); - message.securitySettings = $root.google.cloud.dialogflow.cx.v3.SecuritySettings.fromObject(object.securitySettings); - } - return message; - }; /** - * Creates a plain object from a CreateSecuritySettingsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest} message CreateSecuritySettingsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Calls UpdateIntent. + * @function updateIntent + * @memberof google.cloud.dialogflow.cx.v3.Intents + * @instance + * @param {google.cloud.dialogflow.cx.v3.IUpdateIntentRequest} request UpdateIntentRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Intents.UpdateIntentCallback} callback Node-style callback called with the error, if any, and Intent + * @returns {undefined} + * @variation 1 */ - CreateSecuritySettingsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.securitySettings = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.securitySettings != null && message.hasOwnProperty("securitySettings")) - object.securitySettings = $root.google.cloud.dialogflow.cx.v3.SecuritySettings.toObject(message.securitySettings, options); - return object; - }; + Object.defineProperty(Intents.prototype.updateIntent = function updateIntent(request, callback) { + return this.rpcCall(updateIntent, $root.google.cloud.dialogflow.cx.v3.UpdateIntentRequest, $root.google.cloud.dialogflow.cx.v3.Intent, request, callback); + }, "name", { value: "UpdateIntent" }); /** - * Converts this CreateSecuritySettingsRequest to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest + * Calls UpdateIntent. + * @function updateIntent + * @memberof google.cloud.dialogflow.cx.v3.Intents * @instance - * @returns {Object.} JSON object + * @param {google.cloud.dialogflow.cx.v3.IUpdateIntentRequest} request UpdateIntentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - CreateSecuritySettingsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - return CreateSecuritySettingsRequest; + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Intents#deleteIntent}. + * @memberof google.cloud.dialogflow.cx.v3.Intents + * @typedef DeleteIntentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteIntent. + * @function deleteIntent + * @memberof google.cloud.dialogflow.cx.v3.Intents + * @instance + * @param {google.cloud.dialogflow.cx.v3.IDeleteIntentRequest} request DeleteIntentRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Intents.DeleteIntentCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Intents.prototype.deleteIntent = function deleteIntent(request, callback) { + return this.rpcCall(deleteIntent, $root.google.cloud.dialogflow.cx.v3.DeleteIntentRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteIntent" }); + + /** + * Calls DeleteIntent. + * @function deleteIntent + * @memberof google.cloud.dialogflow.cx.v3.Intents + * @instance + * @param {google.cloud.dialogflow.cx.v3.IDeleteIntentRequest} request DeleteIntentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Intents; })(); - v3.DeleteSecuritySettingsRequest = (function() { + v3.Intent = (function() { /** - * Properties of a DeleteSecuritySettingsRequest. + * Properties of an Intent. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IDeleteSecuritySettingsRequest - * @property {string|null} [name] DeleteSecuritySettingsRequest name + * @interface IIntent + * @property {string|null} [name] Intent name + * @property {string|null} [displayName] Intent displayName + * @property {Array.|null} [trainingPhrases] Intent trainingPhrases + * @property {Array.|null} [parameters] Intent parameters + * @property {number|null} [priority] Intent priority + * @property {boolean|null} [isFallback] Intent isFallback + * @property {Object.|null} [labels] Intent labels + * @property {string|null} [description] Intent description */ /** - * Constructs a new DeleteSecuritySettingsRequest. + * Constructs a new Intent. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a DeleteSecuritySettingsRequest. - * @implements IDeleteSecuritySettingsRequest + * @classdesc Represents an Intent. + * @implements IIntent * @constructor - * @param {google.cloud.dialogflow.cx.v3.IDeleteSecuritySettingsRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IIntent=} [properties] Properties to set */ - function DeleteSecuritySettingsRequest(properties) { + function Intent(properties) { + this.trainingPhrases = []; + this.parameters = []; + this.labels = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -22627,76 +23203,193 @@ } /** - * DeleteSecuritySettingsRequest name. + * Intent name. * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.Intent * @instance */ - DeleteSecuritySettingsRequest.prototype.name = ""; + Intent.prototype.name = ""; /** - * Creates a new DeleteSecuritySettingsRequest instance using the specified properties. + * Intent displayName. + * @member {string} displayName + * @memberof google.cloud.dialogflow.cx.v3.Intent + * @instance + */ + Intent.prototype.displayName = ""; + + /** + * Intent trainingPhrases. + * @member {Array.} trainingPhrases + * @memberof google.cloud.dialogflow.cx.v3.Intent + * @instance + */ + Intent.prototype.trainingPhrases = $util.emptyArray; + + /** + * Intent parameters. + * @member {Array.} parameters + * @memberof google.cloud.dialogflow.cx.v3.Intent + * @instance + */ + Intent.prototype.parameters = $util.emptyArray; + + /** + * Intent priority. + * @member {number} priority + * @memberof google.cloud.dialogflow.cx.v3.Intent + * @instance + */ + Intent.prototype.priority = 0; + + /** + * Intent isFallback. + * @member {boolean} isFallback + * @memberof google.cloud.dialogflow.cx.v3.Intent + * @instance + */ + Intent.prototype.isFallback = false; + + /** + * Intent labels. + * @member {Object.} labels + * @memberof google.cloud.dialogflow.cx.v3.Intent + * @instance + */ + Intent.prototype.labels = $util.emptyObject; + + /** + * Intent description. + * @member {string} description + * @memberof google.cloud.dialogflow.cx.v3.Intent + * @instance + */ + Intent.prototype.description = ""; + + /** + * Creates a new Intent instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.Intent * @static - * @param {google.cloud.dialogflow.cx.v3.IDeleteSecuritySettingsRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest} DeleteSecuritySettingsRequest instance + * @param {google.cloud.dialogflow.cx.v3.IIntent=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Intent} Intent instance */ - DeleteSecuritySettingsRequest.create = function create(properties) { - return new DeleteSecuritySettingsRequest(properties); + Intent.create = function create(properties) { + return new Intent(properties); }; /** - * Encodes the specified DeleteSecuritySettingsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest.verify|verify} messages. + * Encodes the specified Intent message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Intent.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.Intent * @static - * @param {google.cloud.dialogflow.cx.v3.IDeleteSecuritySettingsRequest} message DeleteSecuritySettingsRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IIntent} message Intent message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteSecuritySettingsRequest.encode = function encode(message, writer) { + Intent.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.trainingPhrases != null && message.trainingPhrases.length) + for (var i = 0; i < message.trainingPhrases.length; ++i) + $root.google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.encode(message.trainingPhrases[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.parameters != null && message.parameters.length) + for (var i = 0; i < message.parameters.length; ++i) + $root.google.cloud.dialogflow.cx.v3.Intent.Parameter.encode(message.parameters[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.priority != null && Object.hasOwnProperty.call(message, "priority")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.priority); + if (message.isFallback != null && Object.hasOwnProperty.call(message, "isFallback")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.isFallback); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.description); return writer; }; /** - * Encodes the specified DeleteSecuritySettingsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest.verify|verify} messages. + * Encodes the specified Intent message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Intent.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.Intent * @static - * @param {google.cloud.dialogflow.cx.v3.IDeleteSecuritySettingsRequest} message DeleteSecuritySettingsRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IIntent} message Intent message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteSecuritySettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + Intent.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteSecuritySettingsRequest message from the specified reader or buffer. + * Decodes an Intent message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.Intent * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest} DeleteSecuritySettingsRequest + * @returns {google.cloud.dialogflow.cx.v3.Intent} Intent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteSecuritySettingsRequest.decode = function decode(reader, length) { + Intent.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.Intent(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: message.name = reader.string(); break; + case 2: + message.displayName = reader.string(); + break; + case 3: + if (!(message.trainingPhrases && message.trainingPhrases.length)) + message.trainingPhrases = []; + message.trainingPhrases.push($root.google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.decode(reader, reader.uint32())); + break; + case 4: + if (!(message.parameters && message.parameters.length)) + message.parameters = []; + message.parameters.push($root.google.cloud.dialogflow.cx.v3.Intent.Parameter.decode(reader, reader.uint32())); + break; + case 5: + message.priority = reader.int32(); + break; + case 6: + message.isFallback = reader.bool(); + break; + case 7: + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + case 8: + message.description = reader.string(); + break; default: reader.skipType(tag & 7); break; @@ -22706,724 +23399,937 @@ }; /** - * Decodes a DeleteSecuritySettingsRequest message from the specified reader or buffer, length delimited. + * Decodes an Intent message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.Intent * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest} DeleteSecuritySettingsRequest + * @returns {google.cloud.dialogflow.cx.v3.Intent} Intent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteSecuritySettingsRequest.decodeDelimited = function decodeDelimited(reader) { + Intent.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteSecuritySettingsRequest message. + * Verifies an Intent message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.Intent * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteSecuritySettingsRequest.verify = function verify(message) { + Intent.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.trainingPhrases != null && message.hasOwnProperty("trainingPhrases")) { + if (!Array.isArray(message.trainingPhrases)) + return "trainingPhrases: array expected"; + for (var i = 0; i < message.trainingPhrases.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.verify(message.trainingPhrases[i]); + if (error) + return "trainingPhrases." + error; + } + } + if (message.parameters != null && message.hasOwnProperty("parameters")) { + if (!Array.isArray(message.parameters)) + return "parameters: array expected"; + for (var i = 0; i < message.parameters.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.Intent.Parameter.verify(message.parameters[i]); + if (error) + return "parameters." + error; + } + } + if (message.priority != null && message.hasOwnProperty("priority")) + if (!$util.isInteger(message.priority)) + return "priority: integer expected"; + if (message.isFallback != null && message.hasOwnProperty("isFallback")) + if (typeof message.isFallback !== "boolean") + return "isFallback: boolean expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; return null; }; /** - * Creates a DeleteSecuritySettingsRequest message from a plain object. Also converts values to their respective internal types. + * Creates an Intent message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.Intent * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest} DeleteSecuritySettingsRequest + * @returns {google.cloud.dialogflow.cx.v3.Intent} Intent */ - DeleteSecuritySettingsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest) + Intent.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.Intent) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest(); + var message = new $root.google.cloud.dialogflow.cx.v3.Intent(); if (object.name != null) message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.trainingPhrases) { + if (!Array.isArray(object.trainingPhrases)) + throw TypeError(".google.cloud.dialogflow.cx.v3.Intent.trainingPhrases: array expected"); + message.trainingPhrases = []; + for (var i = 0; i < object.trainingPhrases.length; ++i) { + if (typeof object.trainingPhrases[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Intent.trainingPhrases: object expected"); + message.trainingPhrases[i] = $root.google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.fromObject(object.trainingPhrases[i]); + } + } + if (object.parameters) { + if (!Array.isArray(object.parameters)) + throw TypeError(".google.cloud.dialogflow.cx.v3.Intent.parameters: array expected"); + message.parameters = []; + for (var i = 0; i < object.parameters.length; ++i) { + if (typeof object.parameters[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Intent.parameters: object expected"); + message.parameters[i] = $root.google.cloud.dialogflow.cx.v3.Intent.Parameter.fromObject(object.parameters[i]); + } + } + if (object.priority != null) + message.priority = object.priority | 0; + if (object.isFallback != null) + message.isFallback = Boolean(object.isFallback); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Intent.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + if (object.description != null) + message.description = String(object.description); return message; }; /** - * Creates a plain object from a DeleteSecuritySettingsRequest message. Also converts values to other types if specified. + * Creates a plain object from an Intent message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.Intent * @static - * @param {google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest} message DeleteSecuritySettingsRequest + * @param {google.cloud.dialogflow.cx.v3.Intent} message Intent * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteSecuritySettingsRequest.toObject = function toObject(message, options) { + Intent.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.arrays || options.defaults) { + object.trainingPhrases = []; + object.parameters = []; + } + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { object.name = ""; + object.displayName = ""; + object.priority = 0; + object.isFallback = false; + object.description = ""; + } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.trainingPhrases && message.trainingPhrases.length) { + object.trainingPhrases = []; + for (var j = 0; j < message.trainingPhrases.length; ++j) + object.trainingPhrases[j] = $root.google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.toObject(message.trainingPhrases[j], options); + } + if (message.parameters && message.parameters.length) { + object.parameters = []; + for (var j = 0; j < message.parameters.length; ++j) + object.parameters[j] = $root.google.cloud.dialogflow.cx.v3.Intent.Parameter.toObject(message.parameters[j], options); + } + if (message.priority != null && message.hasOwnProperty("priority")) + object.priority = message.priority; + if (message.isFallback != null && message.hasOwnProperty("isFallback")) + object.isFallback = message.isFallback; + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; return object; }; /** - * Converts this DeleteSecuritySettingsRequest to JSON. + * Converts this Intent to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.Intent * @instance * @returns {Object.} JSON object */ - DeleteSecuritySettingsRequest.prototype.toJSON = function toJSON() { + Intent.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeleteSecuritySettingsRequest; - })(); + Intent.TrainingPhrase = (function() { - v3.SecuritySettings = (function() { + /** + * Properties of a TrainingPhrase. + * @memberof google.cloud.dialogflow.cx.v3.Intent + * @interface ITrainingPhrase + * @property {string|null} [id] TrainingPhrase id + * @property {Array.|null} [parts] TrainingPhrase parts + * @property {number|null} [repeatCount] TrainingPhrase repeatCount + */ - /** - * Properties of a SecuritySettings. - * @memberof google.cloud.dialogflow.cx.v3 - * @interface ISecuritySettings - * @property {string|null} [name] SecuritySettings name - * @property {string|null} [displayName] SecuritySettings displayName - * @property {google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionStrategy|null} [redactionStrategy] SecuritySettings redactionStrategy - * @property {google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionScope|null} [redactionScope] SecuritySettings redactionScope - * @property {string|null} [inspectTemplate] SecuritySettings inspectTemplate - * @property {number|null} [retentionWindowDays] SecuritySettings retentionWindowDays - * @property {Array.|null} [purgeDataTypes] SecuritySettings purgeDataTypes - */ + /** + * Constructs a new TrainingPhrase. + * @memberof google.cloud.dialogflow.cx.v3.Intent + * @classdesc Represents a TrainingPhrase. + * @implements ITrainingPhrase + * @constructor + * @param {google.cloud.dialogflow.cx.v3.Intent.ITrainingPhrase=} [properties] Properties to set + */ + function TrainingPhrase(properties) { + this.parts = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Constructs a new SecuritySettings. - * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a SecuritySettings. - * @implements ISecuritySettings - * @constructor - * @param {google.cloud.dialogflow.cx.v3.ISecuritySettings=} [properties] Properties to set - */ - function SecuritySettings(properties) { - this.purgeDataTypes = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * TrainingPhrase id. + * @member {string} id + * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase + * @instance + */ + TrainingPhrase.prototype.id = ""; - /** - * SecuritySettings name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings - * @instance - */ - SecuritySettings.prototype.name = ""; + /** + * TrainingPhrase parts. + * @member {Array.} parts + * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase + * @instance + */ + TrainingPhrase.prototype.parts = $util.emptyArray; - /** - * SecuritySettings displayName. - * @member {string} displayName - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings - * @instance - */ - SecuritySettings.prototype.displayName = ""; + /** + * TrainingPhrase repeatCount. + * @member {number} repeatCount + * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase + * @instance + */ + TrainingPhrase.prototype.repeatCount = 0; - /** - * SecuritySettings redactionStrategy. - * @member {google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionStrategy} redactionStrategy - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings - * @instance - */ - SecuritySettings.prototype.redactionStrategy = 0; + /** + * Creates a new TrainingPhrase instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase + * @static + * @param {google.cloud.dialogflow.cx.v3.Intent.ITrainingPhrase=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase} TrainingPhrase instance + */ + TrainingPhrase.create = function create(properties) { + return new TrainingPhrase(properties); + }; - /** - * SecuritySettings redactionScope. - * @member {google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionScope} redactionScope - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings - * @instance - */ - SecuritySettings.prototype.redactionScope = 0; + /** + * Encodes the specified TrainingPhrase message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase + * @static + * @param {google.cloud.dialogflow.cx.v3.Intent.ITrainingPhrase} message TrainingPhrase message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TrainingPhrase.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.parts != null && message.parts.length) + for (var i = 0; i < message.parts.length; ++i) + $root.google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part.encode(message.parts[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.repeatCount != null && Object.hasOwnProperty.call(message, "repeatCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.repeatCount); + return writer; + }; - /** - * SecuritySettings inspectTemplate. - * @member {string} inspectTemplate - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings - * @instance - */ - SecuritySettings.prototype.inspectTemplate = ""; + /** + * Encodes the specified TrainingPhrase message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase + * @static + * @param {google.cloud.dialogflow.cx.v3.Intent.ITrainingPhrase} message TrainingPhrase message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TrainingPhrase.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * SecuritySettings retentionWindowDays. - * @member {number} retentionWindowDays - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings - * @instance - */ - SecuritySettings.prototype.retentionWindowDays = 0; + /** + * Decodes a TrainingPhrase message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase} TrainingPhrase + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TrainingPhrase.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.id = reader.string(); + break; + case 2: + if (!(message.parts && message.parts.length)) + message.parts = []; + message.parts.push($root.google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part.decode(reader, reader.uint32())); + break; + case 3: + message.repeatCount = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * SecuritySettings purgeDataTypes. - * @member {Array.} purgeDataTypes - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings - * @instance - */ - SecuritySettings.prototype.purgeDataTypes = $util.emptyArray; + /** + * Decodes a TrainingPhrase message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase} TrainingPhrase + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TrainingPhrase.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Verifies a TrainingPhrase message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TrainingPhrase.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.parts != null && message.hasOwnProperty("parts")) { + if (!Array.isArray(message.parts)) + return "parts: array expected"; + for (var i = 0; i < message.parts.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part.verify(message.parts[i]); + if (error) + return "parts." + error; + } + } + if (message.repeatCount != null && message.hasOwnProperty("repeatCount")) + if (!$util.isInteger(message.repeatCount)) + return "repeatCount: integer expected"; + return null; + }; - /** - * SecuritySettings dataRetention. - * @member {"retentionWindowDays"|undefined} dataRetention - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings - * @instance - */ - Object.defineProperty(SecuritySettings.prototype, "dataRetention", { - get: $util.oneOfGetter($oneOfFields = ["retentionWindowDays"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Creates a TrainingPhrase message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase} TrainingPhrase + */ + TrainingPhrase.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase(); + if (object.id != null) + message.id = String(object.id); + if (object.parts) { + if (!Array.isArray(object.parts)) + throw TypeError(".google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.parts: array expected"); + message.parts = []; + for (var i = 0; i < object.parts.length; ++i) { + if (typeof object.parts[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.parts: object expected"); + message.parts[i] = $root.google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part.fromObject(object.parts[i]); + } + } + if (object.repeatCount != null) + message.repeatCount = object.repeatCount | 0; + return message; + }; - /** - * Creates a new SecuritySettings instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings - * @static - * @param {google.cloud.dialogflow.cx.v3.ISecuritySettings=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.SecuritySettings} SecuritySettings instance - */ - SecuritySettings.create = function create(properties) { - return new SecuritySettings(properties); - }; + /** + * Creates a plain object from a TrainingPhrase message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase + * @static + * @param {google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase} message TrainingPhrase + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TrainingPhrase.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.parts = []; + if (options.defaults) { + object.id = ""; + object.repeatCount = 0; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.parts && message.parts.length) { + object.parts = []; + for (var j = 0; j < message.parts.length; ++j) + object.parts[j] = $root.google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part.toObject(message.parts[j], options); + } + if (message.repeatCount != null && message.hasOwnProperty("repeatCount")) + object.repeatCount = message.repeatCount; + return object; + }; - /** - * Encodes the specified SecuritySettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SecuritySettings.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings - * @static - * @param {google.cloud.dialogflow.cx.v3.ISecuritySettings} message SecuritySettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SecuritySettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.redactionStrategy != null && Object.hasOwnProperty.call(message, "redactionStrategy")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.redactionStrategy); - if (message.redactionScope != null && Object.hasOwnProperty.call(message, "redactionScope")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.redactionScope); - if (message.retentionWindowDays != null && Object.hasOwnProperty.call(message, "retentionWindowDays")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.retentionWindowDays); - if (message.purgeDataTypes != null && message.purgeDataTypes.length) { - writer.uint32(/* id 8, wireType 2 =*/66).fork(); - for (var i = 0; i < message.purgeDataTypes.length; ++i) - writer.int32(message.purgeDataTypes[i]); - writer.ldelim(); - } - if (message.inspectTemplate != null && Object.hasOwnProperty.call(message, "inspectTemplate")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.inspectTemplate); - return writer; - }; + /** + * Converts this TrainingPhrase to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase + * @instance + * @returns {Object.} JSON object + */ + TrainingPhrase.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Encodes the specified SecuritySettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SecuritySettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings - * @static - * @param {google.cloud.dialogflow.cx.v3.ISecuritySettings} message SecuritySettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SecuritySettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + TrainingPhrase.Part = (function() { - /** - * Decodes a SecuritySettings message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.SecuritySettings} SecuritySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SecuritySettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.SecuritySettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.displayName = reader.string(); - break; - case 3: - message.redactionStrategy = reader.int32(); - break; - case 4: - message.redactionScope = reader.int32(); - break; - case 9: - message.inspectTemplate = reader.string(); - break; - case 6: - message.retentionWindowDays = reader.int32(); - break; - case 8: - if (!(message.purgeDataTypes && message.purgeDataTypes.length)) - message.purgeDataTypes = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.purgeDataTypes.push(reader.int32()); - } else - message.purgeDataTypes.push(reader.int32()); - break; - default: - reader.skipType(tag & 7); - break; + /** + * Properties of a Part. + * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase + * @interface IPart + * @property {string|null} [text] Part text + * @property {string|null} [parameterId] Part parameterId + */ + + /** + * Constructs a new Part. + * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase + * @classdesc Represents a Part. + * @implements IPart + * @constructor + * @param {google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.IPart=} [properties] Properties to set + */ + function Part(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - } - return message; - }; - /** - * Decodes a SecuritySettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.SecuritySettings} SecuritySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SecuritySettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Part text. + * @member {string} text + * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part + * @instance + */ + Part.prototype.text = ""; - /** - * Verifies a SecuritySettings message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SecuritySettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.redactionStrategy != null && message.hasOwnProperty("redactionStrategy")) - switch (message.redactionStrategy) { - default: - return "redactionStrategy: enum value expected"; - case 0: - case 1: - break; - } - if (message.redactionScope != null && message.hasOwnProperty("redactionScope")) - switch (message.redactionScope) { - default: - return "redactionScope: enum value expected"; - case 0: - case 2: - break; - } - if (message.inspectTemplate != null && message.hasOwnProperty("inspectTemplate")) - if (!$util.isString(message.inspectTemplate)) - return "inspectTemplate: string expected"; - if (message.retentionWindowDays != null && message.hasOwnProperty("retentionWindowDays")) { - properties.dataRetention = 1; - if (!$util.isInteger(message.retentionWindowDays)) - return "retentionWindowDays: integer expected"; - } - if (message.purgeDataTypes != null && message.hasOwnProperty("purgeDataTypes")) { - if (!Array.isArray(message.purgeDataTypes)) - return "purgeDataTypes: array expected"; - for (var i = 0; i < message.purgeDataTypes.length; ++i) - switch (message.purgeDataTypes[i]) { - default: - return "purgeDataTypes: enum value[] expected"; - case 0: - case 1: - break; - } - } - return null; - }; - - /** - * Creates a SecuritySettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.SecuritySettings} SecuritySettings - */ - SecuritySettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.SecuritySettings) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.SecuritySettings(); - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - switch (object.redactionStrategy) { - case "REDACTION_STRATEGY_UNSPECIFIED": - case 0: - message.redactionStrategy = 0; - break; - case "REDACT_WITH_SERVICE": - case 1: - message.redactionStrategy = 1; - break; - } - switch (object.redactionScope) { - case "REDACTION_SCOPE_UNSPECIFIED": - case 0: - message.redactionScope = 0; - break; - case "REDACT_DISK_STORAGE": - case 2: - message.redactionScope = 2; - break; - } - if (object.inspectTemplate != null) - message.inspectTemplate = String(object.inspectTemplate); - if (object.retentionWindowDays != null) - message.retentionWindowDays = object.retentionWindowDays | 0; - if (object.purgeDataTypes) { - if (!Array.isArray(object.purgeDataTypes)) - throw TypeError(".google.cloud.dialogflow.cx.v3.SecuritySettings.purgeDataTypes: array expected"); - message.purgeDataTypes = []; - for (var i = 0; i < object.purgeDataTypes.length; ++i) - switch (object.purgeDataTypes[i]) { - default: - case "PURGE_DATA_TYPE_UNSPECIFIED": - case 0: - message.purgeDataTypes[i] = 0; - break; - case "DIALOGFLOW_HISTORY": - case 1: - message.purgeDataTypes[i] = 1; - break; - } - } - return message; - }; + /** + * Part parameterId. + * @member {string} parameterId + * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part + * @instance + */ + Part.prototype.parameterId = ""; - /** - * Creates a plain object from a SecuritySettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings - * @static - * @param {google.cloud.dialogflow.cx.v3.SecuritySettings} message SecuritySettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SecuritySettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.purgeDataTypes = []; - if (options.defaults) { - object.name = ""; - object.displayName = ""; - object.redactionStrategy = options.enums === String ? "REDACTION_STRATEGY_UNSPECIFIED" : 0; - object.redactionScope = options.enums === String ? "REDACTION_SCOPE_UNSPECIFIED" : 0; - object.inspectTemplate = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.redactionStrategy != null && message.hasOwnProperty("redactionStrategy")) - object.redactionStrategy = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionStrategy[message.redactionStrategy] : message.redactionStrategy; - if (message.redactionScope != null && message.hasOwnProperty("redactionScope")) - object.redactionScope = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionScope[message.redactionScope] : message.redactionScope; - if (message.retentionWindowDays != null && message.hasOwnProperty("retentionWindowDays")) { - object.retentionWindowDays = message.retentionWindowDays; - if (options.oneofs) - object.dataRetention = "retentionWindowDays"; - } - if (message.purgeDataTypes && message.purgeDataTypes.length) { - object.purgeDataTypes = []; - for (var j = 0; j < message.purgeDataTypes.length; ++j) - object.purgeDataTypes[j] = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.SecuritySettings.PurgeDataType[message.purgeDataTypes[j]] : message.purgeDataTypes[j]; - } - if (message.inspectTemplate != null && message.hasOwnProperty("inspectTemplate")) - object.inspectTemplate = message.inspectTemplate; - return object; - }; + /** + * Creates a new Part instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part + * @static + * @param {google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.IPart=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part} Part instance + */ + Part.create = function create(properties) { + return new Part(properties); + }; - /** - * Converts this SecuritySettings to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings - * @instance - * @returns {Object.} JSON object - */ - SecuritySettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Encodes the specified Part message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part + * @static + * @param {google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.IPart} message Part message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Part.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.text != null && Object.hasOwnProperty.call(message, "text")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.text); + if (message.parameterId != null && Object.hasOwnProperty.call(message, "parameterId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.parameterId); + return writer; + }; - /** - * RedactionStrategy enum. - * @name google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionStrategy - * @enum {number} - * @property {number} REDACTION_STRATEGY_UNSPECIFIED=0 REDACTION_STRATEGY_UNSPECIFIED value - * @property {number} REDACT_WITH_SERVICE=1 REDACT_WITH_SERVICE value - */ - SecuritySettings.RedactionStrategy = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "REDACTION_STRATEGY_UNSPECIFIED"] = 0; - values[valuesById[1] = "REDACT_WITH_SERVICE"] = 1; - return values; - })(); + /** + * Encodes the specified Part message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part + * @static + * @param {google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.IPart} message Part message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Part.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * RedactionScope enum. - * @name google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionScope - * @enum {number} - * @property {number} REDACTION_SCOPE_UNSPECIFIED=0 REDACTION_SCOPE_UNSPECIFIED value - * @property {number} REDACT_DISK_STORAGE=2 REDACT_DISK_STORAGE value - */ - SecuritySettings.RedactionScope = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "REDACTION_SCOPE_UNSPECIFIED"] = 0; - values[valuesById[2] = "REDACT_DISK_STORAGE"] = 2; - return values; - })(); + /** + * Decodes a Part message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part} Part + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Part.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.text = reader.string(); + break; + case 2: + message.parameterId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * PurgeDataType enum. - * @name google.cloud.dialogflow.cx.v3.SecuritySettings.PurgeDataType - * @enum {number} - * @property {number} PURGE_DATA_TYPE_UNSPECIFIED=0 PURGE_DATA_TYPE_UNSPECIFIED value - * @property {number} DIALOGFLOW_HISTORY=1 DIALOGFLOW_HISTORY value - */ - SecuritySettings.PurgeDataType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PURGE_DATA_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DIALOGFLOW_HISTORY"] = 1; - return values; - })(); + /** + * Decodes a Part message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part} Part + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Part.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - return SecuritySettings; - })(); + /** + * Verifies a Part message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Part.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.text != null && message.hasOwnProperty("text")) + if (!$util.isString(message.text)) + return "text: string expected"; + if (message.parameterId != null && message.hasOwnProperty("parameterId")) + if (!$util.isString(message.parameterId)) + return "parameterId: string expected"; + return null; + }; - v3.Sessions = (function() { + /** + * Creates a Part message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part} Part + */ + Part.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part(); + if (object.text != null) + message.text = String(object.text); + if (object.parameterId != null) + message.parameterId = String(object.parameterId); + return message; + }; - /** - * Constructs a new Sessions service. - * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a Sessions - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function Sessions(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } + /** + * Creates a plain object from a Part message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part + * @static + * @param {google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part} message Part + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Part.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.text = ""; + object.parameterId = ""; + } + if (message.text != null && message.hasOwnProperty("text")) + object.text = message.text; + if (message.parameterId != null && message.hasOwnProperty("parameterId")) + object.parameterId = message.parameterId; + return object; + }; - (Sessions.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Sessions; + /** + * Converts this Part to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part + * @instance + * @returns {Object.} JSON object + */ + Part.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates new Sessions service using the specified rpc implementation. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.Sessions - * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {Sessions} RPC service. Useful where requests and/or responses are streamed. - */ - Sessions.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; + return Part; + })(); - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Sessions#detectIntent}. - * @memberof google.cloud.dialogflow.cx.v3.Sessions - * @typedef DetectIntentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.DetectIntentResponse} [response] DetectIntentResponse - */ + return TrainingPhrase; + })(); - /** - * Calls DetectIntent. - * @function detectIntent - * @memberof google.cloud.dialogflow.cx.v3.Sessions - * @instance - * @param {google.cloud.dialogflow.cx.v3.IDetectIntentRequest} request DetectIntentRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Sessions.DetectIntentCallback} callback Node-style callback called with the error, if any, and DetectIntentResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Sessions.prototype.detectIntent = function detectIntent(request, callback) { - return this.rpcCall(detectIntent, $root.google.cloud.dialogflow.cx.v3.DetectIntentRequest, $root.google.cloud.dialogflow.cx.v3.DetectIntentResponse, request, callback); - }, "name", { value: "DetectIntent" }); + Intent.Parameter = (function() { - /** - * Calls DetectIntent. - * @function detectIntent - * @memberof google.cloud.dialogflow.cx.v3.Sessions - * @instance - * @param {google.cloud.dialogflow.cx.v3.IDetectIntentRequest} request DetectIntentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Properties of a Parameter. + * @memberof google.cloud.dialogflow.cx.v3.Intent + * @interface IParameter + * @property {string|null} [id] Parameter id + * @property {string|null} [entityType] Parameter entityType + * @property {boolean|null} [isList] Parameter isList + * @property {boolean|null} [redact] Parameter redact + */ - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Sessions#streamingDetectIntent}. - * @memberof google.cloud.dialogflow.cx.v3.Sessions - * @typedef StreamingDetectIntentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse} [response] StreamingDetectIntentResponse - */ + /** + * Constructs a new Parameter. + * @memberof google.cloud.dialogflow.cx.v3.Intent + * @classdesc Represents a Parameter. + * @implements IParameter + * @constructor + * @param {google.cloud.dialogflow.cx.v3.Intent.IParameter=} [properties] Properties to set + */ + function Parameter(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Calls StreamingDetectIntent. - * @function streamingDetectIntent - * @memberof google.cloud.dialogflow.cx.v3.Sessions - * @instance - * @param {google.cloud.dialogflow.cx.v3.IStreamingDetectIntentRequest} request StreamingDetectIntentRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Sessions.StreamingDetectIntentCallback} callback Node-style callback called with the error, if any, and StreamingDetectIntentResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Sessions.prototype.streamingDetectIntent = function streamingDetectIntent(request, callback) { - return this.rpcCall(streamingDetectIntent, $root.google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest, $root.google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse, request, callback); - }, "name", { value: "StreamingDetectIntent" }); + /** + * Parameter id. + * @member {string} id + * @memberof google.cloud.dialogflow.cx.v3.Intent.Parameter + * @instance + */ + Parameter.prototype.id = ""; - /** - * Calls StreamingDetectIntent. - * @function streamingDetectIntent - * @memberof google.cloud.dialogflow.cx.v3.Sessions - * @instance - * @param {google.cloud.dialogflow.cx.v3.IStreamingDetectIntentRequest} request StreamingDetectIntentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Parameter entityType. + * @member {string} entityType + * @memberof google.cloud.dialogflow.cx.v3.Intent.Parameter + * @instance + */ + Parameter.prototype.entityType = ""; - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Sessions#matchIntent}. - * @memberof google.cloud.dialogflow.cx.v3.Sessions - * @typedef MatchIntentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.MatchIntentResponse} [response] MatchIntentResponse - */ + /** + * Parameter isList. + * @member {boolean} isList + * @memberof google.cloud.dialogflow.cx.v3.Intent.Parameter + * @instance + */ + Parameter.prototype.isList = false; - /** - * Calls MatchIntent. - * @function matchIntent - * @memberof google.cloud.dialogflow.cx.v3.Sessions - * @instance - * @param {google.cloud.dialogflow.cx.v3.IMatchIntentRequest} request MatchIntentRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Sessions.MatchIntentCallback} callback Node-style callback called with the error, if any, and MatchIntentResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Sessions.prototype.matchIntent = function matchIntent(request, callback) { - return this.rpcCall(matchIntent, $root.google.cloud.dialogflow.cx.v3.MatchIntentRequest, $root.google.cloud.dialogflow.cx.v3.MatchIntentResponse, request, callback); - }, "name", { value: "MatchIntent" }); + /** + * Parameter redact. + * @member {boolean} redact + * @memberof google.cloud.dialogflow.cx.v3.Intent.Parameter + * @instance + */ + Parameter.prototype.redact = false; - /** - * Calls MatchIntent. - * @function matchIntent - * @memberof google.cloud.dialogflow.cx.v3.Sessions - * @instance - * @param {google.cloud.dialogflow.cx.v3.IMatchIntentRequest} request MatchIntentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Creates a new Parameter instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.Intent.Parameter + * @static + * @param {google.cloud.dialogflow.cx.v3.Intent.IParameter=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Intent.Parameter} Parameter instance + */ + Parameter.create = function create(properties) { + return new Parameter(properties); + }; - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Sessions#fulfillIntent}. - * @memberof google.cloud.dialogflow.cx.v3.Sessions - * @typedef FulfillIntentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.FulfillIntentResponse} [response] FulfillIntentResponse - */ + /** + * Encodes the specified Parameter message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Intent.Parameter.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.Intent.Parameter + * @static + * @param {google.cloud.dialogflow.cx.v3.Intent.IParameter} message Parameter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Parameter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.entityType != null && Object.hasOwnProperty.call(message, "entityType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.entityType); + if (message.isList != null && Object.hasOwnProperty.call(message, "isList")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.isList); + if (message.redact != null && Object.hasOwnProperty.call(message, "redact")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.redact); + return writer; + }; - /** - * Calls FulfillIntent. - * @function fulfillIntent - * @memberof google.cloud.dialogflow.cx.v3.Sessions - * @instance - * @param {google.cloud.dialogflow.cx.v3.IFulfillIntentRequest} request FulfillIntentRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Sessions.FulfillIntentCallback} callback Node-style callback called with the error, if any, and FulfillIntentResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Sessions.prototype.fulfillIntent = function fulfillIntent(request, callback) { - return this.rpcCall(fulfillIntent, $root.google.cloud.dialogflow.cx.v3.FulfillIntentRequest, $root.google.cloud.dialogflow.cx.v3.FulfillIntentResponse, request, callback); - }, "name", { value: "FulfillIntent" }); + /** + * Encodes the specified Parameter message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Intent.Parameter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Intent.Parameter + * @static + * @param {google.cloud.dialogflow.cx.v3.Intent.IParameter} message Parameter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Parameter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Calls FulfillIntent. - * @function fulfillIntent - * @memberof google.cloud.dialogflow.cx.v3.Sessions - * @instance - * @param {google.cloud.dialogflow.cx.v3.IFulfillIntentRequest} request FulfillIntentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Decodes a Parameter message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.Intent.Parameter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3.Intent.Parameter} Parameter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Parameter.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.Intent.Parameter(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.id = reader.string(); + break; + case 2: + message.entityType = reader.string(); + break; + case 3: + message.isList = reader.bool(); + break; + case 4: + message.redact = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - return Sessions; + /** + * Decodes a Parameter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Intent.Parameter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.Intent.Parameter} Parameter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Parameter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Parameter message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.Intent.Parameter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Parameter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.entityType != null && message.hasOwnProperty("entityType")) + if (!$util.isString(message.entityType)) + return "entityType: string expected"; + if (message.isList != null && message.hasOwnProperty("isList")) + if (typeof message.isList !== "boolean") + return "isList: boolean expected"; + if (message.redact != null && message.hasOwnProperty("redact")) + if (typeof message.redact !== "boolean") + return "redact: boolean expected"; + return null; + }; + + /** + * Creates a Parameter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.Intent.Parameter + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.Intent.Parameter} Parameter + */ + Parameter.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.Intent.Parameter) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.Intent.Parameter(); + if (object.id != null) + message.id = String(object.id); + if (object.entityType != null) + message.entityType = String(object.entityType); + if (object.isList != null) + message.isList = Boolean(object.isList); + if (object.redact != null) + message.redact = Boolean(object.redact); + return message; + }; + + /** + * Creates a plain object from a Parameter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.Intent.Parameter + * @static + * @param {google.cloud.dialogflow.cx.v3.Intent.Parameter} message Parameter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Parameter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.id = ""; + object.entityType = ""; + object.isList = false; + object.redact = false; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.entityType != null && message.hasOwnProperty("entityType")) + object.entityType = message.entityType; + if (message.isList != null && message.hasOwnProperty("isList")) + object.isList = message.isList; + if (message.redact != null && message.hasOwnProperty("redact")) + object.redact = message.redact; + return object; + }; + + /** + * Converts this Parameter to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.Intent.Parameter + * @instance + * @returns {Object.} JSON object + */ + Parameter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Parameter; + })(); + + return Intent; })(); - v3.DetectIntentRequest = (function() { + v3.ListIntentsRequest = (function() { /** - * Properties of a DetectIntentRequest. + * Properties of a ListIntentsRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IDetectIntentRequest - * @property {string|null} [session] DetectIntentRequest session - * @property {google.cloud.dialogflow.cx.v3.IQueryParameters|null} [queryParams] DetectIntentRequest queryParams - * @property {google.cloud.dialogflow.cx.v3.IQueryInput|null} [queryInput] DetectIntentRequest queryInput - * @property {google.cloud.dialogflow.cx.v3.IOutputAudioConfig|null} [outputAudioConfig] DetectIntentRequest outputAudioConfig + * @interface IListIntentsRequest + * @property {string|null} [parent] ListIntentsRequest parent + * @property {string|null} [languageCode] ListIntentsRequest languageCode + * @property {google.cloud.dialogflow.cx.v3.IntentView|null} [intentView] ListIntentsRequest intentView + * @property {number|null} [pageSize] ListIntentsRequest pageSize + * @property {string|null} [pageToken] ListIntentsRequest pageToken */ /** - * Constructs a new DetectIntentRequest. + * Constructs a new ListIntentsRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a DetectIntentRequest. - * @implements IDetectIntentRequest + * @classdesc Represents a ListIntentsRequest. + * @implements IListIntentsRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IDetectIntentRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IListIntentsRequest=} [properties] Properties to set */ - function DetectIntentRequest(properties) { + function ListIntentsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -23431,114 +24337,127 @@ } /** - * DetectIntentRequest session. - * @member {string} session - * @memberof google.cloud.dialogflow.cx.v3.DetectIntentRequest + * ListIntentsRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3.ListIntentsRequest * @instance */ - DetectIntentRequest.prototype.session = ""; + ListIntentsRequest.prototype.parent = ""; /** - * DetectIntentRequest queryParams. - * @member {google.cloud.dialogflow.cx.v3.IQueryParameters|null|undefined} queryParams - * @memberof google.cloud.dialogflow.cx.v3.DetectIntentRequest + * ListIntentsRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3.ListIntentsRequest * @instance */ - DetectIntentRequest.prototype.queryParams = null; + ListIntentsRequest.prototype.languageCode = ""; /** - * DetectIntentRequest queryInput. - * @member {google.cloud.dialogflow.cx.v3.IQueryInput|null|undefined} queryInput - * @memberof google.cloud.dialogflow.cx.v3.DetectIntentRequest + * ListIntentsRequest intentView. + * @member {google.cloud.dialogflow.cx.v3.IntentView} intentView + * @memberof google.cloud.dialogflow.cx.v3.ListIntentsRequest * @instance */ - DetectIntentRequest.prototype.queryInput = null; + ListIntentsRequest.prototype.intentView = 0; /** - * DetectIntentRequest outputAudioConfig. - * @member {google.cloud.dialogflow.cx.v3.IOutputAudioConfig|null|undefined} outputAudioConfig - * @memberof google.cloud.dialogflow.cx.v3.DetectIntentRequest + * ListIntentsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dialogflow.cx.v3.ListIntentsRequest * @instance */ - DetectIntentRequest.prototype.outputAudioConfig = null; + ListIntentsRequest.prototype.pageSize = 0; /** - * Creates a new DetectIntentRequest instance using the specified properties. + * ListIntentsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dialogflow.cx.v3.ListIntentsRequest + * @instance + */ + ListIntentsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListIntentsRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.DetectIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListIntentsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IDetectIntentRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.DetectIntentRequest} DetectIntentRequest instance + * @param {google.cloud.dialogflow.cx.v3.IListIntentsRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ListIntentsRequest} ListIntentsRequest instance */ - DetectIntentRequest.create = function create(properties) { - return new DetectIntentRequest(properties); + ListIntentsRequest.create = function create(properties) { + return new ListIntentsRequest(properties); }; /** - * Encodes the specified DetectIntentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DetectIntentRequest.verify|verify} messages. + * Encodes the specified ListIntentsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListIntentsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.DetectIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListIntentsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IDetectIntentRequest} message DetectIntentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListIntentsRequest} message ListIntentsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DetectIntentRequest.encode = function encode(message, writer) { + ListIntentsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.session != null && Object.hasOwnProperty.call(message, "session")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.session); - if (message.queryParams != null && Object.hasOwnProperty.call(message, "queryParams")) - $root.google.cloud.dialogflow.cx.v3.QueryParameters.encode(message.queryParams, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.queryInput != null && Object.hasOwnProperty.call(message, "queryInput")) - $root.google.cloud.dialogflow.cx.v3.QueryInput.encode(message.queryInput, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.outputAudioConfig != null && Object.hasOwnProperty.call(message, "outputAudioConfig")) - $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.encode(message.outputAudioConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); + if (message.intentView != null && Object.hasOwnProperty.call(message, "intentView")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.intentView); return writer; }; /** - * Encodes the specified DetectIntentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DetectIntentRequest.verify|verify} messages. + * Encodes the specified ListIntentsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListIntentsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.DetectIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListIntentsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IDetectIntentRequest} message DetectIntentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListIntentsRequest} message ListIntentsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DetectIntentRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListIntentsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DetectIntentRequest message from the specified reader or buffer. + * Decodes a ListIntentsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.DetectIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListIntentsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.DetectIntentRequest} DetectIntentRequest + * @returns {google.cloud.dialogflow.cx.v3.ListIntentsRequest} ListIntentsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DetectIntentRequest.decode = function decode(reader, length) { + ListIntentsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.DetectIntentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ListIntentsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.session = reader.string(); + message.parent = reader.string(); break; case 2: - message.queryParams = $root.google.cloud.dialogflow.cx.v3.QueryParameters.decode(reader, reader.uint32()); + message.languageCode = reader.string(); + break; + case 5: + message.intentView = reader.int32(); break; case 3: - message.queryInput = $root.google.cloud.dialogflow.cx.v3.QueryInput.decode(reader, reader.uint32()); + message.pageSize = reader.int32(); break; case 4: - message.outputAudioConfig = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.decode(reader, reader.uint32()); + message.pageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -23549,150 +24468,160 @@ }; /** - * Decodes a DetectIntentRequest message from the specified reader or buffer, length delimited. + * Decodes a ListIntentsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.DetectIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListIntentsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.DetectIntentRequest} DetectIntentRequest + * @returns {google.cloud.dialogflow.cx.v3.ListIntentsRequest} ListIntentsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DetectIntentRequest.decodeDelimited = function decodeDelimited(reader) { + ListIntentsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DetectIntentRequest message. + * Verifies a ListIntentsRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.DetectIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListIntentsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DetectIntentRequest.verify = function verify(message) { + ListIntentsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.session != null && message.hasOwnProperty("session")) - if (!$util.isString(message.session)) - return "session: string expected"; - if (message.queryParams != null && message.hasOwnProperty("queryParams")) { - var error = $root.google.cloud.dialogflow.cx.v3.QueryParameters.verify(message.queryParams); - if (error) - return "queryParams." + error; - } - if (message.queryInput != null && message.hasOwnProperty("queryInput")) { - var error = $root.google.cloud.dialogflow.cx.v3.QueryInput.verify(message.queryInput); - if (error) - return "queryInput." + error; - } - if (message.outputAudioConfig != null && message.hasOwnProperty("outputAudioConfig")) { - var error = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.verify(message.outputAudioConfig); - if (error) - return "outputAudioConfig." + error; - } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; + if (message.intentView != null && message.hasOwnProperty("intentView")) + switch (message.intentView) { + default: + return "intentView: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; return null; }; /** - * Creates a DetectIntentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListIntentsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.DetectIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListIntentsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.DetectIntentRequest} DetectIntentRequest + * @returns {google.cloud.dialogflow.cx.v3.ListIntentsRequest} ListIntentsRequest */ - DetectIntentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.DetectIntentRequest) + ListIntentsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListIntentsRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.DetectIntentRequest(); - if (object.session != null) - message.session = String(object.session); - if (object.queryParams != null) { - if (typeof object.queryParams !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.DetectIntentRequest.queryParams: object expected"); - message.queryParams = $root.google.cloud.dialogflow.cx.v3.QueryParameters.fromObject(object.queryParams); - } - if (object.queryInput != null) { - if (typeof object.queryInput !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.DetectIntentRequest.queryInput: object expected"); - message.queryInput = $root.google.cloud.dialogflow.cx.v3.QueryInput.fromObject(object.queryInput); - } - if (object.outputAudioConfig != null) { - if (typeof object.outputAudioConfig !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.DetectIntentRequest.outputAudioConfig: object expected"); - message.outputAudioConfig = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.fromObject(object.outputAudioConfig); + var message = new $root.google.cloud.dialogflow.cx.v3.ListIntentsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.languageCode != null) + message.languageCode = String(object.languageCode); + switch (object.intentView) { + case "INTENT_VIEW_UNSPECIFIED": + case 0: + message.intentView = 0; + break; + case "INTENT_VIEW_PARTIAL": + case 1: + message.intentView = 1; + break; + case "INTENT_VIEW_FULL": + case 2: + message.intentView = 2; + break; } + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); return message; }; /** - * Creates a plain object from a DetectIntentRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListIntentsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.DetectIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListIntentsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.DetectIntentRequest} message DetectIntentRequest + * @param {google.cloud.dialogflow.cx.v3.ListIntentsRequest} message ListIntentsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DetectIntentRequest.toObject = function toObject(message, options) { + ListIntentsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.session = ""; - object.queryParams = null; - object.queryInput = null; - object.outputAudioConfig = null; + object.parent = ""; + object.languageCode = ""; + object.pageSize = 0; + object.pageToken = ""; + object.intentView = options.enums === String ? "INTENT_VIEW_UNSPECIFIED" : 0; } - if (message.session != null && message.hasOwnProperty("session")) - object.session = message.session; - if (message.queryParams != null && message.hasOwnProperty("queryParams")) - object.queryParams = $root.google.cloud.dialogflow.cx.v3.QueryParameters.toObject(message.queryParams, options); - if (message.queryInput != null && message.hasOwnProperty("queryInput")) - object.queryInput = $root.google.cloud.dialogflow.cx.v3.QueryInput.toObject(message.queryInput, options); - if (message.outputAudioConfig != null && message.hasOwnProperty("outputAudioConfig")) - object.outputAudioConfig = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.toObject(message.outputAudioConfig, options); + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.intentView != null && message.hasOwnProperty("intentView")) + object.intentView = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.IntentView[message.intentView] : message.intentView; return object; }; /** - * Converts this DetectIntentRequest to JSON. + * Converts this ListIntentsRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.DetectIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListIntentsRequest * @instance * @returns {Object.} JSON object */ - DetectIntentRequest.prototype.toJSON = function toJSON() { + ListIntentsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DetectIntentRequest; + return ListIntentsRequest; })(); - v3.DetectIntentResponse = (function() { + v3.ListIntentsResponse = (function() { /** - * Properties of a DetectIntentResponse. + * Properties of a ListIntentsResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IDetectIntentResponse - * @property {string|null} [responseId] DetectIntentResponse responseId - * @property {google.cloud.dialogflow.cx.v3.IQueryResult|null} [queryResult] DetectIntentResponse queryResult - * @property {Uint8Array|null} [outputAudio] DetectIntentResponse outputAudio - * @property {google.cloud.dialogflow.cx.v3.IOutputAudioConfig|null} [outputAudioConfig] DetectIntentResponse outputAudioConfig + * @interface IListIntentsResponse + * @property {Array.|null} [intents] ListIntentsResponse intents + * @property {string|null} [nextPageToken] ListIntentsResponse nextPageToken */ /** - * Constructs a new DetectIntentResponse. + * Constructs a new ListIntentsResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a DetectIntentResponse. - * @implements IDetectIntentResponse + * @classdesc Represents a ListIntentsResponse. + * @implements IListIntentsResponse * @constructor - * @param {google.cloud.dialogflow.cx.v3.IDetectIntentResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IListIntentsResponse=} [properties] Properties to set */ - function DetectIntentResponse(properties) { + function ListIntentsResponse(properties) { + this.intents = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -23700,114 +24629,91 @@ } /** - * DetectIntentResponse responseId. - * @member {string} responseId - * @memberof google.cloud.dialogflow.cx.v3.DetectIntentResponse - * @instance - */ - DetectIntentResponse.prototype.responseId = ""; - - /** - * DetectIntentResponse queryResult. - * @member {google.cloud.dialogflow.cx.v3.IQueryResult|null|undefined} queryResult - * @memberof google.cloud.dialogflow.cx.v3.DetectIntentResponse - * @instance - */ - DetectIntentResponse.prototype.queryResult = null; - - /** - * DetectIntentResponse outputAudio. - * @member {Uint8Array} outputAudio - * @memberof google.cloud.dialogflow.cx.v3.DetectIntentResponse + * ListIntentsResponse intents. + * @member {Array.} intents + * @memberof google.cloud.dialogflow.cx.v3.ListIntentsResponse * @instance */ - DetectIntentResponse.prototype.outputAudio = $util.newBuffer([]); + ListIntentsResponse.prototype.intents = $util.emptyArray; /** - * DetectIntentResponse outputAudioConfig. - * @member {google.cloud.dialogflow.cx.v3.IOutputAudioConfig|null|undefined} outputAudioConfig - * @memberof google.cloud.dialogflow.cx.v3.DetectIntentResponse + * ListIntentsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dialogflow.cx.v3.ListIntentsResponse * @instance */ - DetectIntentResponse.prototype.outputAudioConfig = null; + ListIntentsResponse.prototype.nextPageToken = ""; /** - * Creates a new DetectIntentResponse instance using the specified properties. + * Creates a new ListIntentsResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.DetectIntentResponse + * @memberof google.cloud.dialogflow.cx.v3.ListIntentsResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IDetectIntentResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.DetectIntentResponse} DetectIntentResponse instance + * @param {google.cloud.dialogflow.cx.v3.IListIntentsResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ListIntentsResponse} ListIntentsResponse instance */ - DetectIntentResponse.create = function create(properties) { - return new DetectIntentResponse(properties); + ListIntentsResponse.create = function create(properties) { + return new ListIntentsResponse(properties); }; /** - * Encodes the specified DetectIntentResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DetectIntentResponse.verify|verify} messages. + * Encodes the specified ListIntentsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListIntentsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.DetectIntentResponse + * @memberof google.cloud.dialogflow.cx.v3.ListIntentsResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IDetectIntentResponse} message DetectIntentResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListIntentsResponse} message ListIntentsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DetectIntentResponse.encode = function encode(message, writer) { + ListIntentsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.responseId != null && Object.hasOwnProperty.call(message, "responseId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.responseId); - if (message.queryResult != null && Object.hasOwnProperty.call(message, "queryResult")) - $root.google.cloud.dialogflow.cx.v3.QueryResult.encode(message.queryResult, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.outputAudio != null && Object.hasOwnProperty.call(message, "outputAudio")) - writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.outputAudio); - if (message.outputAudioConfig != null && Object.hasOwnProperty.call(message, "outputAudioConfig")) - $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.encode(message.outputAudioConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.intents != null && message.intents.length) + for (var i = 0; i < message.intents.length; ++i) + $root.google.cloud.dialogflow.cx.v3.Intent.encode(message.intents[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified DetectIntentResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DetectIntentResponse.verify|verify} messages. + * Encodes the specified ListIntentsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListIntentsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.DetectIntentResponse + * @memberof google.cloud.dialogflow.cx.v3.ListIntentsResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IDetectIntentResponse} message DetectIntentResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListIntentsResponse} message ListIntentsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DetectIntentResponse.encodeDelimited = function encodeDelimited(message, writer) { + ListIntentsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DetectIntentResponse message from the specified reader or buffer. + * Decodes a ListIntentsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.DetectIntentResponse + * @memberof google.cloud.dialogflow.cx.v3.ListIntentsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.DetectIntentResponse} DetectIntentResponse + * @returns {google.cloud.dialogflow.cx.v3.ListIntentsResponse} ListIntentsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DetectIntentResponse.decode = function decode(reader, length) { + ListIntentsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.DetectIntentResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ListIntentsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.responseId = reader.string(); + if (!(message.intents && message.intents.length)) + message.intents = []; + message.intents.push($root.google.cloud.dialogflow.cx.v3.Intent.decode(reader, reader.uint32())); break; case 2: - message.queryResult = $root.google.cloud.dialogflow.cx.v3.QueryResult.decode(reader, reader.uint32()); - break; - case 4: - message.outputAudio = reader.bytes(); - break; - case 5: - message.outputAudioConfig = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.decode(reader, reader.uint32()); + message.nextPageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -23818,154 +24724,134 @@ }; /** - * Decodes a DetectIntentResponse message from the specified reader or buffer, length delimited. + * Decodes a ListIntentsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.DetectIntentResponse + * @memberof google.cloud.dialogflow.cx.v3.ListIntentsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.DetectIntentResponse} DetectIntentResponse + * @returns {google.cloud.dialogflow.cx.v3.ListIntentsResponse} ListIntentsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DetectIntentResponse.decodeDelimited = function decodeDelimited(reader) { + ListIntentsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DetectIntentResponse message. + * Verifies a ListIntentsResponse message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.DetectIntentResponse + * @memberof google.cloud.dialogflow.cx.v3.ListIntentsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DetectIntentResponse.verify = function verify(message) { + ListIntentsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.responseId != null && message.hasOwnProperty("responseId")) - if (!$util.isString(message.responseId)) - return "responseId: string expected"; - if (message.queryResult != null && message.hasOwnProperty("queryResult")) { - var error = $root.google.cloud.dialogflow.cx.v3.QueryResult.verify(message.queryResult); - if (error) - return "queryResult." + error; - } - if (message.outputAudio != null && message.hasOwnProperty("outputAudio")) - if (!(message.outputAudio && typeof message.outputAudio.length === "number" || $util.isString(message.outputAudio))) - return "outputAudio: buffer expected"; - if (message.outputAudioConfig != null && message.hasOwnProperty("outputAudioConfig")) { - var error = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.verify(message.outputAudioConfig); - if (error) - return "outputAudioConfig." + error; + if (message.intents != null && message.hasOwnProperty("intents")) { + if (!Array.isArray(message.intents)) + return "intents: array expected"; + for (var i = 0; i < message.intents.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.Intent.verify(message.intents[i]); + if (error) + return "intents." + error; + } } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a DetectIntentResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListIntentsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.DetectIntentResponse + * @memberof google.cloud.dialogflow.cx.v3.ListIntentsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.DetectIntentResponse} DetectIntentResponse + * @returns {google.cloud.dialogflow.cx.v3.ListIntentsResponse} ListIntentsResponse */ - DetectIntentResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.DetectIntentResponse) + ListIntentsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListIntentsResponse) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.DetectIntentResponse(); - if (object.responseId != null) - message.responseId = String(object.responseId); - if (object.queryResult != null) { - if (typeof object.queryResult !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.DetectIntentResponse.queryResult: object expected"); - message.queryResult = $root.google.cloud.dialogflow.cx.v3.QueryResult.fromObject(object.queryResult); - } - if (object.outputAudio != null) - if (typeof object.outputAudio === "string") - $util.base64.decode(object.outputAudio, message.outputAudio = $util.newBuffer($util.base64.length(object.outputAudio)), 0); - else if (object.outputAudio.length) - message.outputAudio = object.outputAudio; - if (object.outputAudioConfig != null) { - if (typeof object.outputAudioConfig !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.DetectIntentResponse.outputAudioConfig: object expected"); - message.outputAudioConfig = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.fromObject(object.outputAudioConfig); + var message = new $root.google.cloud.dialogflow.cx.v3.ListIntentsResponse(); + if (object.intents) { + if (!Array.isArray(object.intents)) + throw TypeError(".google.cloud.dialogflow.cx.v3.ListIntentsResponse.intents: array expected"); + message.intents = []; + for (var i = 0; i < object.intents.length; ++i) { + if (typeof object.intents[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.ListIntentsResponse.intents: object expected"); + message.intents[i] = $root.google.cloud.dialogflow.cx.v3.Intent.fromObject(object.intents[i]); + } } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a DetectIntentResponse message. Also converts values to other types if specified. + * Creates a plain object from a ListIntentsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.DetectIntentResponse + * @memberof google.cloud.dialogflow.cx.v3.ListIntentsResponse * @static - * @param {google.cloud.dialogflow.cx.v3.DetectIntentResponse} message DetectIntentResponse + * @param {google.cloud.dialogflow.cx.v3.ListIntentsResponse} message ListIntentsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DetectIntentResponse.toObject = function toObject(message, options) { + ListIntentsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.responseId = ""; - object.queryResult = null; - if (options.bytes === String) - object.outputAudio = ""; - else { - object.outputAudio = []; - if (options.bytes !== Array) - object.outputAudio = $util.newBuffer(object.outputAudio); - } - object.outputAudioConfig = null; + if (options.arrays || options.defaults) + object.intents = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.intents && message.intents.length) { + object.intents = []; + for (var j = 0; j < message.intents.length; ++j) + object.intents[j] = $root.google.cloud.dialogflow.cx.v3.Intent.toObject(message.intents[j], options); } - if (message.responseId != null && message.hasOwnProperty("responseId")) - object.responseId = message.responseId; - if (message.queryResult != null && message.hasOwnProperty("queryResult")) - object.queryResult = $root.google.cloud.dialogflow.cx.v3.QueryResult.toObject(message.queryResult, options); - if (message.outputAudio != null && message.hasOwnProperty("outputAudio")) - object.outputAudio = options.bytes === String ? $util.base64.encode(message.outputAudio, 0, message.outputAudio.length) : options.bytes === Array ? Array.prototype.slice.call(message.outputAudio) : message.outputAudio; - if (message.outputAudioConfig != null && message.hasOwnProperty("outputAudioConfig")) - object.outputAudioConfig = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.toObject(message.outputAudioConfig, options); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this DetectIntentResponse to JSON. + * Converts this ListIntentsResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.DetectIntentResponse + * @memberof google.cloud.dialogflow.cx.v3.ListIntentsResponse * @instance * @returns {Object.} JSON object */ - DetectIntentResponse.prototype.toJSON = function toJSON() { + ListIntentsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DetectIntentResponse; + return ListIntentsResponse; })(); - v3.StreamingDetectIntentRequest = (function() { + v3.GetIntentRequest = (function() { /** - * Properties of a StreamingDetectIntentRequest. + * Properties of a GetIntentRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IStreamingDetectIntentRequest - * @property {string|null} [session] StreamingDetectIntentRequest session - * @property {google.cloud.dialogflow.cx.v3.IQueryParameters|null} [queryParams] StreamingDetectIntentRequest queryParams - * @property {google.cloud.dialogflow.cx.v3.IQueryInput|null} [queryInput] StreamingDetectIntentRequest queryInput - * @property {google.cloud.dialogflow.cx.v3.IOutputAudioConfig|null} [outputAudioConfig] StreamingDetectIntentRequest outputAudioConfig + * @interface IGetIntentRequest + * @property {string|null} [name] GetIntentRequest name + * @property {string|null} [languageCode] GetIntentRequest languageCode */ /** - * Constructs a new StreamingDetectIntentRequest. + * Constructs a new GetIntentRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a StreamingDetectIntentRequest. - * @implements IStreamingDetectIntentRequest + * @classdesc Represents a GetIntentRequest. + * @implements IGetIntentRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IStreamingDetectIntentRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IGetIntentRequest=} [properties] Properties to set */ - function StreamingDetectIntentRequest(properties) { + function GetIntentRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -23973,114 +24859,88 @@ } /** - * StreamingDetectIntentRequest session. - * @member {string} session - * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest - * @instance - */ - StreamingDetectIntentRequest.prototype.session = ""; - - /** - * StreamingDetectIntentRequest queryParams. - * @member {google.cloud.dialogflow.cx.v3.IQueryParameters|null|undefined} queryParams - * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest - * @instance - */ - StreamingDetectIntentRequest.prototype.queryParams = null; - - /** - * StreamingDetectIntentRequest queryInput. - * @member {google.cloud.dialogflow.cx.v3.IQueryInput|null|undefined} queryInput - * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest + * GetIntentRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.GetIntentRequest * @instance */ - StreamingDetectIntentRequest.prototype.queryInput = null; + GetIntentRequest.prototype.name = ""; /** - * StreamingDetectIntentRequest outputAudioConfig. - * @member {google.cloud.dialogflow.cx.v3.IOutputAudioConfig|null|undefined} outputAudioConfig - * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest + * GetIntentRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3.GetIntentRequest * @instance */ - StreamingDetectIntentRequest.prototype.outputAudioConfig = null; + GetIntentRequest.prototype.languageCode = ""; /** - * Creates a new StreamingDetectIntentRequest instance using the specified properties. + * Creates a new GetIntentRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.GetIntentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IStreamingDetectIntentRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest} StreamingDetectIntentRequest instance + * @param {google.cloud.dialogflow.cx.v3.IGetIntentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.GetIntentRequest} GetIntentRequest instance */ - StreamingDetectIntentRequest.create = function create(properties) { - return new StreamingDetectIntentRequest(properties); + GetIntentRequest.create = function create(properties) { + return new GetIntentRequest(properties); }; /** - * Encodes the specified StreamingDetectIntentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest.verify|verify} messages. + * Encodes the specified GetIntentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetIntentRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.GetIntentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IStreamingDetectIntentRequest} message StreamingDetectIntentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IGetIntentRequest} message GetIntentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StreamingDetectIntentRequest.encode = function encode(message, writer) { + GetIntentRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.session != null && Object.hasOwnProperty.call(message, "session")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.session); - if (message.queryParams != null && Object.hasOwnProperty.call(message, "queryParams")) - $root.google.cloud.dialogflow.cx.v3.QueryParameters.encode(message.queryParams, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.queryInput != null && Object.hasOwnProperty.call(message, "queryInput")) - $root.google.cloud.dialogflow.cx.v3.QueryInput.encode(message.queryInput, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.outputAudioConfig != null && Object.hasOwnProperty.call(message, "outputAudioConfig")) - $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.encode(message.outputAudioConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); return writer; }; /** - * Encodes the specified StreamingDetectIntentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest.verify|verify} messages. + * Encodes the specified GetIntentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetIntentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.GetIntentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IStreamingDetectIntentRequest} message StreamingDetectIntentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IGetIntentRequest} message GetIntentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StreamingDetectIntentRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetIntentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a StreamingDetectIntentRequest message from the specified reader or buffer. + * Decodes a GetIntentRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.GetIntentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest} StreamingDetectIntentRequest + * @returns {google.cloud.dialogflow.cx.v3.GetIntentRequest} GetIntentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StreamingDetectIntentRequest.decode = function decode(reader, length) { + GetIntentRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.GetIntentRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.session = reader.string(); + message.name = reader.string(); break; case 2: - message.queryParams = $root.google.cloud.dialogflow.cx.v3.QueryParameters.decode(reader, reader.uint32()); - break; - case 3: - message.queryInput = $root.google.cloud.dialogflow.cx.v3.QueryInput.decode(reader, reader.uint32()); - break; - case 4: - message.outputAudioConfig = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.decode(reader, reader.uint32()); + message.languageCode = reader.string(); break; default: reader.skipType(tag & 7); @@ -24091,148 +24951,118 @@ }; /** - * Decodes a StreamingDetectIntentRequest message from the specified reader or buffer, length delimited. + * Decodes a GetIntentRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.GetIntentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest} StreamingDetectIntentRequest + * @returns {google.cloud.dialogflow.cx.v3.GetIntentRequest} GetIntentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StreamingDetectIntentRequest.decodeDelimited = function decodeDelimited(reader) { + GetIntentRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a StreamingDetectIntentRequest message. + * Verifies a GetIntentRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.GetIntentRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - StreamingDetectIntentRequest.verify = function verify(message) { + GetIntentRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.session != null && message.hasOwnProperty("session")) - if (!$util.isString(message.session)) - return "session: string expected"; - if (message.queryParams != null && message.hasOwnProperty("queryParams")) { - var error = $root.google.cloud.dialogflow.cx.v3.QueryParameters.verify(message.queryParams); - if (error) - return "queryParams." + error; - } - if (message.queryInput != null && message.hasOwnProperty("queryInput")) { - var error = $root.google.cloud.dialogflow.cx.v3.QueryInput.verify(message.queryInput); - if (error) - return "queryInput." + error; - } - if (message.outputAudioConfig != null && message.hasOwnProperty("outputAudioConfig")) { - var error = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.verify(message.outputAudioConfig); - if (error) - return "outputAudioConfig." + error; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; return null; }; /** - * Creates a StreamingDetectIntentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetIntentRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.GetIntentRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest} StreamingDetectIntentRequest + * @returns {google.cloud.dialogflow.cx.v3.GetIntentRequest} GetIntentRequest */ - StreamingDetectIntentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest) + GetIntentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.GetIntentRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest(); - if (object.session != null) - message.session = String(object.session); - if (object.queryParams != null) { - if (typeof object.queryParams !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest.queryParams: object expected"); - message.queryParams = $root.google.cloud.dialogflow.cx.v3.QueryParameters.fromObject(object.queryParams); - } - if (object.queryInput != null) { - if (typeof object.queryInput !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest.queryInput: object expected"); - message.queryInput = $root.google.cloud.dialogflow.cx.v3.QueryInput.fromObject(object.queryInput); - } - if (object.outputAudioConfig != null) { - if (typeof object.outputAudioConfig !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest.outputAudioConfig: object expected"); - message.outputAudioConfig = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.fromObject(object.outputAudioConfig); - } + var message = new $root.google.cloud.dialogflow.cx.v3.GetIntentRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.languageCode != null) + message.languageCode = String(object.languageCode); return message; }; /** - * Creates a plain object from a StreamingDetectIntentRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetIntentRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.GetIntentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest} message StreamingDetectIntentRequest + * @param {google.cloud.dialogflow.cx.v3.GetIntentRequest} message GetIntentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StreamingDetectIntentRequest.toObject = function toObject(message, options) { + GetIntentRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.session = ""; - object.queryParams = null; - object.queryInput = null; - object.outputAudioConfig = null; + object.name = ""; + object.languageCode = ""; } - if (message.session != null && message.hasOwnProperty("session")) - object.session = message.session; - if (message.queryParams != null && message.hasOwnProperty("queryParams")) - object.queryParams = $root.google.cloud.dialogflow.cx.v3.QueryParameters.toObject(message.queryParams, options); - if (message.queryInput != null && message.hasOwnProperty("queryInput")) - object.queryInput = $root.google.cloud.dialogflow.cx.v3.QueryInput.toObject(message.queryInput, options); - if (message.outputAudioConfig != null && message.hasOwnProperty("outputAudioConfig")) - object.outputAudioConfig = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.toObject(message.outputAudioConfig, options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; return object; }; /** - * Converts this StreamingDetectIntentRequest to JSON. + * Converts this GetIntentRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.GetIntentRequest * @instance * @returns {Object.} JSON object */ - StreamingDetectIntentRequest.prototype.toJSON = function toJSON() { + GetIntentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return StreamingDetectIntentRequest; + return GetIntentRequest; })(); - v3.StreamingDetectIntentResponse = (function() { + v3.CreateIntentRequest = (function() { /** - * Properties of a StreamingDetectIntentResponse. + * Properties of a CreateIntentRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IStreamingDetectIntentResponse - * @property {google.cloud.dialogflow.cx.v3.IStreamingRecognitionResult|null} [recognitionResult] StreamingDetectIntentResponse recognitionResult - * @property {google.cloud.dialogflow.cx.v3.IDetectIntentResponse|null} [detectIntentResponse] StreamingDetectIntentResponse detectIntentResponse + * @interface ICreateIntentRequest + * @property {string|null} [parent] CreateIntentRequest parent + * @property {google.cloud.dialogflow.cx.v3.IIntent|null} [intent] CreateIntentRequest intent + * @property {string|null} [languageCode] CreateIntentRequest languageCode */ /** - * Constructs a new StreamingDetectIntentResponse. + * Constructs a new CreateIntentRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a StreamingDetectIntentResponse. - * @implements IStreamingDetectIntentResponse + * @classdesc Represents a CreateIntentRequest. + * @implements ICreateIntentRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IStreamingDetectIntentResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.ICreateIntentRequest=} [properties] Properties to set */ - function StreamingDetectIntentResponse(properties) { + function CreateIntentRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -24240,102 +25070,101 @@ } /** - * StreamingDetectIntentResponse recognitionResult. - * @member {google.cloud.dialogflow.cx.v3.IStreamingRecognitionResult|null|undefined} recognitionResult - * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse + * CreateIntentRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3.CreateIntentRequest * @instance */ - StreamingDetectIntentResponse.prototype.recognitionResult = null; + CreateIntentRequest.prototype.parent = ""; /** - * StreamingDetectIntentResponse detectIntentResponse. - * @member {google.cloud.dialogflow.cx.v3.IDetectIntentResponse|null|undefined} detectIntentResponse - * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse + * CreateIntentRequest intent. + * @member {google.cloud.dialogflow.cx.v3.IIntent|null|undefined} intent + * @memberof google.cloud.dialogflow.cx.v3.CreateIntentRequest * @instance */ - StreamingDetectIntentResponse.prototype.detectIntentResponse = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + CreateIntentRequest.prototype.intent = null; /** - * StreamingDetectIntentResponse response. - * @member {"recognitionResult"|"detectIntentResponse"|undefined} response - * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse + * CreateIntentRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3.CreateIntentRequest * @instance */ - Object.defineProperty(StreamingDetectIntentResponse.prototype, "response", { - get: $util.oneOfGetter($oneOfFields = ["recognitionResult", "detectIntentResponse"]), - set: $util.oneOfSetter($oneOfFields) - }); + CreateIntentRequest.prototype.languageCode = ""; /** - * Creates a new StreamingDetectIntentResponse instance using the specified properties. + * Creates a new CreateIntentRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse + * @memberof google.cloud.dialogflow.cx.v3.CreateIntentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IStreamingDetectIntentResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse} StreamingDetectIntentResponse instance - */ - StreamingDetectIntentResponse.create = function create(properties) { - return new StreamingDetectIntentResponse(properties); + * @param {google.cloud.dialogflow.cx.v3.ICreateIntentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.CreateIntentRequest} CreateIntentRequest instance + */ + CreateIntentRequest.create = function create(properties) { + return new CreateIntentRequest(properties); }; /** - * Encodes the specified StreamingDetectIntentResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse.verify|verify} messages. + * Encodes the specified CreateIntentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateIntentRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse + * @memberof google.cloud.dialogflow.cx.v3.CreateIntentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IStreamingDetectIntentResponse} message StreamingDetectIntentResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ICreateIntentRequest} message CreateIntentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StreamingDetectIntentResponse.encode = function encode(message, writer) { + CreateIntentRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.recognitionResult != null && Object.hasOwnProperty.call(message, "recognitionResult")) - $root.google.cloud.dialogflow.cx.v3.StreamingRecognitionResult.encode(message.recognitionResult, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.detectIntentResponse != null && Object.hasOwnProperty.call(message, "detectIntentResponse")) - $root.google.cloud.dialogflow.cx.v3.DetectIntentResponse.encode(message.detectIntentResponse, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.intent != null && Object.hasOwnProperty.call(message, "intent")) + $root.google.cloud.dialogflow.cx.v3.Intent.encode(message.intent, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.languageCode); return writer; }; /** - * Encodes the specified StreamingDetectIntentResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse.verify|verify} messages. + * Encodes the specified CreateIntentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateIntentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse + * @memberof google.cloud.dialogflow.cx.v3.CreateIntentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IStreamingDetectIntentResponse} message StreamingDetectIntentResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ICreateIntentRequest} message CreateIntentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StreamingDetectIntentResponse.encodeDelimited = function encodeDelimited(message, writer) { + CreateIntentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a StreamingDetectIntentResponse message from the specified reader or buffer. + * Decodes a CreateIntentRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse + * @memberof google.cloud.dialogflow.cx.v3.CreateIntentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse} StreamingDetectIntentResponse + * @returns {google.cloud.dialogflow.cx.v3.CreateIntentRequest} CreateIntentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StreamingDetectIntentResponse.decode = function decode(reader, length) { + CreateIntentRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.CreateIntentRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.recognitionResult = $root.google.cloud.dialogflow.cx.v3.StreamingRecognitionResult.decode(reader, reader.uint32()); + message.parent = reader.string(); break; case 2: - message.detectIntentResponse = $root.google.cloud.dialogflow.cx.v3.DetectIntentResponse.decode(reader, reader.uint32()); + message.intent = $root.google.cloud.dialogflow.cx.v3.Intent.decode(reader, reader.uint32()); + break; + case 3: + message.languageCode = reader.string(); break; default: reader.skipType(tag & 7); @@ -24346,144 +25175,131 @@ }; /** - * Decodes a StreamingDetectIntentResponse message from the specified reader or buffer, length delimited. + * Decodes a CreateIntentRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse + * @memberof google.cloud.dialogflow.cx.v3.CreateIntentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse} StreamingDetectIntentResponse + * @returns {google.cloud.dialogflow.cx.v3.CreateIntentRequest} CreateIntentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StreamingDetectIntentResponse.decodeDelimited = function decodeDelimited(reader) { + CreateIntentRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a StreamingDetectIntentResponse message. + * Verifies a CreateIntentRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse + * @memberof google.cloud.dialogflow.cx.v3.CreateIntentRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - StreamingDetectIntentResponse.verify = function verify(message) { + CreateIntentRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.recognitionResult != null && message.hasOwnProperty("recognitionResult")) { - properties.response = 1; - { - var error = $root.google.cloud.dialogflow.cx.v3.StreamingRecognitionResult.verify(message.recognitionResult); - if (error) - return "recognitionResult." + error; - } - } - if (message.detectIntentResponse != null && message.hasOwnProperty("detectIntentResponse")) { - if (properties.response === 1) - return "response: multiple values"; - properties.response = 1; - { - var error = $root.google.cloud.dialogflow.cx.v3.DetectIntentResponse.verify(message.detectIntentResponse); - if (error) - return "detectIntentResponse." + error; - } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.intent != null && message.hasOwnProperty("intent")) { + var error = $root.google.cloud.dialogflow.cx.v3.Intent.verify(message.intent); + if (error) + return "intent." + error; } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; return null; }; /** - * Creates a StreamingDetectIntentResponse message from a plain object. Also converts values to their respective internal types. + * Creates a CreateIntentRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse + * @memberof google.cloud.dialogflow.cx.v3.CreateIntentRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse} StreamingDetectIntentResponse + * @returns {google.cloud.dialogflow.cx.v3.CreateIntentRequest} CreateIntentRequest */ - StreamingDetectIntentResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse) + CreateIntentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.CreateIntentRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse(); - if (object.recognitionResult != null) { - if (typeof object.recognitionResult !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse.recognitionResult: object expected"); - message.recognitionResult = $root.google.cloud.dialogflow.cx.v3.StreamingRecognitionResult.fromObject(object.recognitionResult); - } - if (object.detectIntentResponse != null) { - if (typeof object.detectIntentResponse !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse.detectIntentResponse: object expected"); - message.detectIntentResponse = $root.google.cloud.dialogflow.cx.v3.DetectIntentResponse.fromObject(object.detectIntentResponse); + var message = new $root.google.cloud.dialogflow.cx.v3.CreateIntentRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.intent != null) { + if (typeof object.intent !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.CreateIntentRequest.intent: object expected"); + message.intent = $root.google.cloud.dialogflow.cx.v3.Intent.fromObject(object.intent); } + if (object.languageCode != null) + message.languageCode = String(object.languageCode); return message; }; /** - * Creates a plain object from a StreamingDetectIntentResponse message. Also converts values to other types if specified. + * Creates a plain object from a CreateIntentRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse + * @memberof google.cloud.dialogflow.cx.v3.CreateIntentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse} message StreamingDetectIntentResponse + * @param {google.cloud.dialogflow.cx.v3.CreateIntentRequest} message CreateIntentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StreamingDetectIntentResponse.toObject = function toObject(message, options) { + CreateIntentRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.recognitionResult != null && message.hasOwnProperty("recognitionResult")) { - object.recognitionResult = $root.google.cloud.dialogflow.cx.v3.StreamingRecognitionResult.toObject(message.recognitionResult, options); - if (options.oneofs) - object.response = "recognitionResult"; - } - if (message.detectIntentResponse != null && message.hasOwnProperty("detectIntentResponse")) { - object.detectIntentResponse = $root.google.cloud.dialogflow.cx.v3.DetectIntentResponse.toObject(message.detectIntentResponse, options); - if (options.oneofs) - object.response = "detectIntentResponse"; + if (options.defaults) { + object.parent = ""; + object.intent = null; + object.languageCode = ""; } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.intent != null && message.hasOwnProperty("intent")) + object.intent = $root.google.cloud.dialogflow.cx.v3.Intent.toObject(message.intent, options); + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; return object; }; /** - * Converts this StreamingDetectIntentResponse to JSON. + * Converts this CreateIntentRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse + * @memberof google.cloud.dialogflow.cx.v3.CreateIntentRequest * @instance * @returns {Object.} JSON object */ - StreamingDetectIntentResponse.prototype.toJSON = function toJSON() { + CreateIntentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return StreamingDetectIntentResponse; + return CreateIntentRequest; })(); - v3.StreamingRecognitionResult = (function() { + v3.UpdateIntentRequest = (function() { /** - * Properties of a StreamingRecognitionResult. + * Properties of an UpdateIntentRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IStreamingRecognitionResult - * @property {google.cloud.dialogflow.cx.v3.StreamingRecognitionResult.MessageType|null} [messageType] StreamingRecognitionResult messageType - * @property {string|null} [transcript] StreamingRecognitionResult transcript - * @property {boolean|null} [isFinal] StreamingRecognitionResult isFinal - * @property {number|null} [confidence] StreamingRecognitionResult confidence - * @property {number|null} [stability] StreamingRecognitionResult stability - * @property {Array.|null} [speechWordInfo] StreamingRecognitionResult speechWordInfo - * @property {google.protobuf.IDuration|null} [speechEndOffset] StreamingRecognitionResult speechEndOffset + * @interface IUpdateIntentRequest + * @property {google.cloud.dialogflow.cx.v3.IIntent|null} [intent] UpdateIntentRequest intent + * @property {string|null} [languageCode] UpdateIntentRequest languageCode + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateIntentRequest updateMask */ /** - * Constructs a new StreamingRecognitionResult. + * Constructs a new UpdateIntentRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a StreamingRecognitionResult. - * @implements IStreamingRecognitionResult + * @classdesc Represents an UpdateIntentRequest. + * @implements IUpdateIntentRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IStreamingRecognitionResult=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IUpdateIntentRequest=} [properties] Properties to set */ - function StreamingRecognitionResult(properties) { - this.speechWordInfo = []; + function UpdateIntentRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -24491,156 +25307,101 @@ } /** - * StreamingRecognitionResult messageType. - * @member {google.cloud.dialogflow.cx.v3.StreamingRecognitionResult.MessageType} messageType - * @memberof google.cloud.dialogflow.cx.v3.StreamingRecognitionResult - * @instance - */ - StreamingRecognitionResult.prototype.messageType = 0; - - /** - * StreamingRecognitionResult transcript. - * @member {string} transcript - * @memberof google.cloud.dialogflow.cx.v3.StreamingRecognitionResult - * @instance - */ - StreamingRecognitionResult.prototype.transcript = ""; - - /** - * StreamingRecognitionResult isFinal. - * @member {boolean} isFinal - * @memberof google.cloud.dialogflow.cx.v3.StreamingRecognitionResult - * @instance - */ - StreamingRecognitionResult.prototype.isFinal = false; - - /** - * StreamingRecognitionResult confidence. - * @member {number} confidence - * @memberof google.cloud.dialogflow.cx.v3.StreamingRecognitionResult - * @instance - */ - StreamingRecognitionResult.prototype.confidence = 0; - - /** - * StreamingRecognitionResult stability. - * @member {number} stability - * @memberof google.cloud.dialogflow.cx.v3.StreamingRecognitionResult + * UpdateIntentRequest intent. + * @member {google.cloud.dialogflow.cx.v3.IIntent|null|undefined} intent + * @memberof google.cloud.dialogflow.cx.v3.UpdateIntentRequest * @instance */ - StreamingRecognitionResult.prototype.stability = 0; + UpdateIntentRequest.prototype.intent = null; /** - * StreamingRecognitionResult speechWordInfo. - * @member {Array.} speechWordInfo - * @memberof google.cloud.dialogflow.cx.v3.StreamingRecognitionResult + * UpdateIntentRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3.UpdateIntentRequest * @instance */ - StreamingRecognitionResult.prototype.speechWordInfo = $util.emptyArray; + UpdateIntentRequest.prototype.languageCode = ""; /** - * StreamingRecognitionResult speechEndOffset. - * @member {google.protobuf.IDuration|null|undefined} speechEndOffset - * @memberof google.cloud.dialogflow.cx.v3.StreamingRecognitionResult + * UpdateIntentRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dialogflow.cx.v3.UpdateIntentRequest * @instance */ - StreamingRecognitionResult.prototype.speechEndOffset = null; + UpdateIntentRequest.prototype.updateMask = null; /** - * Creates a new StreamingRecognitionResult instance using the specified properties. + * Creates a new UpdateIntentRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.StreamingRecognitionResult + * @memberof google.cloud.dialogflow.cx.v3.UpdateIntentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IStreamingRecognitionResult=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.StreamingRecognitionResult} StreamingRecognitionResult instance + * @param {google.cloud.dialogflow.cx.v3.IUpdateIntentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.UpdateIntentRequest} UpdateIntentRequest instance */ - StreamingRecognitionResult.create = function create(properties) { - return new StreamingRecognitionResult(properties); + UpdateIntentRequest.create = function create(properties) { + return new UpdateIntentRequest(properties); }; /** - * Encodes the specified StreamingRecognitionResult message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.StreamingRecognitionResult.verify|verify} messages. + * Encodes the specified UpdateIntentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateIntentRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.StreamingRecognitionResult + * @memberof google.cloud.dialogflow.cx.v3.UpdateIntentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IStreamingRecognitionResult} message StreamingRecognitionResult message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IUpdateIntentRequest} message UpdateIntentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StreamingRecognitionResult.encode = function encode(message, writer) { + UpdateIntentRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.messageType != null && Object.hasOwnProperty.call(message, "messageType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.messageType); - if (message.transcript != null && Object.hasOwnProperty.call(message, "transcript")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.transcript); - if (message.isFinal != null && Object.hasOwnProperty.call(message, "isFinal")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.isFinal); - if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) - writer.uint32(/* id 4, wireType 5 =*/37).float(message.confidence); - if (message.stability != null && Object.hasOwnProperty.call(message, "stability")) - writer.uint32(/* id 6, wireType 5 =*/53).float(message.stability); - if (message.speechWordInfo != null && message.speechWordInfo.length) - for (var i = 0; i < message.speechWordInfo.length; ++i) - $root.google.cloud.dialogflow.cx.v3.SpeechWordInfo.encode(message.speechWordInfo[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.speechEndOffset != null && Object.hasOwnProperty.call(message, "speechEndOffset")) - $root.google.protobuf.Duration.encode(message.speechEndOffset, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.intent != null && Object.hasOwnProperty.call(message, "intent")) + $root.google.cloud.dialogflow.cx.v3.Intent.encode(message.intent, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified StreamingRecognitionResult message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.StreamingRecognitionResult.verify|verify} messages. + * Encodes the specified UpdateIntentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateIntentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.StreamingRecognitionResult + * @memberof google.cloud.dialogflow.cx.v3.UpdateIntentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IStreamingRecognitionResult} message StreamingRecognitionResult message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IUpdateIntentRequest} message UpdateIntentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StreamingRecognitionResult.encodeDelimited = function encodeDelimited(message, writer) { + UpdateIntentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a StreamingRecognitionResult message from the specified reader or buffer. + * Decodes an UpdateIntentRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.StreamingRecognitionResult + * @memberof google.cloud.dialogflow.cx.v3.UpdateIntentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.StreamingRecognitionResult} StreamingRecognitionResult + * @returns {google.cloud.dialogflow.cx.v3.UpdateIntentRequest} UpdateIntentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StreamingRecognitionResult.decode = function decode(reader, length) { + UpdateIntentRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.StreamingRecognitionResult(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.UpdateIntentRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.messageType = reader.int32(); + message.intent = $root.google.cloud.dialogflow.cx.v3.Intent.decode(reader, reader.uint32()); break; case 2: - message.transcript = reader.string(); + message.languageCode = reader.string(); break; case 3: - message.isFinal = reader.bool(); - break; - case 4: - message.confidence = reader.float(); - break; - case 6: - message.stability = reader.float(); - break; - case 7: - if (!(message.speechWordInfo && message.speechWordInfo.length)) - message.speechWordInfo = []; - message.speechWordInfo.push($root.google.cloud.dialogflow.cx.v3.SpeechWordInfo.decode(reader, reader.uint32())); - break; - case 8: - message.speechEndOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -24651,219 +25412,134 @@ }; /** - * Decodes a StreamingRecognitionResult message from the specified reader or buffer, length delimited. + * Decodes an UpdateIntentRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.StreamingRecognitionResult + * @memberof google.cloud.dialogflow.cx.v3.UpdateIntentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.StreamingRecognitionResult} StreamingRecognitionResult + * @returns {google.cloud.dialogflow.cx.v3.UpdateIntentRequest} UpdateIntentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StreamingRecognitionResult.decodeDelimited = function decodeDelimited(reader) { + UpdateIntentRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a StreamingRecognitionResult message. + * Verifies an UpdateIntentRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.StreamingRecognitionResult + * @memberof google.cloud.dialogflow.cx.v3.UpdateIntentRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - StreamingRecognitionResult.verify = function verify(message) { + UpdateIntentRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.messageType != null && message.hasOwnProperty("messageType")) - switch (message.messageType) { - default: - return "messageType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.transcript != null && message.hasOwnProperty("transcript")) - if (!$util.isString(message.transcript)) - return "transcript: string expected"; - if (message.isFinal != null && message.hasOwnProperty("isFinal")) - if (typeof message.isFinal !== "boolean") - return "isFinal: boolean expected"; - if (message.confidence != null && message.hasOwnProperty("confidence")) - if (typeof message.confidence !== "number") - return "confidence: number expected"; - if (message.stability != null && message.hasOwnProperty("stability")) - if (typeof message.stability !== "number") - return "stability: number expected"; - if (message.speechWordInfo != null && message.hasOwnProperty("speechWordInfo")) { - if (!Array.isArray(message.speechWordInfo)) - return "speechWordInfo: array expected"; - for (var i = 0; i < message.speechWordInfo.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.SpeechWordInfo.verify(message.speechWordInfo[i]); - if (error) - return "speechWordInfo." + error; - } + if (message.intent != null && message.hasOwnProperty("intent")) { + var error = $root.google.cloud.dialogflow.cx.v3.Intent.verify(message.intent); + if (error) + return "intent." + error; } - if (message.speechEndOffset != null && message.hasOwnProperty("speechEndOffset")) { - var error = $root.google.protobuf.Duration.verify(message.speechEndOffset); + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); if (error) - return "speechEndOffset." + error; + return "updateMask." + error; } return null; }; /** - * Creates a StreamingRecognitionResult message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateIntentRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.StreamingRecognitionResult + * @memberof google.cloud.dialogflow.cx.v3.UpdateIntentRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.StreamingRecognitionResult} StreamingRecognitionResult + * @returns {google.cloud.dialogflow.cx.v3.UpdateIntentRequest} UpdateIntentRequest */ - StreamingRecognitionResult.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.StreamingRecognitionResult) + UpdateIntentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.UpdateIntentRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.StreamingRecognitionResult(); - switch (object.messageType) { - case "MESSAGE_TYPE_UNSPECIFIED": - case 0: - message.messageType = 0; - break; - case "TRANSCRIPT": - case 1: - message.messageType = 1; - break; - case "END_OF_SINGLE_UTTERANCE": - case 2: - message.messageType = 2; - break; - } - if (object.transcript != null) - message.transcript = String(object.transcript); - if (object.isFinal != null) - message.isFinal = Boolean(object.isFinal); - if (object.confidence != null) - message.confidence = Number(object.confidence); - if (object.stability != null) - message.stability = Number(object.stability); - if (object.speechWordInfo) { - if (!Array.isArray(object.speechWordInfo)) - throw TypeError(".google.cloud.dialogflow.cx.v3.StreamingRecognitionResult.speechWordInfo: array expected"); - message.speechWordInfo = []; - for (var i = 0; i < object.speechWordInfo.length; ++i) { - if (typeof object.speechWordInfo[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.StreamingRecognitionResult.speechWordInfo: object expected"); - message.speechWordInfo[i] = $root.google.cloud.dialogflow.cx.v3.SpeechWordInfo.fromObject(object.speechWordInfo[i]); - } + var message = new $root.google.cloud.dialogflow.cx.v3.UpdateIntentRequest(); + if (object.intent != null) { + if (typeof object.intent !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.UpdateIntentRequest.intent: object expected"); + message.intent = $root.google.cloud.dialogflow.cx.v3.Intent.fromObject(object.intent); } - if (object.speechEndOffset != null) { - if (typeof object.speechEndOffset !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.StreamingRecognitionResult.speechEndOffset: object expected"); - message.speechEndOffset = $root.google.protobuf.Duration.fromObject(object.speechEndOffset); + if (object.languageCode != null) + message.languageCode = String(object.languageCode); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.UpdateIntentRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } return message; }; /** - * Creates a plain object from a StreamingRecognitionResult message. Also converts values to other types if specified. + * Creates a plain object from an UpdateIntentRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.StreamingRecognitionResult + * @memberof google.cloud.dialogflow.cx.v3.UpdateIntentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.StreamingRecognitionResult} message StreamingRecognitionResult + * @param {google.cloud.dialogflow.cx.v3.UpdateIntentRequest} message UpdateIntentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StreamingRecognitionResult.toObject = function toObject(message, options) { + UpdateIntentRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.speechWordInfo = []; if (options.defaults) { - object.messageType = options.enums === String ? "MESSAGE_TYPE_UNSPECIFIED" : 0; - object.transcript = ""; - object.isFinal = false; - object.confidence = 0; - object.stability = 0; - object.speechEndOffset = null; - } - if (message.messageType != null && message.hasOwnProperty("messageType")) - object.messageType = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.StreamingRecognitionResult.MessageType[message.messageType] : message.messageType; - if (message.transcript != null && message.hasOwnProperty("transcript")) - object.transcript = message.transcript; - if (message.isFinal != null && message.hasOwnProperty("isFinal")) - object.isFinal = message.isFinal; - if (message.confidence != null && message.hasOwnProperty("confidence")) - object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence; - if (message.stability != null && message.hasOwnProperty("stability")) - object.stability = options.json && !isFinite(message.stability) ? String(message.stability) : message.stability; - if (message.speechWordInfo && message.speechWordInfo.length) { - object.speechWordInfo = []; - for (var j = 0; j < message.speechWordInfo.length; ++j) - object.speechWordInfo[j] = $root.google.cloud.dialogflow.cx.v3.SpeechWordInfo.toObject(message.speechWordInfo[j], options); + object.intent = null; + object.languageCode = ""; + object.updateMask = null; } - if (message.speechEndOffset != null && message.hasOwnProperty("speechEndOffset")) - object.speechEndOffset = $root.google.protobuf.Duration.toObject(message.speechEndOffset, options); + if (message.intent != null && message.hasOwnProperty("intent")) + object.intent = $root.google.cloud.dialogflow.cx.v3.Intent.toObject(message.intent, options); + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this StreamingRecognitionResult to JSON. + * Converts this UpdateIntentRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.StreamingRecognitionResult + * @memberof google.cloud.dialogflow.cx.v3.UpdateIntentRequest * @instance * @returns {Object.} JSON object */ - StreamingRecognitionResult.prototype.toJSON = function toJSON() { + UpdateIntentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * MessageType enum. - * @name google.cloud.dialogflow.cx.v3.StreamingRecognitionResult.MessageType - * @enum {number} - * @property {number} MESSAGE_TYPE_UNSPECIFIED=0 MESSAGE_TYPE_UNSPECIFIED value - * @property {number} TRANSCRIPT=1 TRANSCRIPT value - * @property {number} END_OF_SINGLE_UTTERANCE=2 END_OF_SINGLE_UTTERANCE value - */ - StreamingRecognitionResult.MessageType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MESSAGE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "TRANSCRIPT"] = 1; - values[valuesById[2] = "END_OF_SINGLE_UTTERANCE"] = 2; - return values; - })(); - - return StreamingRecognitionResult; + return UpdateIntentRequest; })(); - v3.QueryParameters = (function() { + v3.DeleteIntentRequest = (function() { /** - * Properties of a QueryParameters. + * Properties of a DeleteIntentRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IQueryParameters - * @property {string|null} [timeZone] QueryParameters timeZone - * @property {google.type.ILatLng|null} [geoLocation] QueryParameters geoLocation - * @property {Array.|null} [sessionEntityTypes] QueryParameters sessionEntityTypes - * @property {google.protobuf.IStruct|null} [payload] QueryParameters payload - * @property {google.protobuf.IStruct|null} [parameters] QueryParameters parameters - * @property {boolean|null} [analyzeQueryTextSentiment] QueryParameters analyzeQueryTextSentiment + * @interface IDeleteIntentRequest + * @property {string|null} [name] DeleteIntentRequest name */ /** - * Constructs a new QueryParameters. + * Constructs a new DeleteIntentRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a QueryParameters. - * @implements IQueryParameters + * @classdesc Represents a DeleteIntentRequest. + * @implements IDeleteIntentRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IQueryParameters=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IDeleteIntentRequest=} [properties] Properties to set */ - function QueryParameters(properties) { - this.sessionEntityTypes = []; + function DeleteIntentRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -24871,143 +25547,75 @@ } /** - * QueryParameters timeZone. - * @member {string} timeZone - * @memberof google.cloud.dialogflow.cx.v3.QueryParameters - * @instance - */ - QueryParameters.prototype.timeZone = ""; - - /** - * QueryParameters geoLocation. - * @member {google.type.ILatLng|null|undefined} geoLocation - * @memberof google.cloud.dialogflow.cx.v3.QueryParameters - * @instance - */ - QueryParameters.prototype.geoLocation = null; - - /** - * QueryParameters sessionEntityTypes. - * @member {Array.} sessionEntityTypes - * @memberof google.cloud.dialogflow.cx.v3.QueryParameters - * @instance - */ - QueryParameters.prototype.sessionEntityTypes = $util.emptyArray; - - /** - * QueryParameters payload. - * @member {google.protobuf.IStruct|null|undefined} payload - * @memberof google.cloud.dialogflow.cx.v3.QueryParameters - * @instance - */ - QueryParameters.prototype.payload = null; - - /** - * QueryParameters parameters. - * @member {google.protobuf.IStruct|null|undefined} parameters - * @memberof google.cloud.dialogflow.cx.v3.QueryParameters - * @instance - */ - QueryParameters.prototype.parameters = null; - - /** - * QueryParameters analyzeQueryTextSentiment. - * @member {boolean} analyzeQueryTextSentiment - * @memberof google.cloud.dialogflow.cx.v3.QueryParameters + * DeleteIntentRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.DeleteIntentRequest * @instance */ - QueryParameters.prototype.analyzeQueryTextSentiment = false; + DeleteIntentRequest.prototype.name = ""; /** - * Creates a new QueryParameters instance using the specified properties. + * Creates a new DeleteIntentRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.QueryParameters + * @memberof google.cloud.dialogflow.cx.v3.DeleteIntentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IQueryParameters=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.QueryParameters} QueryParameters instance + * @param {google.cloud.dialogflow.cx.v3.IDeleteIntentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.DeleteIntentRequest} DeleteIntentRequest instance */ - QueryParameters.create = function create(properties) { - return new QueryParameters(properties); + DeleteIntentRequest.create = function create(properties) { + return new DeleteIntentRequest(properties); }; /** - * Encodes the specified QueryParameters message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.QueryParameters.verify|verify} messages. + * Encodes the specified DeleteIntentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteIntentRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.QueryParameters + * @memberof google.cloud.dialogflow.cx.v3.DeleteIntentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IQueryParameters} message QueryParameters message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IDeleteIntentRequest} message DeleteIntentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - QueryParameters.encode = function encode(message, writer) { + DeleteIntentRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.timeZone != null && Object.hasOwnProperty.call(message, "timeZone")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.timeZone); - if (message.geoLocation != null && Object.hasOwnProperty.call(message, "geoLocation")) - $root.google.type.LatLng.encode(message.geoLocation, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.sessionEntityTypes != null && message.sessionEntityTypes.length) - for (var i = 0; i < message.sessionEntityTypes.length; ++i) - $root.google.cloud.dialogflow.cx.v3.SessionEntityType.encode(message.sessionEntityTypes[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.payload != null && Object.hasOwnProperty.call(message, "payload")) - $root.google.protobuf.Struct.encode(message.payload, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.parameters != null && Object.hasOwnProperty.call(message, "parameters")) - $root.google.protobuf.Struct.encode(message.parameters, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.analyzeQueryTextSentiment != null && Object.hasOwnProperty.call(message, "analyzeQueryTextSentiment")) - writer.uint32(/* id 8, wireType 0 =*/64).bool(message.analyzeQueryTextSentiment); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified QueryParameters message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.QueryParameters.verify|verify} messages. + * Encodes the specified DeleteIntentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteIntentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.QueryParameters + * @memberof google.cloud.dialogflow.cx.v3.DeleteIntentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IQueryParameters} message QueryParameters message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IDeleteIntentRequest} message DeleteIntentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - QueryParameters.encodeDelimited = function encodeDelimited(message, writer) { + DeleteIntentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a QueryParameters message from the specified reader or buffer. + * Decodes a DeleteIntentRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.QueryParameters + * @memberof google.cloud.dialogflow.cx.v3.DeleteIntentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.QueryParameters} QueryParameters + * @returns {google.cloud.dialogflow.cx.v3.DeleteIntentRequest} DeleteIntentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - QueryParameters.decode = function decode(reader, length) { + DeleteIntentRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.QueryParameters(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.DeleteIntentRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.timeZone = reader.string(); - break; - case 2: - message.geoLocation = $root.google.type.LatLng.decode(reader, reader.uint32()); - break; - case 3: - if (!(message.sessionEntityTypes && message.sessionEntityTypes.length)) - message.sessionEntityTypes = []; - message.sessionEntityTypes.push($root.google.cloud.dialogflow.cx.v3.SessionEntityType.decode(reader, reader.uint32())); - break; - case 4: - message.payload = $root.google.protobuf.Struct.decode(reader, reader.uint32()); - break; - case 5: - message.parameters = $root.google.protobuf.Struct.decode(reader, reader.uint32()); - break; - case 8: - message.analyzeQueryTextSentiment = reader.bool(); + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -25018,341 +25626,399 @@ }; /** - * Decodes a QueryParameters message from the specified reader or buffer, length delimited. + * Decodes a DeleteIntentRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.QueryParameters + * @memberof google.cloud.dialogflow.cx.v3.DeleteIntentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.QueryParameters} QueryParameters + * @returns {google.cloud.dialogflow.cx.v3.DeleteIntentRequest} DeleteIntentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - QueryParameters.decodeDelimited = function decodeDelimited(reader) { + DeleteIntentRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a QueryParameters message. + * Verifies a DeleteIntentRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.QueryParameters + * @memberof google.cloud.dialogflow.cx.v3.DeleteIntentRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - QueryParameters.verify = function verify(message) { + DeleteIntentRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.timeZone != null && message.hasOwnProperty("timeZone")) - if (!$util.isString(message.timeZone)) - return "timeZone: string expected"; - if (message.geoLocation != null && message.hasOwnProperty("geoLocation")) { - var error = $root.google.type.LatLng.verify(message.geoLocation); - if (error) - return "geoLocation." + error; - } - if (message.sessionEntityTypes != null && message.hasOwnProperty("sessionEntityTypes")) { - if (!Array.isArray(message.sessionEntityTypes)) - return "sessionEntityTypes: array expected"; - for (var i = 0; i < message.sessionEntityTypes.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.SessionEntityType.verify(message.sessionEntityTypes[i]); - if (error) - return "sessionEntityTypes." + error; - } - } - if (message.payload != null && message.hasOwnProperty("payload")) { - var error = $root.google.protobuf.Struct.verify(message.payload); - if (error) - return "payload." + error; - } - if (message.parameters != null && message.hasOwnProperty("parameters")) { - var error = $root.google.protobuf.Struct.verify(message.parameters); - if (error) - return "parameters." + error; - } - if (message.analyzeQueryTextSentiment != null && message.hasOwnProperty("analyzeQueryTextSentiment")) - if (typeof message.analyzeQueryTextSentiment !== "boolean") - return "analyzeQueryTextSentiment: boolean expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a QueryParameters message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteIntentRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.QueryParameters + * @memberof google.cloud.dialogflow.cx.v3.DeleteIntentRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.QueryParameters} QueryParameters + * @returns {google.cloud.dialogflow.cx.v3.DeleteIntentRequest} DeleteIntentRequest */ - QueryParameters.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.QueryParameters) + DeleteIntentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.DeleteIntentRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.QueryParameters(); - if (object.timeZone != null) - message.timeZone = String(object.timeZone); - if (object.geoLocation != null) { - if (typeof object.geoLocation !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.QueryParameters.geoLocation: object expected"); - message.geoLocation = $root.google.type.LatLng.fromObject(object.geoLocation); - } - if (object.sessionEntityTypes) { - if (!Array.isArray(object.sessionEntityTypes)) - throw TypeError(".google.cloud.dialogflow.cx.v3.QueryParameters.sessionEntityTypes: array expected"); - message.sessionEntityTypes = []; - for (var i = 0; i < object.sessionEntityTypes.length; ++i) { - if (typeof object.sessionEntityTypes[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.QueryParameters.sessionEntityTypes: object expected"); - message.sessionEntityTypes[i] = $root.google.cloud.dialogflow.cx.v3.SessionEntityType.fromObject(object.sessionEntityTypes[i]); - } - } - if (object.payload != null) { - if (typeof object.payload !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.QueryParameters.payload: object expected"); - message.payload = $root.google.protobuf.Struct.fromObject(object.payload); - } - if (object.parameters != null) { - if (typeof object.parameters !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.QueryParameters.parameters: object expected"); - message.parameters = $root.google.protobuf.Struct.fromObject(object.parameters); - } - if (object.analyzeQueryTextSentiment != null) - message.analyzeQueryTextSentiment = Boolean(object.analyzeQueryTextSentiment); + var message = new $root.google.cloud.dialogflow.cx.v3.DeleteIntentRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a QueryParameters message. Also converts values to other types if specified. + * Creates a plain object from a DeleteIntentRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.QueryParameters + * @memberof google.cloud.dialogflow.cx.v3.DeleteIntentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.QueryParameters} message QueryParameters + * @param {google.cloud.dialogflow.cx.v3.DeleteIntentRequest} message DeleteIntentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - QueryParameters.toObject = function toObject(message, options) { + DeleteIntentRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.sessionEntityTypes = []; - if (options.defaults) { - object.timeZone = ""; - object.geoLocation = null; - object.payload = null; - object.parameters = null; - object.analyzeQueryTextSentiment = false; - } - if (message.timeZone != null && message.hasOwnProperty("timeZone")) - object.timeZone = message.timeZone; - if (message.geoLocation != null && message.hasOwnProperty("geoLocation")) - object.geoLocation = $root.google.type.LatLng.toObject(message.geoLocation, options); - if (message.sessionEntityTypes && message.sessionEntityTypes.length) { - object.sessionEntityTypes = []; - for (var j = 0; j < message.sessionEntityTypes.length; ++j) - object.sessionEntityTypes[j] = $root.google.cloud.dialogflow.cx.v3.SessionEntityType.toObject(message.sessionEntityTypes[j], options); - } - if (message.payload != null && message.hasOwnProperty("payload")) - object.payload = $root.google.protobuf.Struct.toObject(message.payload, options); - if (message.parameters != null && message.hasOwnProperty("parameters")) - object.parameters = $root.google.protobuf.Struct.toObject(message.parameters, options); - if (message.analyzeQueryTextSentiment != null && message.hasOwnProperty("analyzeQueryTextSentiment")) - object.analyzeQueryTextSentiment = message.analyzeQueryTextSentiment; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this QueryParameters to JSON. + * Converts this DeleteIntentRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.QueryParameters + * @memberof google.cloud.dialogflow.cx.v3.DeleteIntentRequest * @instance * @returns {Object.} JSON object */ - QueryParameters.prototype.toJSON = function toJSON() { + DeleteIntentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return QueryParameters; + return DeleteIntentRequest; })(); - v3.QueryInput = (function() { + /** + * IntentView enum. + * @name google.cloud.dialogflow.cx.v3.IntentView + * @enum {number} + * @property {number} INTENT_VIEW_UNSPECIFIED=0 INTENT_VIEW_UNSPECIFIED value + * @property {number} INTENT_VIEW_PARTIAL=1 INTENT_VIEW_PARTIAL value + * @property {number} INTENT_VIEW_FULL=2 INTENT_VIEW_FULL value + */ + v3.IntentView = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "INTENT_VIEW_UNSPECIFIED"] = 0; + values[valuesById[1] = "INTENT_VIEW_PARTIAL"] = 1; + values[valuesById[2] = "INTENT_VIEW_FULL"] = 2; + return values; + })(); - /** - * Properties of a QueryInput. - * @memberof google.cloud.dialogflow.cx.v3 - * @interface IQueryInput - * @property {google.cloud.dialogflow.cx.v3.ITextInput|null} [text] QueryInput text - * @property {google.cloud.dialogflow.cx.v3.IIntentInput|null} [intent] QueryInput intent - * @property {google.cloud.dialogflow.cx.v3.IAudioInput|null} [audio] QueryInput audio - * @property {google.cloud.dialogflow.cx.v3.IEventInput|null} [event] QueryInput event - * @property {google.cloud.dialogflow.cx.v3.IDtmfInput|null} [dtmf] QueryInput dtmf - * @property {string|null} [languageCode] QueryInput languageCode - */ + v3.SecuritySettingsService = (function() { /** - * Constructs a new QueryInput. + * Constructs a new SecuritySettingsService service. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a QueryInput. - * @implements IQueryInput + * @classdesc Represents a SecuritySettingsService + * @extends $protobuf.rpc.Service * @constructor - * @param {google.cloud.dialogflow.cx.v3.IQueryInput=} [properties] Properties to set + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited */ - function QueryInput(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function SecuritySettingsService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); } + (SecuritySettingsService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = SecuritySettingsService; + /** - * QueryInput text. - * @member {google.cloud.dialogflow.cx.v3.ITextInput|null|undefined} text - * @memberof google.cloud.dialogflow.cx.v3.QueryInput - * @instance + * Creates new SecuritySettingsService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {SecuritySettingsService} RPC service. Useful where requests and/or responses are streamed. */ - QueryInput.prototype.text = null; + SecuritySettingsService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; /** - * QueryInput intent. - * @member {google.cloud.dialogflow.cx.v3.IIntentInput|null|undefined} intent - * @memberof google.cloud.dialogflow.cx.v3.QueryInput - * @instance + * Callback as used by {@link google.cloud.dialogflow.cx.v3.SecuritySettingsService#createSecuritySettings}. + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService + * @typedef CreateSecuritySettingsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.SecuritySettings} [response] SecuritySettings */ - QueryInput.prototype.intent = null; /** - * QueryInput audio. - * @member {google.cloud.dialogflow.cx.v3.IAudioInput|null|undefined} audio - * @memberof google.cloud.dialogflow.cx.v3.QueryInput + * Calls CreateSecuritySettings. + * @function createSecuritySettings + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService * @instance + * @param {google.cloud.dialogflow.cx.v3.ICreateSecuritySettingsRequest} request CreateSecuritySettingsRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.SecuritySettingsService.CreateSecuritySettingsCallback} callback Node-style callback called with the error, if any, and SecuritySettings + * @returns {undefined} + * @variation 1 */ - QueryInput.prototype.audio = null; + Object.defineProperty(SecuritySettingsService.prototype.createSecuritySettings = function createSecuritySettings(request, callback) { + return this.rpcCall(createSecuritySettings, $root.google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest, $root.google.cloud.dialogflow.cx.v3.SecuritySettings, request, callback); + }, "name", { value: "CreateSecuritySettings" }); /** - * QueryInput event. - * @member {google.cloud.dialogflow.cx.v3.IEventInput|null|undefined} event - * @memberof google.cloud.dialogflow.cx.v3.QueryInput + * Calls CreateSecuritySettings. + * @function createSecuritySettings + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService * @instance + * @param {google.cloud.dialogflow.cx.v3.ICreateSecuritySettingsRequest} request CreateSecuritySettingsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - QueryInput.prototype.event = null; /** - * QueryInput dtmf. - * @member {google.cloud.dialogflow.cx.v3.IDtmfInput|null|undefined} dtmf - * @memberof google.cloud.dialogflow.cx.v3.QueryInput + * Callback as used by {@link google.cloud.dialogflow.cx.v3.SecuritySettingsService#getSecuritySettings}. + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService + * @typedef GetSecuritySettingsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.SecuritySettings} [response] SecuritySettings + */ + + /** + * Calls GetSecuritySettings. + * @function getSecuritySettings + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService * @instance + * @param {google.cloud.dialogflow.cx.v3.IGetSecuritySettingsRequest} request GetSecuritySettingsRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.SecuritySettingsService.GetSecuritySettingsCallback} callback Node-style callback called with the error, if any, and SecuritySettings + * @returns {undefined} + * @variation 1 */ - QueryInput.prototype.dtmf = null; + Object.defineProperty(SecuritySettingsService.prototype.getSecuritySettings = function getSecuritySettings(request, callback) { + return this.rpcCall(getSecuritySettings, $root.google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest, $root.google.cloud.dialogflow.cx.v3.SecuritySettings, request, callback); + }, "name", { value: "GetSecuritySettings" }); /** - * QueryInput languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3.QueryInput + * Calls GetSecuritySettings. + * @function getSecuritySettings + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService * @instance + * @param {google.cloud.dialogflow.cx.v3.IGetSecuritySettingsRequest} request GetSecuritySettingsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - QueryInput.prototype.languageCode = ""; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.SecuritySettingsService#updateSecuritySettings}. + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService + * @typedef UpdateSecuritySettingsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.SecuritySettings} [response] SecuritySettings + */ /** - * QueryInput input. - * @member {"text"|"intent"|"audio"|"event"|"dtmf"|undefined} input - * @memberof google.cloud.dialogflow.cx.v3.QueryInput + * Calls UpdateSecuritySettings. + * @function updateSecuritySettings + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService * @instance + * @param {google.cloud.dialogflow.cx.v3.IUpdateSecuritySettingsRequest} request UpdateSecuritySettingsRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.SecuritySettingsService.UpdateSecuritySettingsCallback} callback Node-style callback called with the error, if any, and SecuritySettings + * @returns {undefined} + * @variation 1 */ - Object.defineProperty(QueryInput.prototype, "input", { - get: $util.oneOfGetter($oneOfFields = ["text", "intent", "audio", "event", "dtmf"]), - set: $util.oneOfSetter($oneOfFields) - }); + Object.defineProperty(SecuritySettingsService.prototype.updateSecuritySettings = function updateSecuritySettings(request, callback) { + return this.rpcCall(updateSecuritySettings, $root.google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest, $root.google.cloud.dialogflow.cx.v3.SecuritySettings, request, callback); + }, "name", { value: "UpdateSecuritySettings" }); /** - * Creates a new QueryInput instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.QueryInput - * @static - * @param {google.cloud.dialogflow.cx.v3.IQueryInput=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.QueryInput} QueryInput instance + * Calls UpdateSecuritySettings. + * @function updateSecuritySettings + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService + * @instance + * @param {google.cloud.dialogflow.cx.v3.IUpdateSecuritySettingsRequest} request UpdateSecuritySettingsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - QueryInput.create = function create(properties) { - return new QueryInput(properties); - }; /** - * Encodes the specified QueryInput message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.QueryInput.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.QueryInput - * @static - * @param {google.cloud.dialogflow.cx.v3.IQueryInput} message QueryInput message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Callback as used by {@link google.cloud.dialogflow.cx.v3.SecuritySettingsService#listSecuritySettings}. + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService + * @typedef ListSecuritySettingsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse} [response] ListSecuritySettingsResponse */ - QueryInput.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.text != null && Object.hasOwnProperty.call(message, "text")) - $root.google.cloud.dialogflow.cx.v3.TextInput.encode(message.text, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.intent != null && Object.hasOwnProperty.call(message, "intent")) - $root.google.cloud.dialogflow.cx.v3.IntentInput.encode(message.intent, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.languageCode); - if (message.audio != null && Object.hasOwnProperty.call(message, "audio")) - $root.google.cloud.dialogflow.cx.v3.AudioInput.encode(message.audio, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.event != null && Object.hasOwnProperty.call(message, "event")) - $root.google.cloud.dialogflow.cx.v3.EventInput.encode(message.event, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.dtmf != null && Object.hasOwnProperty.call(message, "dtmf")) - $root.google.cloud.dialogflow.cx.v3.DtmfInput.encode(message.dtmf, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - return writer; - }; /** - * Encodes the specified QueryInput message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.QueryInput.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.QueryInput - * @static - * @param {google.cloud.dialogflow.cx.v3.IQueryInput} message QueryInput message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls ListSecuritySettings. + * @function listSecuritySettings + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService + * @instance + * @param {google.cloud.dialogflow.cx.v3.IListSecuritySettingsRequest} request ListSecuritySettingsRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.SecuritySettingsService.ListSecuritySettingsCallback} callback Node-style callback called with the error, if any, and ListSecuritySettingsResponse + * @returns {undefined} + * @variation 1 */ - QueryInput.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + Object.defineProperty(SecuritySettingsService.prototype.listSecuritySettings = function listSecuritySettings(request, callback) { + return this.rpcCall(listSecuritySettings, $root.google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest, $root.google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse, request, callback); + }, "name", { value: "ListSecuritySettings" }); /** - * Decodes a QueryInput message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.QueryInput - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.QueryInput} QueryInput - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls ListSecuritySettings. + * @function listSecuritySettings + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService + * @instance + * @param {google.cloud.dialogflow.cx.v3.IListSecuritySettingsRequest} request ListSecuritySettingsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - QueryInput.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.QueryInput(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.text = $root.google.cloud.dialogflow.cx.v3.TextInput.decode(reader, reader.uint32()); - break; - case 3: - message.intent = $root.google.cloud.dialogflow.cx.v3.IntentInput.decode(reader, reader.uint32()); - break; - case 5: - message.audio = $root.google.cloud.dialogflow.cx.v3.AudioInput.decode(reader, reader.uint32()); - break; - case 6: - message.event = $root.google.cloud.dialogflow.cx.v3.EventInput.decode(reader, reader.uint32()); - break; - case 7: - message.dtmf = $root.google.cloud.dialogflow.cx.v3.DtmfInput.decode(reader, reader.uint32()); - break; - case 4: - message.languageCode = reader.string(); + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.SecuritySettingsService#deleteSecuritySettings}. + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService + * @typedef DeleteSecuritySettingsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteSecuritySettings. + * @function deleteSecuritySettings + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService + * @instance + * @param {google.cloud.dialogflow.cx.v3.IDeleteSecuritySettingsRequest} request DeleteSecuritySettingsRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.SecuritySettingsService.DeleteSecuritySettingsCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SecuritySettingsService.prototype.deleteSecuritySettings = function deleteSecuritySettings(request, callback) { + return this.rpcCall(deleteSecuritySettings, $root.google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteSecuritySettings" }); + + /** + * Calls DeleteSecuritySettings. + * @function deleteSecuritySettings + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService + * @instance + * @param {google.cloud.dialogflow.cx.v3.IDeleteSecuritySettingsRequest} request DeleteSecuritySettingsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return SecuritySettingsService; + })(); + + v3.GetSecuritySettingsRequest = (function() { + + /** + * Properties of a GetSecuritySettingsRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IGetSecuritySettingsRequest + * @property {string|null} [name] GetSecuritySettingsRequest name + */ + + /** + * Constructs a new GetSecuritySettingsRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a GetSecuritySettingsRequest. + * @implements IGetSecuritySettingsRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IGetSecuritySettingsRequest=} [properties] Properties to set + */ + function GetSecuritySettingsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetSecuritySettingsRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest + * @instance + */ + GetSecuritySettingsRequest.prototype.name = ""; + + /** + * Creates a new GetSecuritySettingsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IGetSecuritySettingsRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest} GetSecuritySettingsRequest instance + */ + GetSecuritySettingsRequest.create = function create(properties) { + return new GetSecuritySettingsRequest(properties); + }; + + /** + * Encodes the specified GetSecuritySettingsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IGetSecuritySettingsRequest} message GetSecuritySettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetSecuritySettingsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetSecuritySettingsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IGetSecuritySettingsRequest} message GetSecuritySettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetSecuritySettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetSecuritySettingsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest} GetSecuritySettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetSecuritySettingsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -25363,223 +26029,108 @@ }; /** - * Decodes a QueryInput message from the specified reader or buffer, length delimited. + * Decodes a GetSecuritySettingsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.QueryInput + * @memberof google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.QueryInput} QueryInput + * @returns {google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest} GetSecuritySettingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - QueryInput.decodeDelimited = function decodeDelimited(reader) { + GetSecuritySettingsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a QueryInput message. + * Verifies a GetSecuritySettingsRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.QueryInput + * @memberof google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - QueryInput.verify = function verify(message) { + GetSecuritySettingsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.text != null && message.hasOwnProperty("text")) { - properties.input = 1; - { - var error = $root.google.cloud.dialogflow.cx.v3.TextInput.verify(message.text); - if (error) - return "text." + error; - } - } - if (message.intent != null && message.hasOwnProperty("intent")) { - if (properties.input === 1) - return "input: multiple values"; - properties.input = 1; - { - var error = $root.google.cloud.dialogflow.cx.v3.IntentInput.verify(message.intent); - if (error) - return "intent." + error; - } - } - if (message.audio != null && message.hasOwnProperty("audio")) { - if (properties.input === 1) - return "input: multiple values"; - properties.input = 1; - { - var error = $root.google.cloud.dialogflow.cx.v3.AudioInput.verify(message.audio); - if (error) - return "audio." + error; - } - } - if (message.event != null && message.hasOwnProperty("event")) { - if (properties.input === 1) - return "input: multiple values"; - properties.input = 1; - { - var error = $root.google.cloud.dialogflow.cx.v3.EventInput.verify(message.event); - if (error) - return "event." + error; - } - } - if (message.dtmf != null && message.hasOwnProperty("dtmf")) { - if (properties.input === 1) - return "input: multiple values"; - properties.input = 1; - { - var error = $root.google.cloud.dialogflow.cx.v3.DtmfInput.verify(message.dtmf); - if (error) - return "dtmf." + error; - } - } - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a QueryInput message from a plain object. Also converts values to their respective internal types. + * Creates a GetSecuritySettingsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.QueryInput + * @memberof google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.QueryInput} QueryInput + * @returns {google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest} GetSecuritySettingsRequest */ - QueryInput.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.QueryInput) + GetSecuritySettingsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.QueryInput(); - if (object.text != null) { - if (typeof object.text !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.QueryInput.text: object expected"); - message.text = $root.google.cloud.dialogflow.cx.v3.TextInput.fromObject(object.text); - } - if (object.intent != null) { - if (typeof object.intent !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.QueryInput.intent: object expected"); - message.intent = $root.google.cloud.dialogflow.cx.v3.IntentInput.fromObject(object.intent); - } - if (object.audio != null) { - if (typeof object.audio !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.QueryInput.audio: object expected"); - message.audio = $root.google.cloud.dialogflow.cx.v3.AudioInput.fromObject(object.audio); - } - if (object.event != null) { - if (typeof object.event !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.QueryInput.event: object expected"); - message.event = $root.google.cloud.dialogflow.cx.v3.EventInput.fromObject(object.event); - } - if (object.dtmf != null) { - if (typeof object.dtmf !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.QueryInput.dtmf: object expected"); - message.dtmf = $root.google.cloud.dialogflow.cx.v3.DtmfInput.fromObject(object.dtmf); - } - if (object.languageCode != null) - message.languageCode = String(object.languageCode); + var message = new $root.google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a QueryInput message. Also converts values to other types if specified. + * Creates a plain object from a GetSecuritySettingsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.QueryInput + * @memberof google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.QueryInput} message QueryInput + * @param {google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest} message GetSecuritySettingsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - QueryInput.toObject = function toObject(message, options) { + GetSecuritySettingsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) - object.languageCode = ""; - if (message.text != null && message.hasOwnProperty("text")) { - object.text = $root.google.cloud.dialogflow.cx.v3.TextInput.toObject(message.text, options); - if (options.oneofs) - object.input = "text"; - } - if (message.intent != null && message.hasOwnProperty("intent")) { - object.intent = $root.google.cloud.dialogflow.cx.v3.IntentInput.toObject(message.intent, options); - if (options.oneofs) - object.input = "intent"; - } - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; - if (message.audio != null && message.hasOwnProperty("audio")) { - object.audio = $root.google.cloud.dialogflow.cx.v3.AudioInput.toObject(message.audio, options); - if (options.oneofs) - object.input = "audio"; - } - if (message.event != null && message.hasOwnProperty("event")) { - object.event = $root.google.cloud.dialogflow.cx.v3.EventInput.toObject(message.event, options); - if (options.oneofs) - object.input = "event"; - } - if (message.dtmf != null && message.hasOwnProperty("dtmf")) { - object.dtmf = $root.google.cloud.dialogflow.cx.v3.DtmfInput.toObject(message.dtmf, options); - if (options.oneofs) - object.input = "dtmf"; - } + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this QueryInput to JSON. + * Converts this GetSecuritySettingsRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.QueryInput + * @memberof google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest * @instance * @returns {Object.} JSON object */ - QueryInput.prototype.toJSON = function toJSON() { + GetSecuritySettingsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return QueryInput; + return GetSecuritySettingsRequest; })(); - v3.QueryResult = (function() { + v3.UpdateSecuritySettingsRequest = (function() { /** - * Properties of a QueryResult. + * Properties of an UpdateSecuritySettingsRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IQueryResult - * @property {string|null} [text] QueryResult text - * @property {string|null} [triggerIntent] QueryResult triggerIntent - * @property {string|null} [transcript] QueryResult transcript - * @property {string|null} [triggerEvent] QueryResult triggerEvent - * @property {string|null} [languageCode] QueryResult languageCode - * @property {google.protobuf.IStruct|null} [parameters] QueryResult parameters - * @property {Array.|null} [responseMessages] QueryResult responseMessages - * @property {Array.|null} [webhookStatuses] QueryResult webhookStatuses - * @property {Array.|null} [webhookPayloads] QueryResult webhookPayloads - * @property {google.cloud.dialogflow.cx.v3.IPage|null} [currentPage] QueryResult currentPage - * @property {google.cloud.dialogflow.cx.v3.IIntent|null} [intent] QueryResult intent - * @property {number|null} [intentDetectionConfidence] QueryResult intentDetectionConfidence - * @property {google.cloud.dialogflow.cx.v3.IMatch|null} [match] QueryResult match - * @property {google.protobuf.IStruct|null} [diagnosticInfo] QueryResult diagnosticInfo - * @property {google.cloud.dialogflow.cx.v3.ISentimentAnalysisResult|null} [sentimentAnalysisResult] QueryResult sentimentAnalysisResult + * @interface IUpdateSecuritySettingsRequest + * @property {google.cloud.dialogflow.cx.v3.ISecuritySettings|null} [securitySettings] UpdateSecuritySettingsRequest securitySettings + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateSecuritySettingsRequest updateMask */ /** - * Constructs a new QueryResult. + * Constructs a new UpdateSecuritySettingsRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a QueryResult. - * @implements IQueryResult + * @classdesc Represents an UpdateSecuritySettingsRequest. + * @implements IUpdateSecuritySettingsRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IQueryResult=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IUpdateSecuritySettingsRequest=} [properties] Properties to set */ - function QueryResult(properties) { - this.responseMessages = []; - this.webhookStatuses = []; - this.webhookPayloads = []; + function UpdateSecuritySettingsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -25587,280 +26138,322 @@ } /** - * QueryResult text. - * @member {string} text - * @memberof google.cloud.dialogflow.cx.v3.QueryResult + * UpdateSecuritySettingsRequest securitySettings. + * @member {google.cloud.dialogflow.cx.v3.ISecuritySettings|null|undefined} securitySettings + * @memberof google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest * @instance */ - QueryResult.prototype.text = ""; + UpdateSecuritySettingsRequest.prototype.securitySettings = null; /** - * QueryResult triggerIntent. - * @member {string} triggerIntent - * @memberof google.cloud.dialogflow.cx.v3.QueryResult + * UpdateSecuritySettingsRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest * @instance */ - QueryResult.prototype.triggerIntent = ""; + UpdateSecuritySettingsRequest.prototype.updateMask = null; /** - * QueryResult transcript. - * @member {string} transcript - * @memberof google.cloud.dialogflow.cx.v3.QueryResult - * @instance + * Creates a new UpdateSecuritySettingsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IUpdateSecuritySettingsRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest} UpdateSecuritySettingsRequest instance */ - QueryResult.prototype.transcript = ""; + UpdateSecuritySettingsRequest.create = function create(properties) { + return new UpdateSecuritySettingsRequest(properties); + }; /** - * QueryResult triggerEvent. - * @member {string} triggerEvent - * @memberof google.cloud.dialogflow.cx.v3.QueryResult - * @instance + * Encodes the specified UpdateSecuritySettingsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IUpdateSecuritySettingsRequest} message UpdateSecuritySettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - QueryResult.prototype.triggerEvent = ""; + UpdateSecuritySettingsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.securitySettings != null && Object.hasOwnProperty.call(message, "securitySettings")) + $root.google.cloud.dialogflow.cx.v3.SecuritySettings.encode(message.securitySettings, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; /** - * QueryResult languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3.QueryResult - * @instance + * Encodes the specified UpdateSecuritySettingsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IUpdateSecuritySettingsRequest} message UpdateSecuritySettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - QueryResult.prototype.languageCode = ""; + UpdateSecuritySettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * QueryResult parameters. - * @member {google.protobuf.IStruct|null|undefined} parameters - * @memberof google.cloud.dialogflow.cx.v3.QueryResult - * @instance + * Decodes an UpdateSecuritySettingsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest} UpdateSecuritySettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - QueryResult.prototype.parameters = null; + UpdateSecuritySettingsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.securitySettings = $root.google.cloud.dialogflow.cx.v3.SecuritySettings.decode(reader, reader.uint32()); + break; + case 2: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * QueryResult responseMessages. - * @member {Array.} responseMessages - * @memberof google.cloud.dialogflow.cx.v3.QueryResult - * @instance + * Decodes an UpdateSecuritySettingsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest} UpdateSecuritySettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - QueryResult.prototype.responseMessages = $util.emptyArray; + UpdateSecuritySettingsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * QueryResult webhookStatuses. - * @member {Array.} webhookStatuses - * @memberof google.cloud.dialogflow.cx.v3.QueryResult - * @instance + * Verifies an UpdateSecuritySettingsRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - QueryResult.prototype.webhookStatuses = $util.emptyArray; + UpdateSecuritySettingsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.securitySettings != null && message.hasOwnProperty("securitySettings")) { + var error = $root.google.cloud.dialogflow.cx.v3.SecuritySettings.verify(message.securitySettings); + if (error) + return "securitySettings." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + return null; + }; /** - * QueryResult webhookPayloads. - * @member {Array.} webhookPayloads - * @memberof google.cloud.dialogflow.cx.v3.QueryResult - * @instance + * Creates an UpdateSecuritySettingsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest} UpdateSecuritySettingsRequest */ - QueryResult.prototype.webhookPayloads = $util.emptyArray; + UpdateSecuritySettingsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest(); + if (object.securitySettings != null) { + if (typeof object.securitySettings !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest.securitySettings: object expected"); + message.securitySettings = $root.google.cloud.dialogflow.cx.v3.SecuritySettings.fromObject(object.securitySettings); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; /** - * QueryResult currentPage. - * @member {google.cloud.dialogflow.cx.v3.IPage|null|undefined} currentPage - * @memberof google.cloud.dialogflow.cx.v3.QueryResult - * @instance + * Creates a plain object from an UpdateSecuritySettingsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest} message UpdateSecuritySettingsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - QueryResult.prototype.currentPage = null; + UpdateSecuritySettingsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.securitySettings = null; + object.updateMask = null; + } + if (message.securitySettings != null && message.hasOwnProperty("securitySettings")) + object.securitySettings = $root.google.cloud.dialogflow.cx.v3.SecuritySettings.toObject(message.securitySettings, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; /** - * QueryResult intent. - * @member {google.cloud.dialogflow.cx.v3.IIntent|null|undefined} intent - * @memberof google.cloud.dialogflow.cx.v3.QueryResult + * Converts this UpdateSecuritySettingsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest * @instance + * @returns {Object.} JSON object */ - QueryResult.prototype.intent = null; + UpdateSecuritySettingsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UpdateSecuritySettingsRequest; + })(); + + v3.ListSecuritySettingsRequest = (function() { /** - * QueryResult intentDetectionConfidence. - * @member {number} intentDetectionConfidence - * @memberof google.cloud.dialogflow.cx.v3.QueryResult - * @instance + * Properties of a ListSecuritySettingsRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IListSecuritySettingsRequest + * @property {string|null} [parent] ListSecuritySettingsRequest parent + * @property {number|null} [pageSize] ListSecuritySettingsRequest pageSize + * @property {string|null} [pageToken] ListSecuritySettingsRequest pageToken */ - QueryResult.prototype.intentDetectionConfidence = 0; /** - * QueryResult match. - * @member {google.cloud.dialogflow.cx.v3.IMatch|null|undefined} match - * @memberof google.cloud.dialogflow.cx.v3.QueryResult - * @instance + * Constructs a new ListSecuritySettingsRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a ListSecuritySettingsRequest. + * @implements IListSecuritySettingsRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IListSecuritySettingsRequest=} [properties] Properties to set */ - QueryResult.prototype.match = null; + function ListSecuritySettingsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * QueryResult diagnosticInfo. - * @member {google.protobuf.IStruct|null|undefined} diagnosticInfo - * @memberof google.cloud.dialogflow.cx.v3.QueryResult + * ListSecuritySettingsRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest * @instance */ - QueryResult.prototype.diagnosticInfo = null; + ListSecuritySettingsRequest.prototype.parent = ""; /** - * QueryResult sentimentAnalysisResult. - * @member {google.cloud.dialogflow.cx.v3.ISentimentAnalysisResult|null|undefined} sentimentAnalysisResult - * @memberof google.cloud.dialogflow.cx.v3.QueryResult + * ListSecuritySettingsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest * @instance */ - QueryResult.prototype.sentimentAnalysisResult = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + ListSecuritySettingsRequest.prototype.pageSize = 0; /** - * QueryResult query. - * @member {"text"|"triggerIntent"|"transcript"|"triggerEvent"|undefined} query - * @memberof google.cloud.dialogflow.cx.v3.QueryResult + * ListSecuritySettingsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest * @instance */ - Object.defineProperty(QueryResult.prototype, "query", { - get: $util.oneOfGetter($oneOfFields = ["text", "triggerIntent", "transcript", "triggerEvent"]), - set: $util.oneOfSetter($oneOfFields) - }); + ListSecuritySettingsRequest.prototype.pageToken = ""; /** - * Creates a new QueryResult instance using the specified properties. + * Creates a new ListSecuritySettingsRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.QueryResult + * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IQueryResult=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.QueryResult} QueryResult instance + * @param {google.cloud.dialogflow.cx.v3.IListSecuritySettingsRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest} ListSecuritySettingsRequest instance */ - QueryResult.create = function create(properties) { - return new QueryResult(properties); + ListSecuritySettingsRequest.create = function create(properties) { + return new ListSecuritySettingsRequest(properties); }; /** - * Encodes the specified QueryResult message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.QueryResult.verify|verify} messages. + * Encodes the specified ListSecuritySettingsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.QueryResult + * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IQueryResult} message QueryResult message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListSecuritySettingsRequest} message ListSecuritySettingsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - QueryResult.encode = function encode(message, writer) { + ListSecuritySettingsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.text != null && Object.hasOwnProperty.call(message, "text")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.text); - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); - if (message.parameters != null && Object.hasOwnProperty.call(message, "parameters")) - $root.google.protobuf.Struct.encode(message.parameters, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.responseMessages != null && message.responseMessages.length) - for (var i = 0; i < message.responseMessages.length; ++i) - $root.google.cloud.dialogflow.cx.v3.ResponseMessage.encode(message.responseMessages[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.webhookPayloads != null && message.webhookPayloads.length) - for (var i = 0; i < message.webhookPayloads.length; ++i) - $root.google.protobuf.Struct.encode(message.webhookPayloads[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.currentPage != null && Object.hasOwnProperty.call(message, "currentPage")) - $root.google.cloud.dialogflow.cx.v3.Page.encode(message.currentPage, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.intent != null && Object.hasOwnProperty.call(message, "intent")) - $root.google.cloud.dialogflow.cx.v3.Intent.encode(message.intent, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.intentDetectionConfidence != null && Object.hasOwnProperty.call(message, "intentDetectionConfidence")) - writer.uint32(/* id 9, wireType 5 =*/77).float(message.intentDetectionConfidence); - if (message.diagnosticInfo != null && Object.hasOwnProperty.call(message, "diagnosticInfo")) - $root.google.protobuf.Struct.encode(message.diagnosticInfo, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.triggerIntent != null && Object.hasOwnProperty.call(message, "triggerIntent")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.triggerIntent); - if (message.transcript != null && Object.hasOwnProperty.call(message, "transcript")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.transcript); - if (message.webhookStatuses != null && message.webhookStatuses.length) - for (var i = 0; i < message.webhookStatuses.length; ++i) - $root.google.rpc.Status.encode(message.webhookStatuses[i], writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - if (message.triggerEvent != null && Object.hasOwnProperty.call(message, "triggerEvent")) - writer.uint32(/* id 14, wireType 2 =*/114).string(message.triggerEvent); - if (message.match != null && Object.hasOwnProperty.call(message, "match")) - $root.google.cloud.dialogflow.cx.v3.Match.encode(message.match, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); - if (message.sentimentAnalysisResult != null && Object.hasOwnProperty.call(message, "sentimentAnalysisResult")) - $root.google.cloud.dialogflow.cx.v3.SentimentAnalysisResult.encode(message.sentimentAnalysisResult, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); return writer; }; /** - * Encodes the specified QueryResult message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.QueryResult.verify|verify} messages. + * Encodes the specified ListSecuritySettingsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.QueryResult + * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IQueryResult} message QueryResult message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListSecuritySettingsRequest} message ListSecuritySettingsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - QueryResult.encodeDelimited = function encodeDelimited(message, writer) { + ListSecuritySettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a QueryResult message from the specified reader or buffer. + * Decodes a ListSecuritySettingsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.QueryResult + * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.QueryResult} QueryResult + * @returns {google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest} ListSecuritySettingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - QueryResult.decode = function decode(reader, length) { + ListSecuritySettingsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.QueryResult(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.text = reader.string(); - break; - case 11: - message.triggerIntent = reader.string(); - break; - case 12: - message.transcript = reader.string(); - break; - case 14: - message.triggerEvent = reader.string(); + message.parent = reader.string(); break; case 2: - message.languageCode = reader.string(); + message.pageSize = reader.int32(); break; case 3: - message.parameters = $root.google.protobuf.Struct.decode(reader, reader.uint32()); - break; - case 4: - if (!(message.responseMessages && message.responseMessages.length)) - message.responseMessages = []; - message.responseMessages.push($root.google.cloud.dialogflow.cx.v3.ResponseMessage.decode(reader, reader.uint32())); - break; - case 13: - if (!(message.webhookStatuses && message.webhookStatuses.length)) - message.webhookStatuses = []; - message.webhookStatuses.push($root.google.rpc.Status.decode(reader, reader.uint32())); - break; - case 6: - if (!(message.webhookPayloads && message.webhookPayloads.length)) - message.webhookPayloads = []; - message.webhookPayloads.push($root.google.protobuf.Struct.decode(reader, reader.uint32())); - break; - case 7: - message.currentPage = $root.google.cloud.dialogflow.cx.v3.Page.decode(reader, reader.uint32()); - break; - case 8: - message.intent = $root.google.cloud.dialogflow.cx.v3.Intent.decode(reader, reader.uint32()); - break; - case 9: - message.intentDetectionConfidence = reader.float(); - break; - case 15: - message.match = $root.google.cloud.dialogflow.cx.v3.Match.decode(reader, reader.uint32()); - break; - case 10: - message.diagnosticInfo = $root.google.protobuf.Struct.decode(reader, reader.uint32()); - break; - case 17: - message.sentimentAnalysisResult = $root.google.cloud.dialogflow.cx.v3.SentimentAnalysisResult.decode(reader, reader.uint32()); + message.pageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -25871,326 +26464,126 @@ }; /** - * Decodes a QueryResult message from the specified reader or buffer, length delimited. + * Decodes a ListSecuritySettingsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.QueryResult + * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.QueryResult} QueryResult + * @returns {google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest} ListSecuritySettingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - QueryResult.decodeDelimited = function decodeDelimited(reader) { + ListSecuritySettingsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a QueryResult message. + * Verifies a ListSecuritySettingsRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.QueryResult + * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - QueryResult.verify = function verify(message) { + ListSecuritySettingsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.text != null && message.hasOwnProperty("text")) { - properties.query = 1; - if (!$util.isString(message.text)) - return "text: string expected"; - } - if (message.triggerIntent != null && message.hasOwnProperty("triggerIntent")) { - if (properties.query === 1) - return "query: multiple values"; - properties.query = 1; - if (!$util.isString(message.triggerIntent)) - return "triggerIntent: string expected"; - } - if (message.transcript != null && message.hasOwnProperty("transcript")) { - if (properties.query === 1) - return "query: multiple values"; - properties.query = 1; - if (!$util.isString(message.transcript)) - return "transcript: string expected"; - } - if (message.triggerEvent != null && message.hasOwnProperty("triggerEvent")) { - if (properties.query === 1) - return "query: multiple values"; - properties.query = 1; - if (!$util.isString(message.triggerEvent)) - return "triggerEvent: string expected"; - } - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; - if (message.parameters != null && message.hasOwnProperty("parameters")) { - var error = $root.google.protobuf.Struct.verify(message.parameters); - if (error) - return "parameters." + error; - } - if (message.responseMessages != null && message.hasOwnProperty("responseMessages")) { - if (!Array.isArray(message.responseMessages)) - return "responseMessages: array expected"; - for (var i = 0; i < message.responseMessages.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.verify(message.responseMessages[i]); - if (error) - return "responseMessages." + error; - } - } - if (message.webhookStatuses != null && message.hasOwnProperty("webhookStatuses")) { - if (!Array.isArray(message.webhookStatuses)) - return "webhookStatuses: array expected"; - for (var i = 0; i < message.webhookStatuses.length; ++i) { - var error = $root.google.rpc.Status.verify(message.webhookStatuses[i]); - if (error) - return "webhookStatuses." + error; - } - } - if (message.webhookPayloads != null && message.hasOwnProperty("webhookPayloads")) { - if (!Array.isArray(message.webhookPayloads)) - return "webhookPayloads: array expected"; - for (var i = 0; i < message.webhookPayloads.length; ++i) { - var error = $root.google.protobuf.Struct.verify(message.webhookPayloads[i]); - if (error) - return "webhookPayloads." + error; - } - } - if (message.currentPage != null && message.hasOwnProperty("currentPage")) { - var error = $root.google.cloud.dialogflow.cx.v3.Page.verify(message.currentPage); - if (error) - return "currentPage." + error; - } - if (message.intent != null && message.hasOwnProperty("intent")) { - var error = $root.google.cloud.dialogflow.cx.v3.Intent.verify(message.intent); - if (error) - return "intent." + error; - } - if (message.intentDetectionConfidence != null && message.hasOwnProperty("intentDetectionConfidence")) - if (typeof message.intentDetectionConfidence !== "number") - return "intentDetectionConfidence: number expected"; - if (message.match != null && message.hasOwnProperty("match")) { - var error = $root.google.cloud.dialogflow.cx.v3.Match.verify(message.match); - if (error) - return "match." + error; - } - if (message.diagnosticInfo != null && message.hasOwnProperty("diagnosticInfo")) { - var error = $root.google.protobuf.Struct.verify(message.diagnosticInfo); - if (error) - return "diagnosticInfo." + error; - } - if (message.sentimentAnalysisResult != null && message.hasOwnProperty("sentimentAnalysisResult")) { - var error = $root.google.cloud.dialogflow.cx.v3.SentimentAnalysisResult.verify(message.sentimentAnalysisResult); - if (error) - return "sentimentAnalysisResult." + error; - } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; return null; }; /** - * Creates a QueryResult message from a plain object. Also converts values to their respective internal types. + * Creates a ListSecuritySettingsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.QueryResult + * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.QueryResult} QueryResult + * @returns {google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest} ListSecuritySettingsRequest */ - QueryResult.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.QueryResult) + ListSecuritySettingsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.QueryResult(); - if (object.text != null) - message.text = String(object.text); - if (object.triggerIntent != null) - message.triggerIntent = String(object.triggerIntent); - if (object.transcript != null) - message.transcript = String(object.transcript); - if (object.triggerEvent != null) - message.triggerEvent = String(object.triggerEvent); - if (object.languageCode != null) - message.languageCode = String(object.languageCode); - if (object.parameters != null) { - if (typeof object.parameters !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.QueryResult.parameters: object expected"); - message.parameters = $root.google.protobuf.Struct.fromObject(object.parameters); - } - if (object.responseMessages) { - if (!Array.isArray(object.responseMessages)) - throw TypeError(".google.cloud.dialogflow.cx.v3.QueryResult.responseMessages: array expected"); - message.responseMessages = []; - for (var i = 0; i < object.responseMessages.length; ++i) { - if (typeof object.responseMessages[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.QueryResult.responseMessages: object expected"); - message.responseMessages[i] = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.fromObject(object.responseMessages[i]); - } - } - if (object.webhookStatuses) { - if (!Array.isArray(object.webhookStatuses)) - throw TypeError(".google.cloud.dialogflow.cx.v3.QueryResult.webhookStatuses: array expected"); - message.webhookStatuses = []; - for (var i = 0; i < object.webhookStatuses.length; ++i) { - if (typeof object.webhookStatuses[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.QueryResult.webhookStatuses: object expected"); - message.webhookStatuses[i] = $root.google.rpc.Status.fromObject(object.webhookStatuses[i]); - } - } - if (object.webhookPayloads) { - if (!Array.isArray(object.webhookPayloads)) - throw TypeError(".google.cloud.dialogflow.cx.v3.QueryResult.webhookPayloads: array expected"); - message.webhookPayloads = []; - for (var i = 0; i < object.webhookPayloads.length; ++i) { - if (typeof object.webhookPayloads[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.QueryResult.webhookPayloads: object expected"); - message.webhookPayloads[i] = $root.google.protobuf.Struct.fromObject(object.webhookPayloads[i]); - } - } - if (object.currentPage != null) { - if (typeof object.currentPage !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.QueryResult.currentPage: object expected"); - message.currentPage = $root.google.cloud.dialogflow.cx.v3.Page.fromObject(object.currentPage); - } - if (object.intent != null) { - if (typeof object.intent !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.QueryResult.intent: object expected"); - message.intent = $root.google.cloud.dialogflow.cx.v3.Intent.fromObject(object.intent); - } - if (object.intentDetectionConfidence != null) - message.intentDetectionConfidence = Number(object.intentDetectionConfidence); - if (object.match != null) { - if (typeof object.match !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.QueryResult.match: object expected"); - message.match = $root.google.cloud.dialogflow.cx.v3.Match.fromObject(object.match); - } - if (object.diagnosticInfo != null) { - if (typeof object.diagnosticInfo !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.QueryResult.diagnosticInfo: object expected"); - message.diagnosticInfo = $root.google.protobuf.Struct.fromObject(object.diagnosticInfo); - } - if (object.sentimentAnalysisResult != null) { - if (typeof object.sentimentAnalysisResult !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.QueryResult.sentimentAnalysisResult: object expected"); - message.sentimentAnalysisResult = $root.google.cloud.dialogflow.cx.v3.SentimentAnalysisResult.fromObject(object.sentimentAnalysisResult); - } + var message = new $root.google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); return message; }; /** - * Creates a plain object from a QueryResult message. Also converts values to other types if specified. + * Creates a plain object from a ListSecuritySettingsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.QueryResult + * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.QueryResult} message QueryResult + * @param {google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest} message ListSecuritySettingsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - QueryResult.toObject = function toObject(message, options) { + ListSecuritySettingsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.responseMessages = []; - object.webhookPayloads = []; - object.webhookStatuses = []; - } if (options.defaults) { - object.languageCode = ""; - object.parameters = null; - object.currentPage = null; - object.intent = null; - object.intentDetectionConfidence = 0; - object.diagnosticInfo = null; - object.match = null; - object.sentimentAnalysisResult = null; - } - if (message.text != null && message.hasOwnProperty("text")) { - object.text = message.text; - if (options.oneofs) - object.query = "text"; - } - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; - if (message.parameters != null && message.hasOwnProperty("parameters")) - object.parameters = $root.google.protobuf.Struct.toObject(message.parameters, options); - if (message.responseMessages && message.responseMessages.length) { - object.responseMessages = []; - for (var j = 0; j < message.responseMessages.length; ++j) - object.responseMessages[j] = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.toObject(message.responseMessages[j], options); - } - if (message.webhookPayloads && message.webhookPayloads.length) { - object.webhookPayloads = []; - for (var j = 0; j < message.webhookPayloads.length; ++j) - object.webhookPayloads[j] = $root.google.protobuf.Struct.toObject(message.webhookPayloads[j], options); - } - if (message.currentPage != null && message.hasOwnProperty("currentPage")) - object.currentPage = $root.google.cloud.dialogflow.cx.v3.Page.toObject(message.currentPage, options); - if (message.intent != null && message.hasOwnProperty("intent")) - object.intent = $root.google.cloud.dialogflow.cx.v3.Intent.toObject(message.intent, options); - if (message.intentDetectionConfidence != null && message.hasOwnProperty("intentDetectionConfidence")) - object.intentDetectionConfidence = options.json && !isFinite(message.intentDetectionConfidence) ? String(message.intentDetectionConfidence) : message.intentDetectionConfidence; - if (message.diagnosticInfo != null && message.hasOwnProperty("diagnosticInfo")) - object.diagnosticInfo = $root.google.protobuf.Struct.toObject(message.diagnosticInfo, options); - if (message.triggerIntent != null && message.hasOwnProperty("triggerIntent")) { - object.triggerIntent = message.triggerIntent; - if (options.oneofs) - object.query = "triggerIntent"; - } - if (message.transcript != null && message.hasOwnProperty("transcript")) { - object.transcript = message.transcript; - if (options.oneofs) - object.query = "transcript"; - } - if (message.webhookStatuses && message.webhookStatuses.length) { - object.webhookStatuses = []; - for (var j = 0; j < message.webhookStatuses.length; ++j) - object.webhookStatuses[j] = $root.google.rpc.Status.toObject(message.webhookStatuses[j], options); - } - if (message.triggerEvent != null && message.hasOwnProperty("triggerEvent")) { - object.triggerEvent = message.triggerEvent; - if (options.oneofs) - object.query = "triggerEvent"; + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; } - if (message.match != null && message.hasOwnProperty("match")) - object.match = $root.google.cloud.dialogflow.cx.v3.Match.toObject(message.match, options); - if (message.sentimentAnalysisResult != null && message.hasOwnProperty("sentimentAnalysisResult")) - object.sentimentAnalysisResult = $root.google.cloud.dialogflow.cx.v3.SentimentAnalysisResult.toObject(message.sentimentAnalysisResult, options); + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; return object; }; /** - * Converts this QueryResult to JSON. + * Converts this ListSecuritySettingsRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.QueryResult + * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest * @instance * @returns {Object.} JSON object */ - QueryResult.prototype.toJSON = function toJSON() { + ListSecuritySettingsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return QueryResult; + return ListSecuritySettingsRequest; })(); - v3.TextInput = (function() { + v3.ListSecuritySettingsResponse = (function() { /** - * Properties of a TextInput. + * Properties of a ListSecuritySettingsResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @interface ITextInput - * @property {string|null} [text] TextInput text + * @interface IListSecuritySettingsResponse + * @property {Array.|null} [securitySettings] ListSecuritySettingsResponse securitySettings + * @property {string|null} [nextPageToken] ListSecuritySettingsResponse nextPageToken */ /** - * Constructs a new TextInput. + * Constructs a new ListSecuritySettingsResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a TextInput. - * @implements ITextInput + * @classdesc Represents a ListSecuritySettingsResponse. + * @implements IListSecuritySettingsResponse * @constructor - * @param {google.cloud.dialogflow.cx.v3.ITextInput=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IListSecuritySettingsResponse=} [properties] Properties to set */ - function TextInput(properties) { + function ListSecuritySettingsResponse(properties) { + this.securitySettings = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -26198,75 +26591,91 @@ } /** - * TextInput text. - * @member {string} text - * @memberof google.cloud.dialogflow.cx.v3.TextInput + * ListSecuritySettingsResponse securitySettings. + * @member {Array.} securitySettings + * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse * @instance */ - TextInput.prototype.text = ""; + ListSecuritySettingsResponse.prototype.securitySettings = $util.emptyArray; /** - * Creates a new TextInput instance using the specified properties. + * ListSecuritySettingsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse + * @instance + */ + ListSecuritySettingsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListSecuritySettingsResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.TextInput + * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse * @static - * @param {google.cloud.dialogflow.cx.v3.ITextInput=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.TextInput} TextInput instance + * @param {google.cloud.dialogflow.cx.v3.IListSecuritySettingsResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse} ListSecuritySettingsResponse instance */ - TextInput.create = function create(properties) { - return new TextInput(properties); + ListSecuritySettingsResponse.create = function create(properties) { + return new ListSecuritySettingsResponse(properties); }; /** - * Encodes the specified TextInput message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TextInput.verify|verify} messages. + * Encodes the specified ListSecuritySettingsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.TextInput + * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse * @static - * @param {google.cloud.dialogflow.cx.v3.ITextInput} message TextInput message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListSecuritySettingsResponse} message ListSecuritySettingsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TextInput.encode = function encode(message, writer) { + ListSecuritySettingsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.text != null && Object.hasOwnProperty.call(message, "text")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.text); + if (message.securitySettings != null && message.securitySettings.length) + for (var i = 0; i < message.securitySettings.length; ++i) + $root.google.cloud.dialogflow.cx.v3.SecuritySettings.encode(message.securitySettings[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified TextInput message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TextInput.verify|verify} messages. + * Encodes the specified ListSecuritySettingsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.TextInput + * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse * @static - * @param {google.cloud.dialogflow.cx.v3.ITextInput} message TextInput message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListSecuritySettingsResponse} message ListSecuritySettingsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TextInput.encodeDelimited = function encodeDelimited(message, writer) { + ListSecuritySettingsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TextInput message from the specified reader or buffer. + * Decodes a ListSecuritySettingsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.TextInput + * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.TextInput} TextInput + * @returns {google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse} ListSecuritySettingsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TextInput.decode = function decode(reader, length) { + ListSecuritySettingsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.TextInput(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.text = reader.string(); + if (!(message.securitySettings && message.securitySettings.length)) + message.securitySettings = []; + message.securitySettings.push($root.google.cloud.dialogflow.cx.v3.SecuritySettings.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -26277,107 +26686,134 @@ }; /** - * Decodes a TextInput message from the specified reader or buffer, length delimited. + * Decodes a ListSecuritySettingsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.TextInput + * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.TextInput} TextInput + * @returns {google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse} ListSecuritySettingsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TextInput.decodeDelimited = function decodeDelimited(reader) { + ListSecuritySettingsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TextInput message. + * Verifies a ListSecuritySettingsResponse message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.TextInput + * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TextInput.verify = function verify(message) { + ListSecuritySettingsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.text != null && message.hasOwnProperty("text")) - if (!$util.isString(message.text)) - return "text: string expected"; + if (message.securitySettings != null && message.hasOwnProperty("securitySettings")) { + if (!Array.isArray(message.securitySettings)) + return "securitySettings: array expected"; + for (var i = 0; i < message.securitySettings.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.SecuritySettings.verify(message.securitySettings[i]); + if (error) + return "securitySettings." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a TextInput message from a plain object. Also converts values to their respective internal types. + * Creates a ListSecuritySettingsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.TextInput + * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.TextInput} TextInput + * @returns {google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse} ListSecuritySettingsResponse */ - TextInput.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.TextInput) + ListSecuritySettingsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.TextInput(); - if (object.text != null) - message.text = String(object.text); + var message = new $root.google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse(); + if (object.securitySettings) { + if (!Array.isArray(object.securitySettings)) + throw TypeError(".google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse.securitySettings: array expected"); + message.securitySettings = []; + for (var i = 0; i < object.securitySettings.length; ++i) { + if (typeof object.securitySettings[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse.securitySettings: object expected"); + message.securitySettings[i] = $root.google.cloud.dialogflow.cx.v3.SecuritySettings.fromObject(object.securitySettings[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a TextInput message. Also converts values to other types if specified. + * Creates a plain object from a ListSecuritySettingsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.TextInput + * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse * @static - * @param {google.cloud.dialogflow.cx.v3.TextInput} message TextInput + * @param {google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse} message ListSecuritySettingsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TextInput.toObject = function toObject(message, options) { + ListSecuritySettingsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.securitySettings = []; if (options.defaults) - object.text = ""; - if (message.text != null && message.hasOwnProperty("text")) - object.text = message.text; + object.nextPageToken = ""; + if (message.securitySettings && message.securitySettings.length) { + object.securitySettings = []; + for (var j = 0; j < message.securitySettings.length; ++j) + object.securitySettings[j] = $root.google.cloud.dialogflow.cx.v3.SecuritySettings.toObject(message.securitySettings[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this TextInput to JSON. + * Converts this ListSecuritySettingsResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.TextInput + * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse * @instance * @returns {Object.} JSON object */ - TextInput.prototype.toJSON = function toJSON() { + ListSecuritySettingsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return TextInput; + return ListSecuritySettingsResponse; })(); - v3.IntentInput = (function() { + v3.CreateSecuritySettingsRequest = (function() { /** - * Properties of an IntentInput. + * Properties of a CreateSecuritySettingsRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IIntentInput - * @property {string|null} [intent] IntentInput intent + * @interface ICreateSecuritySettingsRequest + * @property {string|null} [parent] CreateSecuritySettingsRequest parent + * @property {google.cloud.dialogflow.cx.v3.ISecuritySettings|null} [securitySettings] CreateSecuritySettingsRequest securitySettings */ /** - * Constructs a new IntentInput. + * Constructs a new CreateSecuritySettingsRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents an IntentInput. - * @implements IIntentInput + * @classdesc Represents a CreateSecuritySettingsRequest. + * @implements ICreateSecuritySettingsRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IIntentInput=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.ICreateSecuritySettingsRequest=} [properties] Properties to set */ - function IntentInput(properties) { + function CreateSecuritySettingsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -26385,75 +26821,88 @@ } /** - * IntentInput intent. - * @member {string} intent - * @memberof google.cloud.dialogflow.cx.v3.IntentInput + * CreateSecuritySettingsRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest * @instance */ - IntentInput.prototype.intent = ""; + CreateSecuritySettingsRequest.prototype.parent = ""; /** - * Creates a new IntentInput instance using the specified properties. + * CreateSecuritySettingsRequest securitySettings. + * @member {google.cloud.dialogflow.cx.v3.ISecuritySettings|null|undefined} securitySettings + * @memberof google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest + * @instance + */ + CreateSecuritySettingsRequest.prototype.securitySettings = null; + + /** + * Creates a new CreateSecuritySettingsRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.IntentInput + * @memberof google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IIntentInput=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.IntentInput} IntentInput instance + * @param {google.cloud.dialogflow.cx.v3.ICreateSecuritySettingsRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest} CreateSecuritySettingsRequest instance */ - IntentInput.create = function create(properties) { - return new IntentInput(properties); + CreateSecuritySettingsRequest.create = function create(properties) { + return new CreateSecuritySettingsRequest(properties); }; /** - * Encodes the specified IntentInput message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.IntentInput.verify|verify} messages. + * Encodes the specified CreateSecuritySettingsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.IntentInput + * @memberof google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IIntentInput} message IntentInput message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ICreateSecuritySettingsRequest} message CreateSecuritySettingsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - IntentInput.encode = function encode(message, writer) { + CreateSecuritySettingsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.intent != null && Object.hasOwnProperty.call(message, "intent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.intent); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.securitySettings != null && Object.hasOwnProperty.call(message, "securitySettings")) + $root.google.cloud.dialogflow.cx.v3.SecuritySettings.encode(message.securitySettings, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified IntentInput message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.IntentInput.verify|verify} messages. + * Encodes the specified CreateSecuritySettingsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.IntentInput + * @memberof google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IIntentInput} message IntentInput message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ICreateSecuritySettingsRequest} message CreateSecuritySettingsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - IntentInput.encodeDelimited = function encodeDelimited(message, writer) { + CreateSecuritySettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an IntentInput message from the specified reader or buffer. + * Decodes a CreateSecuritySettingsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.IntentInput + * @memberof google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.IntentInput} IntentInput + * @returns {google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest} CreateSecuritySettingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - IntentInput.decode = function decode(reader, length) { + CreateSecuritySettingsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.IntentInput(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.intent = reader.string(); + message.parent = reader.string(); + break; + case 2: + message.securitySettings = $root.google.cloud.dialogflow.cx.v3.SecuritySettings.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -26464,108 +26913,121 @@ }; /** - * Decodes an IntentInput message from the specified reader or buffer, length delimited. + * Decodes a CreateSecuritySettingsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.IntentInput + * @memberof google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.IntentInput} IntentInput + * @returns {google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest} CreateSecuritySettingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - IntentInput.decodeDelimited = function decodeDelimited(reader) { + CreateSecuritySettingsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an IntentInput message. + * Verifies a CreateSecuritySettingsRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.IntentInput + * @memberof google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - IntentInput.verify = function verify(message) { + CreateSecuritySettingsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.intent != null && message.hasOwnProperty("intent")) - if (!$util.isString(message.intent)) - return "intent: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.securitySettings != null && message.hasOwnProperty("securitySettings")) { + var error = $root.google.cloud.dialogflow.cx.v3.SecuritySettings.verify(message.securitySettings); + if (error) + return "securitySettings." + error; + } return null; }; /** - * Creates an IntentInput message from a plain object. Also converts values to their respective internal types. + * Creates a CreateSecuritySettingsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.IntentInput + * @memberof google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.IntentInput} IntentInput + * @returns {google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest} CreateSecuritySettingsRequest */ - IntentInput.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.IntentInput) + CreateSecuritySettingsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.IntentInput(); - if (object.intent != null) - message.intent = String(object.intent); + var message = new $root.google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.securitySettings != null) { + if (typeof object.securitySettings !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest.securitySettings: object expected"); + message.securitySettings = $root.google.cloud.dialogflow.cx.v3.SecuritySettings.fromObject(object.securitySettings); + } return message; }; /** - * Creates a plain object from an IntentInput message. Also converts values to other types if specified. + * Creates a plain object from a CreateSecuritySettingsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.IntentInput + * @memberof google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IntentInput} message IntentInput + * @param {google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest} message CreateSecuritySettingsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - IntentInput.toObject = function toObject(message, options) { + CreateSecuritySettingsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.intent = ""; - if (message.intent != null && message.hasOwnProperty("intent")) - object.intent = message.intent; + if (options.defaults) { + object.parent = ""; + object.securitySettings = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.securitySettings != null && message.hasOwnProperty("securitySettings")) + object.securitySettings = $root.google.cloud.dialogflow.cx.v3.SecuritySettings.toObject(message.securitySettings, options); return object; }; /** - * Converts this IntentInput to JSON. + * Converts this CreateSecuritySettingsRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.IntentInput + * @memberof google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest * @instance * @returns {Object.} JSON object */ - IntentInput.prototype.toJSON = function toJSON() { + CreateSecuritySettingsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return IntentInput; + return CreateSecuritySettingsRequest; })(); - v3.AudioInput = (function() { + v3.DeleteSecuritySettingsRequest = (function() { /** - * Properties of an AudioInput. + * Properties of a DeleteSecuritySettingsRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IAudioInput - * @property {google.cloud.dialogflow.cx.v3.IInputAudioConfig|null} [config] AudioInput config - * @property {Uint8Array|null} [audio] AudioInput audio + * @interface IDeleteSecuritySettingsRequest + * @property {string|null} [name] DeleteSecuritySettingsRequest name */ /** - * Constructs a new AudioInput. + * Constructs a new DeleteSecuritySettingsRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents an AudioInput. - * @implements IAudioInput + * @classdesc Represents a DeleteSecuritySettingsRequest. + * @implements IDeleteSecuritySettingsRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IAudioInput=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IDeleteSecuritySettingsRequest=} [properties] Properties to set */ - function AudioInput(properties) { + function DeleteSecuritySettingsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -26573,88 +27035,75 @@ } /** - * AudioInput config. - * @member {google.cloud.dialogflow.cx.v3.IInputAudioConfig|null|undefined} config - * @memberof google.cloud.dialogflow.cx.v3.AudioInput - * @instance - */ - AudioInput.prototype.config = null; - - /** - * AudioInput audio. - * @member {Uint8Array} audio - * @memberof google.cloud.dialogflow.cx.v3.AudioInput + * DeleteSecuritySettingsRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest * @instance */ - AudioInput.prototype.audio = $util.newBuffer([]); + DeleteSecuritySettingsRequest.prototype.name = ""; /** - * Creates a new AudioInput instance using the specified properties. + * Creates a new DeleteSecuritySettingsRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.AudioInput + * @memberof google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IAudioInput=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.AudioInput} AudioInput instance + * @param {google.cloud.dialogflow.cx.v3.IDeleteSecuritySettingsRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest} DeleteSecuritySettingsRequest instance */ - AudioInput.create = function create(properties) { - return new AudioInput(properties); + DeleteSecuritySettingsRequest.create = function create(properties) { + return new DeleteSecuritySettingsRequest(properties); }; /** - * Encodes the specified AudioInput message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.AudioInput.verify|verify} messages. + * Encodes the specified DeleteSecuritySettingsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.AudioInput + * @memberof google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IAudioInput} message AudioInput message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IDeleteSecuritySettingsRequest} message DeleteSecuritySettingsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AudioInput.encode = function encode(message, writer) { + DeleteSecuritySettingsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.config != null && Object.hasOwnProperty.call(message, "config")) - $root.google.cloud.dialogflow.cx.v3.InputAudioConfig.encode(message.config, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.audio != null && Object.hasOwnProperty.call(message, "audio")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.audio); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified AudioInput message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.AudioInput.verify|verify} messages. + * Encodes the specified DeleteSecuritySettingsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.AudioInput + * @memberof google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IAudioInput} message AudioInput message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IDeleteSecuritySettingsRequest} message DeleteSecuritySettingsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AudioInput.encodeDelimited = function encodeDelimited(message, writer) { + DeleteSecuritySettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AudioInput message from the specified reader or buffer. + * Decodes a DeleteSecuritySettingsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.AudioInput + * @memberof google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.AudioInput} AudioInput + * @returns {google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest} DeleteSecuritySettingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AudioInput.decode = function decode(reader, length) { + DeleteSecuritySettingsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.AudioInput(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.config = $root.google.cloud.dialogflow.cx.v3.InputAudioConfig.decode(reader, reader.uint32()); - break; - case 2: - message.audio = reader.bytes(); + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -26665,130 +27114,114 @@ }; /** - * Decodes an AudioInput message from the specified reader or buffer, length delimited. + * Decodes a DeleteSecuritySettingsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.AudioInput + * @memberof google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.AudioInput} AudioInput + * @returns {google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest} DeleteSecuritySettingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AudioInput.decodeDelimited = function decodeDelimited(reader) { + DeleteSecuritySettingsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AudioInput message. + * Verifies a DeleteSecuritySettingsRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.AudioInput + * @memberof google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AudioInput.verify = function verify(message) { + DeleteSecuritySettingsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.config != null && message.hasOwnProperty("config")) { - var error = $root.google.cloud.dialogflow.cx.v3.InputAudioConfig.verify(message.config); - if (error) - return "config." + error; - } - if (message.audio != null && message.hasOwnProperty("audio")) - if (!(message.audio && typeof message.audio.length === "number" || $util.isString(message.audio))) - return "audio: buffer expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates an AudioInput message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteSecuritySettingsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.AudioInput + * @memberof google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.AudioInput} AudioInput + * @returns {google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest} DeleteSecuritySettingsRequest */ - AudioInput.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.AudioInput) + DeleteSecuritySettingsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.AudioInput(); - if (object.config != null) { - if (typeof object.config !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.AudioInput.config: object expected"); - message.config = $root.google.cloud.dialogflow.cx.v3.InputAudioConfig.fromObject(object.config); - } - if (object.audio != null) - if (typeof object.audio === "string") - $util.base64.decode(object.audio, message.audio = $util.newBuffer($util.base64.length(object.audio)), 0); - else if (object.audio.length) - message.audio = object.audio; + var message = new $root.google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from an AudioInput message. Also converts values to other types if specified. + * Creates a plain object from a DeleteSecuritySettingsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.AudioInput + * @memberof google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.AudioInput} message AudioInput + * @param {google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest} message DeleteSecuritySettingsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AudioInput.toObject = function toObject(message, options) { + DeleteSecuritySettingsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.config = null; - if (options.bytes === String) - object.audio = ""; - else { - object.audio = []; - if (options.bytes !== Array) - object.audio = $util.newBuffer(object.audio); - } - } - if (message.config != null && message.hasOwnProperty("config")) - object.config = $root.google.cloud.dialogflow.cx.v3.InputAudioConfig.toObject(message.config, options); - if (message.audio != null && message.hasOwnProperty("audio")) - object.audio = options.bytes === String ? $util.base64.encode(message.audio, 0, message.audio.length) : options.bytes === Array ? Array.prototype.slice.call(message.audio) : message.audio; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this AudioInput to JSON. + * Converts this DeleteSecuritySettingsRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.AudioInput + * @memberof google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest * @instance * @returns {Object.} JSON object */ - AudioInput.prototype.toJSON = function toJSON() { + DeleteSecuritySettingsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return AudioInput; + return DeleteSecuritySettingsRequest; })(); - v3.EventInput = (function() { - - /** - * Properties of an EventInput. - * @memberof google.cloud.dialogflow.cx.v3 - * @interface IEventInput - * @property {string|null} [event] EventInput event - */ + v3.SecuritySettings = (function() { /** - * Constructs a new EventInput. + * Properties of a SecuritySettings. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents an EventInput. - * @implements IEventInput + * @interface ISecuritySettings + * @property {string|null} [name] SecuritySettings name + * @property {string|null} [displayName] SecuritySettings displayName + * @property {google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionStrategy|null} [redactionStrategy] SecuritySettings redactionStrategy + * @property {google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionScope|null} [redactionScope] SecuritySettings redactionScope + * @property {string|null} [inspectTemplate] SecuritySettings inspectTemplate + * @property {number|null} [retentionWindowDays] SecuritySettings retentionWindowDays + * @property {Array.|null} [purgeDataTypes] SecuritySettings purgeDataTypes + */ + + /** + * Constructs a new SecuritySettings. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a SecuritySettings. + * @implements ISecuritySettings * @constructor - * @param {google.cloud.dialogflow.cx.v3.IEventInput=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.ISecuritySettings=} [properties] Properties to set */ - function EventInput(properties) { + function SecuritySettings(properties) { + this.purgeDataTypes = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -26796,276 +27229,178 @@ } /** - * EventInput event. - * @member {string} event - * @memberof google.cloud.dialogflow.cx.v3.EventInput + * SecuritySettings name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings * @instance */ - EventInput.prototype.event = ""; - - /** - * Creates a new EventInput instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.EventInput - * @static - * @param {google.cloud.dialogflow.cx.v3.IEventInput=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.EventInput} EventInput instance - */ - EventInput.create = function create(properties) { - return new EventInput(properties); - }; - - /** - * Encodes the specified EventInput message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.EventInput.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.EventInput - * @static - * @param {google.cloud.dialogflow.cx.v3.IEventInput} message EventInput message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EventInput.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.event != null && Object.hasOwnProperty.call(message, "event")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.event); - return writer; - }; - - /** - * Encodes the specified EventInput message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.EventInput.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.EventInput - * @static - * @param {google.cloud.dialogflow.cx.v3.IEventInput} message EventInput message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EventInput.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EventInput message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.EventInput - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.EventInput} EventInput - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EventInput.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.EventInput(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.event = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EventInput message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.EventInput - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.EventInput} EventInput - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EventInput.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EventInput message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.EventInput - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EventInput.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.event != null && message.hasOwnProperty("event")) - if (!$util.isString(message.event)) - return "event: string expected"; - return null; - }; + SecuritySettings.prototype.name = ""; /** - * Creates an EventInput message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.EventInput - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.EventInput} EventInput + * SecuritySettings displayName. + * @member {string} displayName + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings + * @instance */ - EventInput.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.EventInput) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.EventInput(); - if (object.event != null) - message.event = String(object.event); - return message; - }; + SecuritySettings.prototype.displayName = ""; /** - * Creates a plain object from an EventInput message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.EventInput - * @static - * @param {google.cloud.dialogflow.cx.v3.EventInput} message EventInput - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * SecuritySettings redactionStrategy. + * @member {google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionStrategy} redactionStrategy + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings + * @instance */ - EventInput.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.event = ""; - if (message.event != null && message.hasOwnProperty("event")) - object.event = message.event; - return object; - }; + SecuritySettings.prototype.redactionStrategy = 0; /** - * Converts this EventInput to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.EventInput + * SecuritySettings redactionScope. + * @member {google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionScope} redactionScope + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings * @instance - * @returns {Object.} JSON object */ - EventInput.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return EventInput; - })(); - - v3.DtmfInput = (function() { + SecuritySettings.prototype.redactionScope = 0; /** - * Properties of a DtmfInput. - * @memberof google.cloud.dialogflow.cx.v3 - * @interface IDtmfInput - * @property {string|null} [digits] DtmfInput digits - * @property {string|null} [finishDigit] DtmfInput finishDigit + * SecuritySettings inspectTemplate. + * @member {string} inspectTemplate + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings + * @instance */ + SecuritySettings.prototype.inspectTemplate = ""; /** - * Constructs a new DtmfInput. - * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a DtmfInput. - * @implements IDtmfInput - * @constructor - * @param {google.cloud.dialogflow.cx.v3.IDtmfInput=} [properties] Properties to set + * SecuritySettings retentionWindowDays. + * @member {number} retentionWindowDays + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings + * @instance */ - function DtmfInput(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + SecuritySettings.prototype.retentionWindowDays = 0; /** - * DtmfInput digits. - * @member {string} digits - * @memberof google.cloud.dialogflow.cx.v3.DtmfInput + * SecuritySettings purgeDataTypes. + * @member {Array.} purgeDataTypes + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings * @instance */ - DtmfInput.prototype.digits = ""; + SecuritySettings.prototype.purgeDataTypes = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * DtmfInput finishDigit. - * @member {string} finishDigit - * @memberof google.cloud.dialogflow.cx.v3.DtmfInput + * SecuritySettings dataRetention. + * @member {"retentionWindowDays"|undefined} dataRetention + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings * @instance */ - DtmfInput.prototype.finishDigit = ""; + Object.defineProperty(SecuritySettings.prototype, "dataRetention", { + get: $util.oneOfGetter($oneOfFields = ["retentionWindowDays"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new DtmfInput instance using the specified properties. + * Creates a new SecuritySettings instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.DtmfInput + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings * @static - * @param {google.cloud.dialogflow.cx.v3.IDtmfInput=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.DtmfInput} DtmfInput instance + * @param {google.cloud.dialogflow.cx.v3.ISecuritySettings=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.SecuritySettings} SecuritySettings instance */ - DtmfInput.create = function create(properties) { - return new DtmfInput(properties); + SecuritySettings.create = function create(properties) { + return new SecuritySettings(properties); }; /** - * Encodes the specified DtmfInput message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DtmfInput.verify|verify} messages. + * Encodes the specified SecuritySettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SecuritySettings.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.DtmfInput + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings * @static - * @param {google.cloud.dialogflow.cx.v3.IDtmfInput} message DtmfInput message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ISecuritySettings} message SecuritySettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DtmfInput.encode = function encode(message, writer) { + SecuritySettings.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.digits != null && Object.hasOwnProperty.call(message, "digits")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.digits); - if (message.finishDigit != null && Object.hasOwnProperty.call(message, "finishDigit")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.finishDigit); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.redactionStrategy != null && Object.hasOwnProperty.call(message, "redactionStrategy")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.redactionStrategy); + if (message.redactionScope != null && Object.hasOwnProperty.call(message, "redactionScope")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.redactionScope); + if (message.retentionWindowDays != null && Object.hasOwnProperty.call(message, "retentionWindowDays")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.retentionWindowDays); + if (message.purgeDataTypes != null && message.purgeDataTypes.length) { + writer.uint32(/* id 8, wireType 2 =*/66).fork(); + for (var i = 0; i < message.purgeDataTypes.length; ++i) + writer.int32(message.purgeDataTypes[i]); + writer.ldelim(); + } + if (message.inspectTemplate != null && Object.hasOwnProperty.call(message, "inspectTemplate")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.inspectTemplate); return writer; }; /** - * Encodes the specified DtmfInput message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DtmfInput.verify|verify} messages. + * Encodes the specified SecuritySettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SecuritySettings.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.DtmfInput + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings * @static - * @param {google.cloud.dialogflow.cx.v3.IDtmfInput} message DtmfInput message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ISecuritySettings} message SecuritySettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DtmfInput.encodeDelimited = function encodeDelimited(message, writer) { + SecuritySettings.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DtmfInput message from the specified reader or buffer. + * Decodes a SecuritySettings message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.DtmfInput + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.DtmfInput} DtmfInput + * @returns {google.cloud.dialogflow.cx.v3.SecuritySettings} SecuritySettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DtmfInput.decode = function decode(reader, length) { + SecuritySettings.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.DtmfInput(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.SecuritySettings(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.digits = reader.string(); + message.name = reader.string(); break; case 2: - message.finishDigit = reader.string(); + message.displayName = reader.string(); + break; + case 3: + message.redactionStrategy = reader.int32(); + break; + case 4: + message.redactionScope = reader.int32(); + break; + case 9: + message.inspectTemplate = reader.string(); + break; + case 6: + message.retentionWindowDays = reader.int32(); + break; + case 8: + if (!(message.purgeDataTypes && message.purgeDataTypes.length)) + message.purgeDataTypes = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.purgeDataTypes.push(reader.int32()); + } else + message.purgeDataTypes.push(reader.int32()); break; default: reader.skipType(tag & 7); @@ -27076,262 +27411,542 @@ }; /** - * Decodes a DtmfInput message from the specified reader or buffer, length delimited. + * Decodes a SecuritySettings message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.DtmfInput + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.DtmfInput} DtmfInput + * @returns {google.cloud.dialogflow.cx.v3.SecuritySettings} SecuritySettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DtmfInput.decodeDelimited = function decodeDelimited(reader) { + SecuritySettings.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DtmfInput message. + * Verifies a SecuritySettings message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.DtmfInput + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DtmfInput.verify = function verify(message) { + SecuritySettings.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.digits != null && message.hasOwnProperty("digits")) - if (!$util.isString(message.digits)) - return "digits: string expected"; - if (message.finishDigit != null && message.hasOwnProperty("finishDigit")) - if (!$util.isString(message.finishDigit)) - return "finishDigit: string expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.redactionStrategy != null && message.hasOwnProperty("redactionStrategy")) + switch (message.redactionStrategy) { + default: + return "redactionStrategy: enum value expected"; + case 0: + case 1: + break; + } + if (message.redactionScope != null && message.hasOwnProperty("redactionScope")) + switch (message.redactionScope) { + default: + return "redactionScope: enum value expected"; + case 0: + case 2: + break; + } + if (message.inspectTemplate != null && message.hasOwnProperty("inspectTemplate")) + if (!$util.isString(message.inspectTemplate)) + return "inspectTemplate: string expected"; + if (message.retentionWindowDays != null && message.hasOwnProperty("retentionWindowDays")) { + properties.dataRetention = 1; + if (!$util.isInteger(message.retentionWindowDays)) + return "retentionWindowDays: integer expected"; + } + if (message.purgeDataTypes != null && message.hasOwnProperty("purgeDataTypes")) { + if (!Array.isArray(message.purgeDataTypes)) + return "purgeDataTypes: array expected"; + for (var i = 0; i < message.purgeDataTypes.length; ++i) + switch (message.purgeDataTypes[i]) { + default: + return "purgeDataTypes: enum value[] expected"; + case 0: + case 1: + break; + } + } return null; }; /** - * Creates a DtmfInput message from a plain object. Also converts values to their respective internal types. + * Creates a SecuritySettings message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.DtmfInput + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.DtmfInput} DtmfInput + * @returns {google.cloud.dialogflow.cx.v3.SecuritySettings} SecuritySettings */ - DtmfInput.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.DtmfInput) + SecuritySettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.SecuritySettings) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.DtmfInput(); - if (object.digits != null) - message.digits = String(object.digits); - if (object.finishDigit != null) - message.finishDigit = String(object.finishDigit); + var message = new $root.google.cloud.dialogflow.cx.v3.SecuritySettings(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + switch (object.redactionStrategy) { + case "REDACTION_STRATEGY_UNSPECIFIED": + case 0: + message.redactionStrategy = 0; + break; + case "REDACT_WITH_SERVICE": + case 1: + message.redactionStrategy = 1; + break; + } + switch (object.redactionScope) { + case "REDACTION_SCOPE_UNSPECIFIED": + case 0: + message.redactionScope = 0; + break; + case "REDACT_DISK_STORAGE": + case 2: + message.redactionScope = 2; + break; + } + if (object.inspectTemplate != null) + message.inspectTemplate = String(object.inspectTemplate); + if (object.retentionWindowDays != null) + message.retentionWindowDays = object.retentionWindowDays | 0; + if (object.purgeDataTypes) { + if (!Array.isArray(object.purgeDataTypes)) + throw TypeError(".google.cloud.dialogflow.cx.v3.SecuritySettings.purgeDataTypes: array expected"); + message.purgeDataTypes = []; + for (var i = 0; i < object.purgeDataTypes.length; ++i) + switch (object.purgeDataTypes[i]) { + default: + case "PURGE_DATA_TYPE_UNSPECIFIED": + case 0: + message.purgeDataTypes[i] = 0; + break; + case "DIALOGFLOW_HISTORY": + case 1: + message.purgeDataTypes[i] = 1; + break; + } + } return message; }; /** - * Creates a plain object from a DtmfInput message. Also converts values to other types if specified. + * Creates a plain object from a SecuritySettings message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.DtmfInput + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings * @static - * @param {google.cloud.dialogflow.cx.v3.DtmfInput} message DtmfInput + * @param {google.cloud.dialogflow.cx.v3.SecuritySettings} message SecuritySettings * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DtmfInput.toObject = function toObject(message, options) { + SecuritySettings.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.purgeDataTypes = []; if (options.defaults) { - object.digits = ""; - object.finishDigit = ""; + object.name = ""; + object.displayName = ""; + object.redactionStrategy = options.enums === String ? "REDACTION_STRATEGY_UNSPECIFIED" : 0; + object.redactionScope = options.enums === String ? "REDACTION_SCOPE_UNSPECIFIED" : 0; + object.inspectTemplate = ""; } - if (message.digits != null && message.hasOwnProperty("digits")) - object.digits = message.digits; - if (message.finishDigit != null && message.hasOwnProperty("finishDigit")) - object.finishDigit = message.finishDigit; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.redactionStrategy != null && message.hasOwnProperty("redactionStrategy")) + object.redactionStrategy = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionStrategy[message.redactionStrategy] : message.redactionStrategy; + if (message.redactionScope != null && message.hasOwnProperty("redactionScope")) + object.redactionScope = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionScope[message.redactionScope] : message.redactionScope; + if (message.retentionWindowDays != null && message.hasOwnProperty("retentionWindowDays")) { + object.retentionWindowDays = message.retentionWindowDays; + if (options.oneofs) + object.dataRetention = "retentionWindowDays"; + } + if (message.purgeDataTypes && message.purgeDataTypes.length) { + object.purgeDataTypes = []; + for (var j = 0; j < message.purgeDataTypes.length; ++j) + object.purgeDataTypes[j] = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.SecuritySettings.PurgeDataType[message.purgeDataTypes[j]] : message.purgeDataTypes[j]; + } + if (message.inspectTemplate != null && message.hasOwnProperty("inspectTemplate")) + object.inspectTemplate = message.inspectTemplate; return object; }; /** - * Converts this DtmfInput to JSON. + * Converts this SecuritySettings to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.DtmfInput + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings * @instance * @returns {Object.} JSON object */ - DtmfInput.prototype.toJSON = function toJSON() { + SecuritySettings.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DtmfInput; - })(); - - v3.Match = (function() { - /** - * Properties of a Match. - * @memberof google.cloud.dialogflow.cx.v3 - * @interface IMatch - * @property {google.cloud.dialogflow.cx.v3.IIntent|null} [intent] Match intent - * @property {string|null} [event] Match event - * @property {google.protobuf.IStruct|null} [parameters] Match parameters - * @property {string|null} [resolvedInput] Match resolvedInput - * @property {google.cloud.dialogflow.cx.v3.Match.MatchType|null} [matchType] Match matchType - * @property {number|null} [confidence] Match confidence - */ - + * RedactionStrategy enum. + * @name google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionStrategy + * @enum {number} + * @property {number} REDACTION_STRATEGY_UNSPECIFIED=0 REDACTION_STRATEGY_UNSPECIFIED value + * @property {number} REDACT_WITH_SERVICE=1 REDACT_WITH_SERVICE value + */ + SecuritySettings.RedactionStrategy = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "REDACTION_STRATEGY_UNSPECIFIED"] = 0; + values[valuesById[1] = "REDACT_WITH_SERVICE"] = 1; + return values; + })(); + /** - * Constructs a new Match. + * RedactionScope enum. + * @name google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionScope + * @enum {number} + * @property {number} REDACTION_SCOPE_UNSPECIFIED=0 REDACTION_SCOPE_UNSPECIFIED value + * @property {number} REDACT_DISK_STORAGE=2 REDACT_DISK_STORAGE value + */ + SecuritySettings.RedactionScope = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "REDACTION_SCOPE_UNSPECIFIED"] = 0; + values[valuesById[2] = "REDACT_DISK_STORAGE"] = 2; + return values; + })(); + + /** + * PurgeDataType enum. + * @name google.cloud.dialogflow.cx.v3.SecuritySettings.PurgeDataType + * @enum {number} + * @property {number} PURGE_DATA_TYPE_UNSPECIFIED=0 PURGE_DATA_TYPE_UNSPECIFIED value + * @property {number} DIALOGFLOW_HISTORY=1 DIALOGFLOW_HISTORY value + */ + SecuritySettings.PurgeDataType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PURGE_DATA_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DIALOGFLOW_HISTORY"] = 1; + return values; + })(); + + return SecuritySettings; + })(); + + v3.Sessions = (function() { + + /** + * Constructs a new Sessions service. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a Match. - * @implements IMatch + * @classdesc Represents a Sessions + * @extends $protobuf.rpc.Service * @constructor - * @param {google.cloud.dialogflow.cx.v3.IMatch=} [properties] Properties to set + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited */ - function Match(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function Sessions(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); } + (Sessions.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Sessions; + /** - * Match intent. - * @member {google.cloud.dialogflow.cx.v3.IIntent|null|undefined} intent - * @memberof google.cloud.dialogflow.cx.v3.Match + * Creates new Sessions service using the specified rpc implementation. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.Sessions + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Sessions} RPC service. Useful where requests and/or responses are streamed. + */ + Sessions.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Sessions#detectIntent}. + * @memberof google.cloud.dialogflow.cx.v3.Sessions + * @typedef DetectIntentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.DetectIntentResponse} [response] DetectIntentResponse + */ + + /** + * Calls DetectIntent. + * @function detectIntent + * @memberof google.cloud.dialogflow.cx.v3.Sessions * @instance + * @param {google.cloud.dialogflow.cx.v3.IDetectIntentRequest} request DetectIntentRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Sessions.DetectIntentCallback} callback Node-style callback called with the error, if any, and DetectIntentResponse + * @returns {undefined} + * @variation 1 */ - Match.prototype.intent = null; + Object.defineProperty(Sessions.prototype.detectIntent = function detectIntent(request, callback) { + return this.rpcCall(detectIntent, $root.google.cloud.dialogflow.cx.v3.DetectIntentRequest, $root.google.cloud.dialogflow.cx.v3.DetectIntentResponse, request, callback); + }, "name", { value: "DetectIntent" }); /** - * Match event. - * @member {string} event - * @memberof google.cloud.dialogflow.cx.v3.Match + * Calls DetectIntent. + * @function detectIntent + * @memberof google.cloud.dialogflow.cx.v3.Sessions * @instance + * @param {google.cloud.dialogflow.cx.v3.IDetectIntentRequest} request DetectIntentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - Match.prototype.event = ""; /** - * Match parameters. - * @member {google.protobuf.IStruct|null|undefined} parameters - * @memberof google.cloud.dialogflow.cx.v3.Match + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Sessions#streamingDetectIntent}. + * @memberof google.cloud.dialogflow.cx.v3.Sessions + * @typedef StreamingDetectIntentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse} [response] StreamingDetectIntentResponse + */ + + /** + * Calls StreamingDetectIntent. + * @function streamingDetectIntent + * @memberof google.cloud.dialogflow.cx.v3.Sessions + * @instance + * @param {google.cloud.dialogflow.cx.v3.IStreamingDetectIntentRequest} request StreamingDetectIntentRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Sessions.StreamingDetectIntentCallback} callback Node-style callback called with the error, if any, and StreamingDetectIntentResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Sessions.prototype.streamingDetectIntent = function streamingDetectIntent(request, callback) { + return this.rpcCall(streamingDetectIntent, $root.google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest, $root.google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse, request, callback); + }, "name", { value: "StreamingDetectIntent" }); + + /** + * Calls StreamingDetectIntent. + * @function streamingDetectIntent + * @memberof google.cloud.dialogflow.cx.v3.Sessions * @instance + * @param {google.cloud.dialogflow.cx.v3.IStreamingDetectIntentRequest} request StreamingDetectIntentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - Match.prototype.parameters = null; /** - * Match resolvedInput. - * @member {string} resolvedInput - * @memberof google.cloud.dialogflow.cx.v3.Match + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Sessions#matchIntent}. + * @memberof google.cloud.dialogflow.cx.v3.Sessions + * @typedef MatchIntentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.MatchIntentResponse} [response] MatchIntentResponse + */ + + /** + * Calls MatchIntent. + * @function matchIntent + * @memberof google.cloud.dialogflow.cx.v3.Sessions * @instance + * @param {google.cloud.dialogflow.cx.v3.IMatchIntentRequest} request MatchIntentRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Sessions.MatchIntentCallback} callback Node-style callback called with the error, if any, and MatchIntentResponse + * @returns {undefined} + * @variation 1 */ - Match.prototype.resolvedInput = ""; + Object.defineProperty(Sessions.prototype.matchIntent = function matchIntent(request, callback) { + return this.rpcCall(matchIntent, $root.google.cloud.dialogflow.cx.v3.MatchIntentRequest, $root.google.cloud.dialogflow.cx.v3.MatchIntentResponse, request, callback); + }, "name", { value: "MatchIntent" }); /** - * Match matchType. - * @member {google.cloud.dialogflow.cx.v3.Match.MatchType} matchType - * @memberof google.cloud.dialogflow.cx.v3.Match + * Calls MatchIntent. + * @function matchIntent + * @memberof google.cloud.dialogflow.cx.v3.Sessions * @instance + * @param {google.cloud.dialogflow.cx.v3.IMatchIntentRequest} request MatchIntentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - Match.prototype.matchType = 0; /** - * Match confidence. - * @member {number} confidence - * @memberof google.cloud.dialogflow.cx.v3.Match + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Sessions#fulfillIntent}. + * @memberof google.cloud.dialogflow.cx.v3.Sessions + * @typedef FulfillIntentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.FulfillIntentResponse} [response] FulfillIntentResponse + */ + + /** + * Calls FulfillIntent. + * @function fulfillIntent + * @memberof google.cloud.dialogflow.cx.v3.Sessions * @instance + * @param {google.cloud.dialogflow.cx.v3.IFulfillIntentRequest} request FulfillIntentRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Sessions.FulfillIntentCallback} callback Node-style callback called with the error, if any, and FulfillIntentResponse + * @returns {undefined} + * @variation 1 */ - Match.prototype.confidence = 0; + Object.defineProperty(Sessions.prototype.fulfillIntent = function fulfillIntent(request, callback) { + return this.rpcCall(fulfillIntent, $root.google.cloud.dialogflow.cx.v3.FulfillIntentRequest, $root.google.cloud.dialogflow.cx.v3.FulfillIntentResponse, request, callback); + }, "name", { value: "FulfillIntent" }); /** - * Creates a new Match instance using the specified properties. + * Calls FulfillIntent. + * @function fulfillIntent + * @memberof google.cloud.dialogflow.cx.v3.Sessions + * @instance + * @param {google.cloud.dialogflow.cx.v3.IFulfillIntentRequest} request FulfillIntentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Sessions; + })(); + + v3.DetectIntentRequest = (function() { + + /** + * Properties of a DetectIntentRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IDetectIntentRequest + * @property {string|null} [session] DetectIntentRequest session + * @property {google.cloud.dialogflow.cx.v3.IQueryParameters|null} [queryParams] DetectIntentRequest queryParams + * @property {google.cloud.dialogflow.cx.v3.IQueryInput|null} [queryInput] DetectIntentRequest queryInput + * @property {google.cloud.dialogflow.cx.v3.IOutputAudioConfig|null} [outputAudioConfig] DetectIntentRequest outputAudioConfig + */ + + /** + * Constructs a new DetectIntentRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a DetectIntentRequest. + * @implements IDetectIntentRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IDetectIntentRequest=} [properties] Properties to set + */ + function DetectIntentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DetectIntentRequest session. + * @member {string} session + * @memberof google.cloud.dialogflow.cx.v3.DetectIntentRequest + * @instance + */ + DetectIntentRequest.prototype.session = ""; + + /** + * DetectIntentRequest queryParams. + * @member {google.cloud.dialogflow.cx.v3.IQueryParameters|null|undefined} queryParams + * @memberof google.cloud.dialogflow.cx.v3.DetectIntentRequest + * @instance + */ + DetectIntentRequest.prototype.queryParams = null; + + /** + * DetectIntentRequest queryInput. + * @member {google.cloud.dialogflow.cx.v3.IQueryInput|null|undefined} queryInput + * @memberof google.cloud.dialogflow.cx.v3.DetectIntentRequest + * @instance + */ + DetectIntentRequest.prototype.queryInput = null; + + /** + * DetectIntentRequest outputAudioConfig. + * @member {google.cloud.dialogflow.cx.v3.IOutputAudioConfig|null|undefined} outputAudioConfig + * @memberof google.cloud.dialogflow.cx.v3.DetectIntentRequest + * @instance + */ + DetectIntentRequest.prototype.outputAudioConfig = null; + + /** + * Creates a new DetectIntentRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.Match + * @memberof google.cloud.dialogflow.cx.v3.DetectIntentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IMatch=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.Match} Match instance + * @param {google.cloud.dialogflow.cx.v3.IDetectIntentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.DetectIntentRequest} DetectIntentRequest instance */ - Match.create = function create(properties) { - return new Match(properties); + DetectIntentRequest.create = function create(properties) { + return new DetectIntentRequest(properties); }; /** - * Encodes the specified Match message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Match.verify|verify} messages. + * Encodes the specified DetectIntentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DetectIntentRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.Match + * @memberof google.cloud.dialogflow.cx.v3.DetectIntentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IMatch} message Match message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IDetectIntentRequest} message DetectIntentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Match.encode = function encode(message, writer) { + DetectIntentRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.intent != null && Object.hasOwnProperty.call(message, "intent")) - $root.google.cloud.dialogflow.cx.v3.Intent.encode(message.intent, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.parameters != null && Object.hasOwnProperty.call(message, "parameters")) - $root.google.protobuf.Struct.encode(message.parameters, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.resolvedInput != null && Object.hasOwnProperty.call(message, "resolvedInput")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.resolvedInput); - if (message.matchType != null && Object.hasOwnProperty.call(message, "matchType")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.matchType); - if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) - writer.uint32(/* id 5, wireType 5 =*/45).float(message.confidence); - if (message.event != null && Object.hasOwnProperty.call(message, "event")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.event); + if (message.session != null && Object.hasOwnProperty.call(message, "session")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.session); + if (message.queryParams != null && Object.hasOwnProperty.call(message, "queryParams")) + $root.google.cloud.dialogflow.cx.v3.QueryParameters.encode(message.queryParams, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.queryInput != null && Object.hasOwnProperty.call(message, "queryInput")) + $root.google.cloud.dialogflow.cx.v3.QueryInput.encode(message.queryInput, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.outputAudioConfig != null && Object.hasOwnProperty.call(message, "outputAudioConfig")) + $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.encode(message.outputAudioConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified Match message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Match.verify|verify} messages. + * Encodes the specified DetectIntentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DetectIntentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Match + * @memberof google.cloud.dialogflow.cx.v3.DetectIntentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IMatch} message Match message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IDetectIntentRequest} message DetectIntentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Match.encodeDelimited = function encodeDelimited(message, writer) { + DetectIntentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Match message from the specified reader or buffer. + * Decodes a DetectIntentRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.Match + * @memberof google.cloud.dialogflow.cx.v3.DetectIntentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.Match} Match + * @returns {google.cloud.dialogflow.cx.v3.DetectIntentRequest} DetectIntentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Match.decode = function decode(reader, length) { + DetectIntentRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.Match(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.DetectIntentRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.intent = $root.google.cloud.dialogflow.cx.v3.Intent.decode(reader, reader.uint32()); - break; - case 6: - message.event = reader.string(); + message.session = reader.string(); break; case 2: - message.parameters = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + message.queryParams = $root.google.cloud.dialogflow.cx.v3.QueryParameters.decode(reader, reader.uint32()); break; case 3: - message.resolvedInput = reader.string(); + message.queryInput = $root.google.cloud.dialogflow.cx.v3.QueryInput.decode(reader, reader.uint32()); break; case 4: - message.matchType = reader.int32(); - break; - case 5: - message.confidence = reader.float(); + message.outputAudioConfig = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -27342,222 +27957,150 @@ }; /** - * Decodes a Match message from the specified reader or buffer, length delimited. + * Decodes a DetectIntentRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Match + * @memberof google.cloud.dialogflow.cx.v3.DetectIntentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.Match} Match + * @returns {google.cloud.dialogflow.cx.v3.DetectIntentRequest} DetectIntentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Match.decodeDelimited = function decodeDelimited(reader) { + DetectIntentRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Match message. + * Verifies a DetectIntentRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.Match + * @memberof google.cloud.dialogflow.cx.v3.DetectIntentRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Match.verify = function verify(message) { + DetectIntentRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.intent != null && message.hasOwnProperty("intent")) { - var error = $root.google.cloud.dialogflow.cx.v3.Intent.verify(message.intent); + if (message.session != null && message.hasOwnProperty("session")) + if (!$util.isString(message.session)) + return "session: string expected"; + if (message.queryParams != null && message.hasOwnProperty("queryParams")) { + var error = $root.google.cloud.dialogflow.cx.v3.QueryParameters.verify(message.queryParams); if (error) - return "intent." + error; + return "queryParams." + error; } - if (message.event != null && message.hasOwnProperty("event")) - if (!$util.isString(message.event)) - return "event: string expected"; - if (message.parameters != null && message.hasOwnProperty("parameters")) { - var error = $root.google.protobuf.Struct.verify(message.parameters); + if (message.queryInput != null && message.hasOwnProperty("queryInput")) { + var error = $root.google.cloud.dialogflow.cx.v3.QueryInput.verify(message.queryInput); if (error) - return "parameters." + error; + return "queryInput." + error; + } + if (message.outputAudioConfig != null && message.hasOwnProperty("outputAudioConfig")) { + var error = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.verify(message.outputAudioConfig); + if (error) + return "outputAudioConfig." + error; } - if (message.resolvedInput != null && message.hasOwnProperty("resolvedInput")) - if (!$util.isString(message.resolvedInput)) - return "resolvedInput: string expected"; - if (message.matchType != null && message.hasOwnProperty("matchType")) - switch (message.matchType) { - default: - return "matchType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - break; - } - if (message.confidence != null && message.hasOwnProperty("confidence")) - if (typeof message.confidence !== "number") - return "confidence: number expected"; return null; }; /** - * Creates a Match message from a plain object. Also converts values to their respective internal types. + * Creates a DetectIntentRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.Match + * @memberof google.cloud.dialogflow.cx.v3.DetectIntentRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.Match} Match + * @returns {google.cloud.dialogflow.cx.v3.DetectIntentRequest} DetectIntentRequest */ - Match.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.Match) + DetectIntentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.DetectIntentRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.Match(); - if (object.intent != null) { - if (typeof object.intent !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.Match.intent: object expected"); - message.intent = $root.google.cloud.dialogflow.cx.v3.Intent.fromObject(object.intent); + var message = new $root.google.cloud.dialogflow.cx.v3.DetectIntentRequest(); + if (object.session != null) + message.session = String(object.session); + if (object.queryParams != null) { + if (typeof object.queryParams !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.DetectIntentRequest.queryParams: object expected"); + message.queryParams = $root.google.cloud.dialogflow.cx.v3.QueryParameters.fromObject(object.queryParams); } - if (object.event != null) - message.event = String(object.event); - if (object.parameters != null) { - if (typeof object.parameters !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.Match.parameters: object expected"); - message.parameters = $root.google.protobuf.Struct.fromObject(object.parameters); + if (object.queryInput != null) { + if (typeof object.queryInput !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.DetectIntentRequest.queryInput: object expected"); + message.queryInput = $root.google.cloud.dialogflow.cx.v3.QueryInput.fromObject(object.queryInput); } - if (object.resolvedInput != null) - message.resolvedInput = String(object.resolvedInput); - switch (object.matchType) { - case "MATCH_TYPE_UNSPECIFIED": - case 0: - message.matchType = 0; - break; - case "INTENT": - case 1: - message.matchType = 1; - break; - case "DIRECT_INTENT": - case 2: - message.matchType = 2; - break; - case "PARAMETER_FILLING": - case 3: - message.matchType = 3; - break; - case "NO_MATCH": - case 4: - message.matchType = 4; - break; - case "NO_INPUT": - case 5: - message.matchType = 5; - break; - case "EVENT": - case 6: - message.matchType = 6; - break; + if (object.outputAudioConfig != null) { + if (typeof object.outputAudioConfig !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.DetectIntentRequest.outputAudioConfig: object expected"); + message.outputAudioConfig = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.fromObject(object.outputAudioConfig); } - if (object.confidence != null) - message.confidence = Number(object.confidence); return message; }; /** - * Creates a plain object from a Match message. Also converts values to other types if specified. + * Creates a plain object from a DetectIntentRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.Match + * @memberof google.cloud.dialogflow.cx.v3.DetectIntentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.Match} message Match + * @param {google.cloud.dialogflow.cx.v3.DetectIntentRequest} message DetectIntentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Match.toObject = function toObject(message, options) { + DetectIntentRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.intent = null; - object.parameters = null; - object.resolvedInput = ""; - object.matchType = options.enums === String ? "MATCH_TYPE_UNSPECIFIED" : 0; - object.confidence = 0; - object.event = ""; + object.session = ""; + object.queryParams = null; + object.queryInput = null; + object.outputAudioConfig = null; } - if (message.intent != null && message.hasOwnProperty("intent")) - object.intent = $root.google.cloud.dialogflow.cx.v3.Intent.toObject(message.intent, options); - if (message.parameters != null && message.hasOwnProperty("parameters")) - object.parameters = $root.google.protobuf.Struct.toObject(message.parameters, options); - if (message.resolvedInput != null && message.hasOwnProperty("resolvedInput")) - object.resolvedInput = message.resolvedInput; - if (message.matchType != null && message.hasOwnProperty("matchType")) - object.matchType = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.Match.MatchType[message.matchType] : message.matchType; - if (message.confidence != null && message.hasOwnProperty("confidence")) - object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence; - if (message.event != null && message.hasOwnProperty("event")) - object.event = message.event; + if (message.session != null && message.hasOwnProperty("session")) + object.session = message.session; + if (message.queryParams != null && message.hasOwnProperty("queryParams")) + object.queryParams = $root.google.cloud.dialogflow.cx.v3.QueryParameters.toObject(message.queryParams, options); + if (message.queryInput != null && message.hasOwnProperty("queryInput")) + object.queryInput = $root.google.cloud.dialogflow.cx.v3.QueryInput.toObject(message.queryInput, options); + if (message.outputAudioConfig != null && message.hasOwnProperty("outputAudioConfig")) + object.outputAudioConfig = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.toObject(message.outputAudioConfig, options); return object; }; /** - * Converts this Match to JSON. + * Converts this DetectIntentRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.Match + * @memberof google.cloud.dialogflow.cx.v3.DetectIntentRequest * @instance * @returns {Object.} JSON object */ - Match.prototype.toJSON = function toJSON() { + DetectIntentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * MatchType enum. - * @name google.cloud.dialogflow.cx.v3.Match.MatchType - * @enum {number} - * @property {number} MATCH_TYPE_UNSPECIFIED=0 MATCH_TYPE_UNSPECIFIED value - * @property {number} INTENT=1 INTENT value - * @property {number} DIRECT_INTENT=2 DIRECT_INTENT value - * @property {number} PARAMETER_FILLING=3 PARAMETER_FILLING value - * @property {number} NO_MATCH=4 NO_MATCH value - * @property {number} NO_INPUT=5 NO_INPUT value - * @property {number} EVENT=6 EVENT value - */ - Match.MatchType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MATCH_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "INTENT"] = 1; - values[valuesById[2] = "DIRECT_INTENT"] = 2; - values[valuesById[3] = "PARAMETER_FILLING"] = 3; - values[valuesById[4] = "NO_MATCH"] = 4; - values[valuesById[5] = "NO_INPUT"] = 5; - values[valuesById[6] = "EVENT"] = 6; - return values; - })(); - - return Match; + return DetectIntentRequest; })(); - v3.MatchIntentRequest = (function() { + v3.DetectIntentResponse = (function() { /** - * Properties of a MatchIntentRequest. + * Properties of a DetectIntentResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IMatchIntentRequest - * @property {string|null} [session] MatchIntentRequest session - * @property {google.cloud.dialogflow.cx.v3.IQueryParameters|null} [queryParams] MatchIntentRequest queryParams - * @property {google.cloud.dialogflow.cx.v3.IQueryInput|null} [queryInput] MatchIntentRequest queryInput + * @interface IDetectIntentResponse + * @property {string|null} [responseId] DetectIntentResponse responseId + * @property {google.cloud.dialogflow.cx.v3.IQueryResult|null} [queryResult] DetectIntentResponse queryResult + * @property {Uint8Array|null} [outputAudio] DetectIntentResponse outputAudio + * @property {google.cloud.dialogflow.cx.v3.IOutputAudioConfig|null} [outputAudioConfig] DetectIntentResponse outputAudioConfig */ /** - * Constructs a new MatchIntentRequest. + * Constructs a new DetectIntentResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a MatchIntentRequest. - * @implements IMatchIntentRequest + * @classdesc Represents a DetectIntentResponse. + * @implements IDetectIntentResponse * @constructor - * @param {google.cloud.dialogflow.cx.v3.IMatchIntentRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IDetectIntentResponse=} [properties] Properties to set */ - function MatchIntentRequest(properties) { + function DetectIntentResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -27565,101 +28108,114 @@ } /** - * MatchIntentRequest session. - * @member {string} session - * @memberof google.cloud.dialogflow.cx.v3.MatchIntentRequest + * DetectIntentResponse responseId. + * @member {string} responseId + * @memberof google.cloud.dialogflow.cx.v3.DetectIntentResponse * @instance */ - MatchIntentRequest.prototype.session = ""; + DetectIntentResponse.prototype.responseId = ""; /** - * MatchIntentRequest queryParams. - * @member {google.cloud.dialogflow.cx.v3.IQueryParameters|null|undefined} queryParams - * @memberof google.cloud.dialogflow.cx.v3.MatchIntentRequest + * DetectIntentResponse queryResult. + * @member {google.cloud.dialogflow.cx.v3.IQueryResult|null|undefined} queryResult + * @memberof google.cloud.dialogflow.cx.v3.DetectIntentResponse * @instance */ - MatchIntentRequest.prototype.queryParams = null; + DetectIntentResponse.prototype.queryResult = null; /** - * MatchIntentRequest queryInput. - * @member {google.cloud.dialogflow.cx.v3.IQueryInput|null|undefined} queryInput - * @memberof google.cloud.dialogflow.cx.v3.MatchIntentRequest + * DetectIntentResponse outputAudio. + * @member {Uint8Array} outputAudio + * @memberof google.cloud.dialogflow.cx.v3.DetectIntentResponse * @instance */ - MatchIntentRequest.prototype.queryInput = null; + DetectIntentResponse.prototype.outputAudio = $util.newBuffer([]); /** - * Creates a new MatchIntentRequest instance using the specified properties. + * DetectIntentResponse outputAudioConfig. + * @member {google.cloud.dialogflow.cx.v3.IOutputAudioConfig|null|undefined} outputAudioConfig + * @memberof google.cloud.dialogflow.cx.v3.DetectIntentResponse + * @instance + */ + DetectIntentResponse.prototype.outputAudioConfig = null; + + /** + * Creates a new DetectIntentResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.MatchIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.DetectIntentResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IMatchIntentRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.MatchIntentRequest} MatchIntentRequest instance + * @param {google.cloud.dialogflow.cx.v3.IDetectIntentResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.DetectIntentResponse} DetectIntentResponse instance */ - MatchIntentRequest.create = function create(properties) { - return new MatchIntentRequest(properties); + DetectIntentResponse.create = function create(properties) { + return new DetectIntentResponse(properties); }; /** - * Encodes the specified MatchIntentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.MatchIntentRequest.verify|verify} messages. + * Encodes the specified DetectIntentResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DetectIntentResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.MatchIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.DetectIntentResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IMatchIntentRequest} message MatchIntentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IDetectIntentResponse} message DetectIntentResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MatchIntentRequest.encode = function encode(message, writer) { + DetectIntentResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.session != null && Object.hasOwnProperty.call(message, "session")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.session); - if (message.queryParams != null && Object.hasOwnProperty.call(message, "queryParams")) - $root.google.cloud.dialogflow.cx.v3.QueryParameters.encode(message.queryParams, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.queryInput != null && Object.hasOwnProperty.call(message, "queryInput")) - $root.google.cloud.dialogflow.cx.v3.QueryInput.encode(message.queryInput, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.responseId != null && Object.hasOwnProperty.call(message, "responseId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.responseId); + if (message.queryResult != null && Object.hasOwnProperty.call(message, "queryResult")) + $root.google.cloud.dialogflow.cx.v3.QueryResult.encode(message.queryResult, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.outputAudio != null && Object.hasOwnProperty.call(message, "outputAudio")) + writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.outputAudio); + if (message.outputAudioConfig != null && Object.hasOwnProperty.call(message, "outputAudioConfig")) + $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.encode(message.outputAudioConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; /** - * Encodes the specified MatchIntentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.MatchIntentRequest.verify|verify} messages. + * Encodes the specified DetectIntentResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DetectIntentResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.MatchIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.DetectIntentResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IMatchIntentRequest} message MatchIntentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IDetectIntentResponse} message DetectIntentResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MatchIntentRequest.encodeDelimited = function encodeDelimited(message, writer) { + DetectIntentResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MatchIntentRequest message from the specified reader or buffer. + * Decodes a DetectIntentResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.MatchIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.DetectIntentResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.MatchIntentRequest} MatchIntentRequest + * @returns {google.cloud.dialogflow.cx.v3.DetectIntentResponse} DetectIntentResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MatchIntentRequest.decode = function decode(reader, length) { + DetectIntentResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.MatchIntentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.DetectIntentResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.session = reader.string(); + message.responseId = reader.string(); break; case 2: - message.queryParams = $root.google.cloud.dialogflow.cx.v3.QueryParameters.decode(reader, reader.uint32()); + message.queryResult = $root.google.cloud.dialogflow.cx.v3.QueryResult.decode(reader, reader.uint32()); break; - case 3: - message.queryInput = $root.google.cloud.dialogflow.cx.v3.QueryInput.decode(reader, reader.uint32()); + case 4: + message.outputAudio = reader.bytes(); + break; + case 5: + message.outputAudioConfig = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -27670,140 +28226,154 @@ }; /** - * Decodes a MatchIntentRequest message from the specified reader or buffer, length delimited. + * Decodes a DetectIntentResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.MatchIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.DetectIntentResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.MatchIntentRequest} MatchIntentRequest + * @returns {google.cloud.dialogflow.cx.v3.DetectIntentResponse} DetectIntentResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MatchIntentRequest.decodeDelimited = function decodeDelimited(reader) { + DetectIntentResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MatchIntentRequest message. + * Verifies a DetectIntentResponse message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.MatchIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.DetectIntentResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MatchIntentRequest.verify = function verify(message) { + DetectIntentResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.session != null && message.hasOwnProperty("session")) - if (!$util.isString(message.session)) - return "session: string expected"; - if (message.queryParams != null && message.hasOwnProperty("queryParams")) { - var error = $root.google.cloud.dialogflow.cx.v3.QueryParameters.verify(message.queryParams); + if (message.responseId != null && message.hasOwnProperty("responseId")) + if (!$util.isString(message.responseId)) + return "responseId: string expected"; + if (message.queryResult != null && message.hasOwnProperty("queryResult")) { + var error = $root.google.cloud.dialogflow.cx.v3.QueryResult.verify(message.queryResult); if (error) - return "queryParams." + error; + return "queryResult." + error; } - if (message.queryInput != null && message.hasOwnProperty("queryInput")) { - var error = $root.google.cloud.dialogflow.cx.v3.QueryInput.verify(message.queryInput); + if (message.outputAudio != null && message.hasOwnProperty("outputAudio")) + if (!(message.outputAudio && typeof message.outputAudio.length === "number" || $util.isString(message.outputAudio))) + return "outputAudio: buffer expected"; + if (message.outputAudioConfig != null && message.hasOwnProperty("outputAudioConfig")) { + var error = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.verify(message.outputAudioConfig); if (error) - return "queryInput." + error; + return "outputAudioConfig." + error; } return null; }; /** - * Creates a MatchIntentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DetectIntentResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.MatchIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.DetectIntentResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.MatchIntentRequest} MatchIntentRequest + * @returns {google.cloud.dialogflow.cx.v3.DetectIntentResponse} DetectIntentResponse */ - MatchIntentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.MatchIntentRequest) + DetectIntentResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.DetectIntentResponse) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.MatchIntentRequest(); - if (object.session != null) - message.session = String(object.session); - if (object.queryParams != null) { - if (typeof object.queryParams !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.MatchIntentRequest.queryParams: object expected"); - message.queryParams = $root.google.cloud.dialogflow.cx.v3.QueryParameters.fromObject(object.queryParams); + var message = new $root.google.cloud.dialogflow.cx.v3.DetectIntentResponse(); + if (object.responseId != null) + message.responseId = String(object.responseId); + if (object.queryResult != null) { + if (typeof object.queryResult !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.DetectIntentResponse.queryResult: object expected"); + message.queryResult = $root.google.cloud.dialogflow.cx.v3.QueryResult.fromObject(object.queryResult); } - if (object.queryInput != null) { - if (typeof object.queryInput !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.MatchIntentRequest.queryInput: object expected"); - message.queryInput = $root.google.cloud.dialogflow.cx.v3.QueryInput.fromObject(object.queryInput); + if (object.outputAudio != null) + if (typeof object.outputAudio === "string") + $util.base64.decode(object.outputAudio, message.outputAudio = $util.newBuffer($util.base64.length(object.outputAudio)), 0); + else if (object.outputAudio.length) + message.outputAudio = object.outputAudio; + if (object.outputAudioConfig != null) { + if (typeof object.outputAudioConfig !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.DetectIntentResponse.outputAudioConfig: object expected"); + message.outputAudioConfig = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.fromObject(object.outputAudioConfig); } return message; }; /** - * Creates a plain object from a MatchIntentRequest message. Also converts values to other types if specified. + * Creates a plain object from a DetectIntentResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.MatchIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.DetectIntentResponse * @static - * @param {google.cloud.dialogflow.cx.v3.MatchIntentRequest} message MatchIntentRequest + * @param {google.cloud.dialogflow.cx.v3.DetectIntentResponse} message DetectIntentResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MatchIntentRequest.toObject = function toObject(message, options) { + DetectIntentResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.session = ""; - object.queryParams = null; - object.queryInput = null; + object.responseId = ""; + object.queryResult = null; + if (options.bytes === String) + object.outputAudio = ""; + else { + object.outputAudio = []; + if (options.bytes !== Array) + object.outputAudio = $util.newBuffer(object.outputAudio); + } + object.outputAudioConfig = null; } - if (message.session != null && message.hasOwnProperty("session")) - object.session = message.session; - if (message.queryParams != null && message.hasOwnProperty("queryParams")) - object.queryParams = $root.google.cloud.dialogflow.cx.v3.QueryParameters.toObject(message.queryParams, options); - if (message.queryInput != null && message.hasOwnProperty("queryInput")) - object.queryInput = $root.google.cloud.dialogflow.cx.v3.QueryInput.toObject(message.queryInput, options); + if (message.responseId != null && message.hasOwnProperty("responseId")) + object.responseId = message.responseId; + if (message.queryResult != null && message.hasOwnProperty("queryResult")) + object.queryResult = $root.google.cloud.dialogflow.cx.v3.QueryResult.toObject(message.queryResult, options); + if (message.outputAudio != null && message.hasOwnProperty("outputAudio")) + object.outputAudio = options.bytes === String ? $util.base64.encode(message.outputAudio, 0, message.outputAudio.length) : options.bytes === Array ? Array.prototype.slice.call(message.outputAudio) : message.outputAudio; + if (message.outputAudioConfig != null && message.hasOwnProperty("outputAudioConfig")) + object.outputAudioConfig = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.toObject(message.outputAudioConfig, options); return object; }; /** - * Converts this MatchIntentRequest to JSON. + * Converts this DetectIntentResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.MatchIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.DetectIntentResponse * @instance * @returns {Object.} JSON object */ - MatchIntentRequest.prototype.toJSON = function toJSON() { + DetectIntentResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return MatchIntentRequest; + return DetectIntentResponse; })(); - v3.MatchIntentResponse = (function() { + v3.StreamingDetectIntentRequest = (function() { /** - * Properties of a MatchIntentResponse. + * Properties of a StreamingDetectIntentRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IMatchIntentResponse - * @property {string|null} [text] MatchIntentResponse text - * @property {string|null} [triggerIntent] MatchIntentResponse triggerIntent - * @property {string|null} [transcript] MatchIntentResponse transcript - * @property {string|null} [triggerEvent] MatchIntentResponse triggerEvent - * @property {Array.|null} [matches] MatchIntentResponse matches - * @property {google.cloud.dialogflow.cx.v3.IPage|null} [currentPage] MatchIntentResponse currentPage + * @interface IStreamingDetectIntentRequest + * @property {string|null} [session] StreamingDetectIntentRequest session + * @property {google.cloud.dialogflow.cx.v3.IQueryParameters|null} [queryParams] StreamingDetectIntentRequest queryParams + * @property {google.cloud.dialogflow.cx.v3.IQueryInput|null} [queryInput] StreamingDetectIntentRequest queryInput + * @property {google.cloud.dialogflow.cx.v3.IOutputAudioConfig|null} [outputAudioConfig] StreamingDetectIntentRequest outputAudioConfig */ /** - * Constructs a new MatchIntentResponse. + * Constructs a new StreamingDetectIntentRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a MatchIntentResponse. - * @implements IMatchIntentResponse + * @classdesc Represents a StreamingDetectIntentRequest. + * @implements IStreamingDetectIntentRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IMatchIntentResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IStreamingDetectIntentRequest=} [properties] Properties to set */ - function MatchIntentResponse(properties) { - this.matches = []; + function StreamingDetectIntentRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -27811,157 +28381,114 @@ } /** - * MatchIntentResponse text. - * @member {string} text - * @memberof google.cloud.dialogflow.cx.v3.MatchIntentResponse - * @instance - */ - MatchIntentResponse.prototype.text = ""; - - /** - * MatchIntentResponse triggerIntent. - * @member {string} triggerIntent - * @memberof google.cloud.dialogflow.cx.v3.MatchIntentResponse - * @instance - */ - MatchIntentResponse.prototype.triggerIntent = ""; - - /** - * MatchIntentResponse transcript. - * @member {string} transcript - * @memberof google.cloud.dialogflow.cx.v3.MatchIntentResponse - * @instance - */ - MatchIntentResponse.prototype.transcript = ""; - - /** - * MatchIntentResponse triggerEvent. - * @member {string} triggerEvent - * @memberof google.cloud.dialogflow.cx.v3.MatchIntentResponse + * StreamingDetectIntentRequest session. + * @member {string} session + * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest * @instance */ - MatchIntentResponse.prototype.triggerEvent = ""; + StreamingDetectIntentRequest.prototype.session = ""; /** - * MatchIntentResponse matches. - * @member {Array.} matches - * @memberof google.cloud.dialogflow.cx.v3.MatchIntentResponse + * StreamingDetectIntentRequest queryParams. + * @member {google.cloud.dialogflow.cx.v3.IQueryParameters|null|undefined} queryParams + * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest * @instance */ - MatchIntentResponse.prototype.matches = $util.emptyArray; + StreamingDetectIntentRequest.prototype.queryParams = null; /** - * MatchIntentResponse currentPage. - * @member {google.cloud.dialogflow.cx.v3.IPage|null|undefined} currentPage - * @memberof google.cloud.dialogflow.cx.v3.MatchIntentResponse + * StreamingDetectIntentRequest queryInput. + * @member {google.cloud.dialogflow.cx.v3.IQueryInput|null|undefined} queryInput + * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest * @instance */ - MatchIntentResponse.prototype.currentPage = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + StreamingDetectIntentRequest.prototype.queryInput = null; /** - * MatchIntentResponse query. - * @member {"text"|"triggerIntent"|"transcript"|"triggerEvent"|undefined} query - * @memberof google.cloud.dialogflow.cx.v3.MatchIntentResponse + * StreamingDetectIntentRequest outputAudioConfig. + * @member {google.cloud.dialogflow.cx.v3.IOutputAudioConfig|null|undefined} outputAudioConfig + * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest * @instance */ - Object.defineProperty(MatchIntentResponse.prototype, "query", { - get: $util.oneOfGetter($oneOfFields = ["text", "triggerIntent", "transcript", "triggerEvent"]), - set: $util.oneOfSetter($oneOfFields) - }); + StreamingDetectIntentRequest.prototype.outputAudioConfig = null; /** - * Creates a new MatchIntentResponse instance using the specified properties. + * Creates a new StreamingDetectIntentRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.MatchIntentResponse + * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IMatchIntentResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.MatchIntentResponse} MatchIntentResponse instance + * @param {google.cloud.dialogflow.cx.v3.IStreamingDetectIntentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest} StreamingDetectIntentRequest instance */ - MatchIntentResponse.create = function create(properties) { - return new MatchIntentResponse(properties); + StreamingDetectIntentRequest.create = function create(properties) { + return new StreamingDetectIntentRequest(properties); }; /** - * Encodes the specified MatchIntentResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.MatchIntentResponse.verify|verify} messages. + * Encodes the specified StreamingDetectIntentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.MatchIntentResponse + * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IMatchIntentResponse} message MatchIntentResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IStreamingDetectIntentRequest} message StreamingDetectIntentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MatchIntentResponse.encode = function encode(message, writer) { + StreamingDetectIntentRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.text != null && Object.hasOwnProperty.call(message, "text")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.text); - if (message.triggerIntent != null && Object.hasOwnProperty.call(message, "triggerIntent")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.triggerIntent); - if (message.transcript != null && Object.hasOwnProperty.call(message, "transcript")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.transcript); - if (message.matches != null && message.matches.length) - for (var i = 0; i < message.matches.length; ++i) - $root.google.cloud.dialogflow.cx.v3.Match.encode(message.matches[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.currentPage != null && Object.hasOwnProperty.call(message, "currentPage")) - $root.google.cloud.dialogflow.cx.v3.Page.encode(message.currentPage, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.triggerEvent != null && Object.hasOwnProperty.call(message, "triggerEvent")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.triggerEvent); + if (message.session != null && Object.hasOwnProperty.call(message, "session")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.session); + if (message.queryParams != null && Object.hasOwnProperty.call(message, "queryParams")) + $root.google.cloud.dialogflow.cx.v3.QueryParameters.encode(message.queryParams, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.queryInput != null && Object.hasOwnProperty.call(message, "queryInput")) + $root.google.cloud.dialogflow.cx.v3.QueryInput.encode(message.queryInput, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.outputAudioConfig != null && Object.hasOwnProperty.call(message, "outputAudioConfig")) + $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.encode(message.outputAudioConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified MatchIntentResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.MatchIntentResponse.verify|verify} messages. + * Encodes the specified StreamingDetectIntentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.MatchIntentResponse + * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IMatchIntentResponse} message MatchIntentResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IStreamingDetectIntentRequest} message StreamingDetectIntentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MatchIntentResponse.encodeDelimited = function encodeDelimited(message, writer) { + StreamingDetectIntentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MatchIntentResponse message from the specified reader or buffer. + * Decodes a StreamingDetectIntentRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.MatchIntentResponse + * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.MatchIntentResponse} MatchIntentResponse + * @returns {google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest} StreamingDetectIntentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MatchIntentResponse.decode = function decode(reader, length) { + StreamingDetectIntentRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.MatchIntentResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.text = reader.string(); + message.session = reader.string(); break; case 2: - message.triggerIntent = reader.string(); + message.queryParams = $root.google.cloud.dialogflow.cx.v3.QueryParameters.decode(reader, reader.uint32()); break; case 3: - message.transcript = reader.string(); - break; - case 6: - message.triggerEvent = reader.string(); + message.queryInput = $root.google.cloud.dialogflow.cx.v3.QueryInput.decode(reader, reader.uint32()); break; case 4: - if (!(message.matches && message.matches.length)) - message.matches = []; - message.matches.push($root.google.cloud.dialogflow.cx.v3.Match.decode(reader, reader.uint32())); - break; - case 5: - message.currentPage = $root.google.cloud.dialogflow.cx.v3.Page.decode(reader, reader.uint32()); + message.outputAudioConfig = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -27972,195 +28499,148 @@ }; /** - * Decodes a MatchIntentResponse message from the specified reader or buffer, length delimited. + * Decodes a StreamingDetectIntentRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.MatchIntentResponse + * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.MatchIntentResponse} MatchIntentResponse + * @returns {google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest} StreamingDetectIntentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MatchIntentResponse.decodeDelimited = function decodeDelimited(reader) { + StreamingDetectIntentRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MatchIntentResponse message. + * Verifies a StreamingDetectIntentRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.MatchIntentResponse + * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MatchIntentResponse.verify = function verify(message) { + StreamingDetectIntentRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.text != null && message.hasOwnProperty("text")) { - properties.query = 1; - if (!$util.isString(message.text)) - return "text: string expected"; - } - if (message.triggerIntent != null && message.hasOwnProperty("triggerIntent")) { - if (properties.query === 1) - return "query: multiple values"; - properties.query = 1; - if (!$util.isString(message.triggerIntent)) - return "triggerIntent: string expected"; - } - if (message.transcript != null && message.hasOwnProperty("transcript")) { - if (properties.query === 1) - return "query: multiple values"; - properties.query = 1; - if (!$util.isString(message.transcript)) - return "transcript: string expected"; - } - if (message.triggerEvent != null && message.hasOwnProperty("triggerEvent")) { - if (properties.query === 1) - return "query: multiple values"; - properties.query = 1; - if (!$util.isString(message.triggerEvent)) - return "triggerEvent: string expected"; + if (message.session != null && message.hasOwnProperty("session")) + if (!$util.isString(message.session)) + return "session: string expected"; + if (message.queryParams != null && message.hasOwnProperty("queryParams")) { + var error = $root.google.cloud.dialogflow.cx.v3.QueryParameters.verify(message.queryParams); + if (error) + return "queryParams." + error; } - if (message.matches != null && message.hasOwnProperty("matches")) { - if (!Array.isArray(message.matches)) - return "matches: array expected"; - for (var i = 0; i < message.matches.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.Match.verify(message.matches[i]); - if (error) - return "matches." + error; - } + if (message.queryInput != null && message.hasOwnProperty("queryInput")) { + var error = $root.google.cloud.dialogflow.cx.v3.QueryInput.verify(message.queryInput); + if (error) + return "queryInput." + error; } - if (message.currentPage != null && message.hasOwnProperty("currentPage")) { - var error = $root.google.cloud.dialogflow.cx.v3.Page.verify(message.currentPage); + if (message.outputAudioConfig != null && message.hasOwnProperty("outputAudioConfig")) { + var error = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.verify(message.outputAudioConfig); if (error) - return "currentPage." + error; + return "outputAudioConfig." + error; } return null; }; /** - * Creates a MatchIntentResponse message from a plain object. Also converts values to their respective internal types. + * Creates a StreamingDetectIntentRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.MatchIntentResponse + * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.MatchIntentResponse} MatchIntentResponse + * @returns {google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest} StreamingDetectIntentRequest */ - MatchIntentResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.MatchIntentResponse) + StreamingDetectIntentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.MatchIntentResponse(); - if (object.text != null) - message.text = String(object.text); - if (object.triggerIntent != null) - message.triggerIntent = String(object.triggerIntent); - if (object.transcript != null) - message.transcript = String(object.transcript); - if (object.triggerEvent != null) - message.triggerEvent = String(object.triggerEvent); - if (object.matches) { - if (!Array.isArray(object.matches)) - throw TypeError(".google.cloud.dialogflow.cx.v3.MatchIntentResponse.matches: array expected"); - message.matches = []; - for (var i = 0; i < object.matches.length; ++i) { - if (typeof object.matches[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.MatchIntentResponse.matches: object expected"); - message.matches[i] = $root.google.cloud.dialogflow.cx.v3.Match.fromObject(object.matches[i]); - } + var message = new $root.google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest(); + if (object.session != null) + message.session = String(object.session); + if (object.queryParams != null) { + if (typeof object.queryParams !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest.queryParams: object expected"); + message.queryParams = $root.google.cloud.dialogflow.cx.v3.QueryParameters.fromObject(object.queryParams); } - if (object.currentPage != null) { - if (typeof object.currentPage !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.MatchIntentResponse.currentPage: object expected"); - message.currentPage = $root.google.cloud.dialogflow.cx.v3.Page.fromObject(object.currentPage); + if (object.queryInput != null) { + if (typeof object.queryInput !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest.queryInput: object expected"); + message.queryInput = $root.google.cloud.dialogflow.cx.v3.QueryInput.fromObject(object.queryInput); + } + if (object.outputAudioConfig != null) { + if (typeof object.outputAudioConfig !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest.outputAudioConfig: object expected"); + message.outputAudioConfig = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.fromObject(object.outputAudioConfig); } return message; }; /** - * Creates a plain object from a MatchIntentResponse message. Also converts values to other types if specified. + * Creates a plain object from a StreamingDetectIntentRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.MatchIntentResponse + * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.MatchIntentResponse} message MatchIntentResponse + * @param {google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest} message StreamingDetectIntentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MatchIntentResponse.toObject = function toObject(message, options) { + StreamingDetectIntentRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.matches = []; - if (options.defaults) - object.currentPage = null; - if (message.text != null && message.hasOwnProperty("text")) { - object.text = message.text; - if (options.oneofs) - object.query = "text"; - } - if (message.triggerIntent != null && message.hasOwnProperty("triggerIntent")) { - object.triggerIntent = message.triggerIntent; - if (options.oneofs) - object.query = "triggerIntent"; - } - if (message.transcript != null && message.hasOwnProperty("transcript")) { - object.transcript = message.transcript; - if (options.oneofs) - object.query = "transcript"; - } - if (message.matches && message.matches.length) { - object.matches = []; - for (var j = 0; j < message.matches.length; ++j) - object.matches[j] = $root.google.cloud.dialogflow.cx.v3.Match.toObject(message.matches[j], options); - } - if (message.currentPage != null && message.hasOwnProperty("currentPage")) - object.currentPage = $root.google.cloud.dialogflow.cx.v3.Page.toObject(message.currentPage, options); - if (message.triggerEvent != null && message.hasOwnProperty("triggerEvent")) { - object.triggerEvent = message.triggerEvent; - if (options.oneofs) - object.query = "triggerEvent"; + if (options.defaults) { + object.session = ""; + object.queryParams = null; + object.queryInput = null; + object.outputAudioConfig = null; } + if (message.session != null && message.hasOwnProperty("session")) + object.session = message.session; + if (message.queryParams != null && message.hasOwnProperty("queryParams")) + object.queryParams = $root.google.cloud.dialogflow.cx.v3.QueryParameters.toObject(message.queryParams, options); + if (message.queryInput != null && message.hasOwnProperty("queryInput")) + object.queryInput = $root.google.cloud.dialogflow.cx.v3.QueryInput.toObject(message.queryInput, options); + if (message.outputAudioConfig != null && message.hasOwnProperty("outputAudioConfig")) + object.outputAudioConfig = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.toObject(message.outputAudioConfig, options); return object; }; /** - * Converts this MatchIntentResponse to JSON. + * Converts this StreamingDetectIntentRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.MatchIntentResponse + * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest * @instance * @returns {Object.} JSON object */ - MatchIntentResponse.prototype.toJSON = function toJSON() { + StreamingDetectIntentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return MatchIntentResponse; + return StreamingDetectIntentRequest; })(); - v3.FulfillIntentRequest = (function() { + v3.StreamingDetectIntentResponse = (function() { /** - * Properties of a FulfillIntentRequest. + * Properties of a StreamingDetectIntentResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IFulfillIntentRequest - * @property {google.cloud.dialogflow.cx.v3.IMatchIntentRequest|null} [matchIntentRequest] FulfillIntentRequest matchIntentRequest - * @property {google.cloud.dialogflow.cx.v3.IMatch|null} [match] FulfillIntentRequest match - * @property {google.cloud.dialogflow.cx.v3.IOutputAudioConfig|null} [outputAudioConfig] FulfillIntentRequest outputAudioConfig + * @interface IStreamingDetectIntentResponse + * @property {google.cloud.dialogflow.cx.v3.IStreamingRecognitionResult|null} [recognitionResult] StreamingDetectIntentResponse recognitionResult + * @property {google.cloud.dialogflow.cx.v3.IDetectIntentResponse|null} [detectIntentResponse] StreamingDetectIntentResponse detectIntentResponse */ /** - * Constructs a new FulfillIntentRequest. + * Constructs a new StreamingDetectIntentResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a FulfillIntentRequest. - * @implements IFulfillIntentRequest + * @classdesc Represents a StreamingDetectIntentResponse. + * @implements IStreamingDetectIntentResponse * @constructor - * @param {google.cloud.dialogflow.cx.v3.IFulfillIntentRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IStreamingDetectIntentResponse=} [properties] Properties to set */ - function FulfillIntentRequest(properties) { + function StreamingDetectIntentResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -28168,101 +28648,102 @@ } /** - * FulfillIntentRequest matchIntentRequest. - * @member {google.cloud.dialogflow.cx.v3.IMatchIntentRequest|null|undefined} matchIntentRequest - * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentRequest + * StreamingDetectIntentResponse recognitionResult. + * @member {google.cloud.dialogflow.cx.v3.IStreamingRecognitionResult|null|undefined} recognitionResult + * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse * @instance */ - FulfillIntentRequest.prototype.matchIntentRequest = null; + StreamingDetectIntentResponse.prototype.recognitionResult = null; /** - * FulfillIntentRequest match. - * @member {google.cloud.dialogflow.cx.v3.IMatch|null|undefined} match - * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentRequest + * StreamingDetectIntentResponse detectIntentResponse. + * @member {google.cloud.dialogflow.cx.v3.IDetectIntentResponse|null|undefined} detectIntentResponse + * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse * @instance */ - FulfillIntentRequest.prototype.match = null; + StreamingDetectIntentResponse.prototype.detectIntentResponse = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * FulfillIntentRequest outputAudioConfig. - * @member {google.cloud.dialogflow.cx.v3.IOutputAudioConfig|null|undefined} outputAudioConfig - * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentRequest + * StreamingDetectIntentResponse response. + * @member {"recognitionResult"|"detectIntentResponse"|undefined} response + * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse * @instance */ - FulfillIntentRequest.prototype.outputAudioConfig = null; + Object.defineProperty(StreamingDetectIntentResponse.prototype, "response", { + get: $util.oneOfGetter($oneOfFields = ["recognitionResult", "detectIntentResponse"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new FulfillIntentRequest instance using the specified properties. + * Creates a new StreamingDetectIntentResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IFulfillIntentRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.FulfillIntentRequest} FulfillIntentRequest instance + * @param {google.cloud.dialogflow.cx.v3.IStreamingDetectIntentResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse} StreamingDetectIntentResponse instance */ - FulfillIntentRequest.create = function create(properties) { - return new FulfillIntentRequest(properties); + StreamingDetectIntentResponse.create = function create(properties) { + return new StreamingDetectIntentResponse(properties); }; /** - * Encodes the specified FulfillIntentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.FulfillIntentRequest.verify|verify} messages. + * Encodes the specified StreamingDetectIntentResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IFulfillIntentRequest} message FulfillIntentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IStreamingDetectIntentResponse} message StreamingDetectIntentResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FulfillIntentRequest.encode = function encode(message, writer) { + StreamingDetectIntentResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.matchIntentRequest != null && Object.hasOwnProperty.call(message, "matchIntentRequest")) - $root.google.cloud.dialogflow.cx.v3.MatchIntentRequest.encode(message.matchIntentRequest, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.match != null && Object.hasOwnProperty.call(message, "match")) - $root.google.cloud.dialogflow.cx.v3.Match.encode(message.match, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.outputAudioConfig != null && Object.hasOwnProperty.call(message, "outputAudioConfig")) - $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.encode(message.outputAudioConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.recognitionResult != null && Object.hasOwnProperty.call(message, "recognitionResult")) + $root.google.cloud.dialogflow.cx.v3.StreamingRecognitionResult.encode(message.recognitionResult, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.detectIntentResponse != null && Object.hasOwnProperty.call(message, "detectIntentResponse")) + $root.google.cloud.dialogflow.cx.v3.DetectIntentResponse.encode(message.detectIntentResponse, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified FulfillIntentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.FulfillIntentRequest.verify|verify} messages. + * Encodes the specified StreamingDetectIntentResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IFulfillIntentRequest} message FulfillIntentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IStreamingDetectIntentResponse} message StreamingDetectIntentResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FulfillIntentRequest.encodeDelimited = function encodeDelimited(message, writer) { + StreamingDetectIntentResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FulfillIntentRequest message from the specified reader or buffer. + * Decodes a StreamingDetectIntentResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.FulfillIntentRequest} FulfillIntentRequest + * @returns {google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse} StreamingDetectIntentResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FulfillIntentRequest.decode = function decode(reader, length) { + StreamingDetectIntentResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.FulfillIntentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.matchIntentRequest = $root.google.cloud.dialogflow.cx.v3.MatchIntentRequest.decode(reader, reader.uint32()); + message.recognitionResult = $root.google.cloud.dialogflow.cx.v3.StreamingRecognitionResult.decode(reader, reader.uint32()); break; case 2: - message.match = $root.google.cloud.dialogflow.cx.v3.Match.decode(reader, reader.uint32()); - break; - case 3: - message.outputAudioConfig = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.decode(reader, reader.uint32()); + message.detectIntentResponse = $root.google.cloud.dialogflow.cx.v3.DetectIntentResponse.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -28273,142 +28754,144 @@ }; /** - * Decodes a FulfillIntentRequest message from the specified reader or buffer, length delimited. + * Decodes a StreamingDetectIntentResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.FulfillIntentRequest} FulfillIntentRequest + * @returns {google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse} StreamingDetectIntentResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FulfillIntentRequest.decodeDelimited = function decodeDelimited(reader) { + StreamingDetectIntentResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FulfillIntentRequest message. + * Verifies a StreamingDetectIntentResponse message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FulfillIntentRequest.verify = function verify(message) { + StreamingDetectIntentResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.matchIntentRequest != null && message.hasOwnProperty("matchIntentRequest")) { - var error = $root.google.cloud.dialogflow.cx.v3.MatchIntentRequest.verify(message.matchIntentRequest); - if (error) - return "matchIntentRequest." + error; - } - if (message.match != null && message.hasOwnProperty("match")) { - var error = $root.google.cloud.dialogflow.cx.v3.Match.verify(message.match); - if (error) - return "match." + error; + var properties = {}; + if (message.recognitionResult != null && message.hasOwnProperty("recognitionResult")) { + properties.response = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3.StreamingRecognitionResult.verify(message.recognitionResult); + if (error) + return "recognitionResult." + error; + } } - if (message.outputAudioConfig != null && message.hasOwnProperty("outputAudioConfig")) { - var error = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.verify(message.outputAudioConfig); - if (error) - return "outputAudioConfig." + error; + if (message.detectIntentResponse != null && message.hasOwnProperty("detectIntentResponse")) { + if (properties.response === 1) + return "response: multiple values"; + properties.response = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3.DetectIntentResponse.verify(message.detectIntentResponse); + if (error) + return "detectIntentResponse." + error; + } } return null; }; /** - * Creates a FulfillIntentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a StreamingDetectIntentResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.FulfillIntentRequest} FulfillIntentRequest + * @returns {google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse} StreamingDetectIntentResponse */ - FulfillIntentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.FulfillIntentRequest) + StreamingDetectIntentResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.FulfillIntentRequest(); - if (object.matchIntentRequest != null) { - if (typeof object.matchIntentRequest !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.FulfillIntentRequest.matchIntentRequest: object expected"); - message.matchIntentRequest = $root.google.cloud.dialogflow.cx.v3.MatchIntentRequest.fromObject(object.matchIntentRequest); - } - if (object.match != null) { - if (typeof object.match !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.FulfillIntentRequest.match: object expected"); - message.match = $root.google.cloud.dialogflow.cx.v3.Match.fromObject(object.match); + var message = new $root.google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse(); + if (object.recognitionResult != null) { + if (typeof object.recognitionResult !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse.recognitionResult: object expected"); + message.recognitionResult = $root.google.cloud.dialogflow.cx.v3.StreamingRecognitionResult.fromObject(object.recognitionResult); } - if (object.outputAudioConfig != null) { - if (typeof object.outputAudioConfig !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.FulfillIntentRequest.outputAudioConfig: object expected"); - message.outputAudioConfig = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.fromObject(object.outputAudioConfig); + if (object.detectIntentResponse != null) { + if (typeof object.detectIntentResponse !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse.detectIntentResponse: object expected"); + message.detectIntentResponse = $root.google.cloud.dialogflow.cx.v3.DetectIntentResponse.fromObject(object.detectIntentResponse); } return message; }; /** - * Creates a plain object from a FulfillIntentRequest message. Also converts values to other types if specified. + * Creates a plain object from a StreamingDetectIntentResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse * @static - * @param {google.cloud.dialogflow.cx.v3.FulfillIntentRequest} message FulfillIntentRequest + * @param {google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse} message StreamingDetectIntentResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FulfillIntentRequest.toObject = function toObject(message, options) { + StreamingDetectIntentResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.matchIntentRequest = null; - object.match = null; - object.outputAudioConfig = null; + if (message.recognitionResult != null && message.hasOwnProperty("recognitionResult")) { + object.recognitionResult = $root.google.cloud.dialogflow.cx.v3.StreamingRecognitionResult.toObject(message.recognitionResult, options); + if (options.oneofs) + object.response = "recognitionResult"; + } + if (message.detectIntentResponse != null && message.hasOwnProperty("detectIntentResponse")) { + object.detectIntentResponse = $root.google.cloud.dialogflow.cx.v3.DetectIntentResponse.toObject(message.detectIntentResponse, options); + if (options.oneofs) + object.response = "detectIntentResponse"; } - if (message.matchIntentRequest != null && message.hasOwnProperty("matchIntentRequest")) - object.matchIntentRequest = $root.google.cloud.dialogflow.cx.v3.MatchIntentRequest.toObject(message.matchIntentRequest, options); - if (message.match != null && message.hasOwnProperty("match")) - object.match = $root.google.cloud.dialogflow.cx.v3.Match.toObject(message.match, options); - if (message.outputAudioConfig != null && message.hasOwnProperty("outputAudioConfig")) - object.outputAudioConfig = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.toObject(message.outputAudioConfig, options); return object; }; /** - * Converts this FulfillIntentRequest to JSON. + * Converts this StreamingDetectIntentResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse * @instance * @returns {Object.} JSON object */ - FulfillIntentRequest.prototype.toJSON = function toJSON() { + StreamingDetectIntentResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return FulfillIntentRequest; + return StreamingDetectIntentResponse; })(); - v3.FulfillIntentResponse = (function() { + v3.StreamingRecognitionResult = (function() { /** - * Properties of a FulfillIntentResponse. + * Properties of a StreamingRecognitionResult. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IFulfillIntentResponse - * @property {string|null} [responseId] FulfillIntentResponse responseId - * @property {google.cloud.dialogflow.cx.v3.IQueryResult|null} [queryResult] FulfillIntentResponse queryResult - * @property {Uint8Array|null} [outputAudio] FulfillIntentResponse outputAudio - * @property {google.cloud.dialogflow.cx.v3.IOutputAudioConfig|null} [outputAudioConfig] FulfillIntentResponse outputAudioConfig + * @interface IStreamingRecognitionResult + * @property {google.cloud.dialogflow.cx.v3.StreamingRecognitionResult.MessageType|null} [messageType] StreamingRecognitionResult messageType + * @property {string|null} [transcript] StreamingRecognitionResult transcript + * @property {boolean|null} [isFinal] StreamingRecognitionResult isFinal + * @property {number|null} [confidence] StreamingRecognitionResult confidence + * @property {number|null} [stability] StreamingRecognitionResult stability + * @property {Array.|null} [speechWordInfo] StreamingRecognitionResult speechWordInfo + * @property {google.protobuf.IDuration|null} [speechEndOffset] StreamingRecognitionResult speechEndOffset */ /** - * Constructs a new FulfillIntentResponse. + * Constructs a new StreamingRecognitionResult. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a FulfillIntentResponse. - * @implements IFulfillIntentResponse + * @classdesc Represents a StreamingRecognitionResult. + * @implements IStreamingRecognitionResult * @constructor - * @param {google.cloud.dialogflow.cx.v3.IFulfillIntentResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IStreamingRecognitionResult=} [properties] Properties to set */ - function FulfillIntentResponse(properties) { + function StreamingRecognitionResult(properties) { + this.speechWordInfo = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -28416,114 +28899,156 @@ } /** - * FulfillIntentResponse responseId. - * @member {string} responseId - * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentResponse + * StreamingRecognitionResult messageType. + * @member {google.cloud.dialogflow.cx.v3.StreamingRecognitionResult.MessageType} messageType + * @memberof google.cloud.dialogflow.cx.v3.StreamingRecognitionResult * @instance */ - FulfillIntentResponse.prototype.responseId = ""; + StreamingRecognitionResult.prototype.messageType = 0; /** - * FulfillIntentResponse queryResult. - * @member {google.cloud.dialogflow.cx.v3.IQueryResult|null|undefined} queryResult - * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentResponse + * StreamingRecognitionResult transcript. + * @member {string} transcript + * @memberof google.cloud.dialogflow.cx.v3.StreamingRecognitionResult * @instance */ - FulfillIntentResponse.prototype.queryResult = null; + StreamingRecognitionResult.prototype.transcript = ""; /** - * FulfillIntentResponse outputAudio. - * @member {Uint8Array} outputAudio - * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentResponse + * StreamingRecognitionResult isFinal. + * @member {boolean} isFinal + * @memberof google.cloud.dialogflow.cx.v3.StreamingRecognitionResult * @instance */ - FulfillIntentResponse.prototype.outputAudio = $util.newBuffer([]); + StreamingRecognitionResult.prototype.isFinal = false; /** - * FulfillIntentResponse outputAudioConfig. - * @member {google.cloud.dialogflow.cx.v3.IOutputAudioConfig|null|undefined} outputAudioConfig - * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentResponse + * StreamingRecognitionResult confidence. + * @member {number} confidence + * @memberof google.cloud.dialogflow.cx.v3.StreamingRecognitionResult * @instance */ - FulfillIntentResponse.prototype.outputAudioConfig = null; + StreamingRecognitionResult.prototype.confidence = 0; /** - * Creates a new FulfillIntentResponse instance using the specified properties. + * StreamingRecognitionResult stability. + * @member {number} stability + * @memberof google.cloud.dialogflow.cx.v3.StreamingRecognitionResult + * @instance + */ + StreamingRecognitionResult.prototype.stability = 0; + + /** + * StreamingRecognitionResult speechWordInfo. + * @member {Array.} speechWordInfo + * @memberof google.cloud.dialogflow.cx.v3.StreamingRecognitionResult + * @instance + */ + StreamingRecognitionResult.prototype.speechWordInfo = $util.emptyArray; + + /** + * StreamingRecognitionResult speechEndOffset. + * @member {google.protobuf.IDuration|null|undefined} speechEndOffset + * @memberof google.cloud.dialogflow.cx.v3.StreamingRecognitionResult + * @instance + */ + StreamingRecognitionResult.prototype.speechEndOffset = null; + + /** + * Creates a new StreamingRecognitionResult instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentResponse + * @memberof google.cloud.dialogflow.cx.v3.StreamingRecognitionResult * @static - * @param {google.cloud.dialogflow.cx.v3.IFulfillIntentResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.FulfillIntentResponse} FulfillIntentResponse instance + * @param {google.cloud.dialogflow.cx.v3.IStreamingRecognitionResult=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.StreamingRecognitionResult} StreamingRecognitionResult instance */ - FulfillIntentResponse.create = function create(properties) { - return new FulfillIntentResponse(properties); + StreamingRecognitionResult.create = function create(properties) { + return new StreamingRecognitionResult(properties); }; /** - * Encodes the specified FulfillIntentResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.FulfillIntentResponse.verify|verify} messages. + * Encodes the specified StreamingRecognitionResult message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.StreamingRecognitionResult.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentResponse + * @memberof google.cloud.dialogflow.cx.v3.StreamingRecognitionResult * @static - * @param {google.cloud.dialogflow.cx.v3.IFulfillIntentResponse} message FulfillIntentResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IStreamingRecognitionResult} message StreamingRecognitionResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FulfillIntentResponse.encode = function encode(message, writer) { + StreamingRecognitionResult.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.responseId != null && Object.hasOwnProperty.call(message, "responseId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.responseId); - if (message.queryResult != null && Object.hasOwnProperty.call(message, "queryResult")) - $root.google.cloud.dialogflow.cx.v3.QueryResult.encode(message.queryResult, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.outputAudio != null && Object.hasOwnProperty.call(message, "outputAudio")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.outputAudio); - if (message.outputAudioConfig != null && Object.hasOwnProperty.call(message, "outputAudioConfig")) - $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.encode(message.outputAudioConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.messageType != null && Object.hasOwnProperty.call(message, "messageType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.messageType); + if (message.transcript != null && Object.hasOwnProperty.call(message, "transcript")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.transcript); + if (message.isFinal != null && Object.hasOwnProperty.call(message, "isFinal")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.isFinal); + if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) + writer.uint32(/* id 4, wireType 5 =*/37).float(message.confidence); + if (message.stability != null && Object.hasOwnProperty.call(message, "stability")) + writer.uint32(/* id 6, wireType 5 =*/53).float(message.stability); + if (message.speechWordInfo != null && message.speechWordInfo.length) + for (var i = 0; i < message.speechWordInfo.length; ++i) + $root.google.cloud.dialogflow.cx.v3.SpeechWordInfo.encode(message.speechWordInfo[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.speechEndOffset != null && Object.hasOwnProperty.call(message, "speechEndOffset")) + $root.google.protobuf.Duration.encode(message.speechEndOffset, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); return writer; }; /** - * Encodes the specified FulfillIntentResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.FulfillIntentResponse.verify|verify} messages. + * Encodes the specified StreamingRecognitionResult message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.StreamingRecognitionResult.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentResponse + * @memberof google.cloud.dialogflow.cx.v3.StreamingRecognitionResult * @static - * @param {google.cloud.dialogflow.cx.v3.IFulfillIntentResponse} message FulfillIntentResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IStreamingRecognitionResult} message StreamingRecognitionResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FulfillIntentResponse.encodeDelimited = function encodeDelimited(message, writer) { + StreamingRecognitionResult.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FulfillIntentResponse message from the specified reader or buffer. + * Decodes a StreamingRecognitionResult message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentResponse + * @memberof google.cloud.dialogflow.cx.v3.StreamingRecognitionResult * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.FulfillIntentResponse} FulfillIntentResponse + * @returns {google.cloud.dialogflow.cx.v3.StreamingRecognitionResult} StreamingRecognitionResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FulfillIntentResponse.decode = function decode(reader, length) { + StreamingRecognitionResult.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.FulfillIntentResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.StreamingRecognitionResult(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.responseId = reader.string(); + message.messageType = reader.int32(); break; case 2: - message.queryResult = $root.google.cloud.dialogflow.cx.v3.QueryResult.decode(reader, reader.uint32()); + message.transcript = reader.string(); break; case 3: - message.outputAudio = reader.bytes(); + message.isFinal = reader.bool(); break; case 4: - message.outputAudioConfig = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.decode(reader, reader.uint32()); + message.confidence = reader.float(); + break; + case 6: + message.stability = reader.float(); + break; + case 7: + if (!(message.speechWordInfo && message.speechWordInfo.length)) + message.speechWordInfo = []; + message.speechWordInfo.push($root.google.cloud.dialogflow.cx.v3.SpeechWordInfo.decode(reader, reader.uint32())); + break; + case 8: + message.speechEndOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -28534,152 +29059,221 @@ }; /** - * Decodes a FulfillIntentResponse message from the specified reader or buffer, length delimited. + * Decodes a StreamingRecognitionResult message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentResponse + * @memberof google.cloud.dialogflow.cx.v3.StreamingRecognitionResult * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.FulfillIntentResponse} FulfillIntentResponse + * @returns {google.cloud.dialogflow.cx.v3.StreamingRecognitionResult} StreamingRecognitionResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FulfillIntentResponse.decodeDelimited = function decodeDelimited(reader) { + StreamingRecognitionResult.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FulfillIntentResponse message. + * Verifies a StreamingRecognitionResult message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentResponse + * @memberof google.cloud.dialogflow.cx.v3.StreamingRecognitionResult * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FulfillIntentResponse.verify = function verify(message) { + StreamingRecognitionResult.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.responseId != null && message.hasOwnProperty("responseId")) - if (!$util.isString(message.responseId)) - return "responseId: string expected"; - if (message.queryResult != null && message.hasOwnProperty("queryResult")) { - var error = $root.google.cloud.dialogflow.cx.v3.QueryResult.verify(message.queryResult); - if (error) - return "queryResult." + error; - } - if (message.outputAudio != null && message.hasOwnProperty("outputAudio")) - if (!(message.outputAudio && typeof message.outputAudio.length === "number" || $util.isString(message.outputAudio))) - return "outputAudio: buffer expected"; - if (message.outputAudioConfig != null && message.hasOwnProperty("outputAudioConfig")) { - var error = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.verify(message.outputAudioConfig); - if (error) - return "outputAudioConfig." + error; - } - return null; - }; - - /** - * Creates a FulfillIntentResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.FulfillIntentResponse} FulfillIntentResponse - */ - FulfillIntentResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.FulfillIntentResponse) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.FulfillIntentResponse(); - if (object.responseId != null) - message.responseId = String(object.responseId); - if (object.queryResult != null) { - if (typeof object.queryResult !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.FulfillIntentResponse.queryResult: object expected"); - message.queryResult = $root.google.cloud.dialogflow.cx.v3.QueryResult.fromObject(object.queryResult); + if (message.messageType != null && message.hasOwnProperty("messageType")) + switch (message.messageType) { + default: + return "messageType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.transcript != null && message.hasOwnProperty("transcript")) + if (!$util.isString(message.transcript)) + return "transcript: string expected"; + if (message.isFinal != null && message.hasOwnProperty("isFinal")) + if (typeof message.isFinal !== "boolean") + return "isFinal: boolean expected"; + if (message.confidence != null && message.hasOwnProperty("confidence")) + if (typeof message.confidence !== "number") + return "confidence: number expected"; + if (message.stability != null && message.hasOwnProperty("stability")) + if (typeof message.stability !== "number") + return "stability: number expected"; + if (message.speechWordInfo != null && message.hasOwnProperty("speechWordInfo")) { + if (!Array.isArray(message.speechWordInfo)) + return "speechWordInfo: array expected"; + for (var i = 0; i < message.speechWordInfo.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.SpeechWordInfo.verify(message.speechWordInfo[i]); + if (error) + return "speechWordInfo." + error; + } } - if (object.outputAudio != null) - if (typeof object.outputAudio === "string") - $util.base64.decode(object.outputAudio, message.outputAudio = $util.newBuffer($util.base64.length(object.outputAudio)), 0); - else if (object.outputAudio.length) - message.outputAudio = object.outputAudio; - if (object.outputAudioConfig != null) { - if (typeof object.outputAudioConfig !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.FulfillIntentResponse.outputAudioConfig: object expected"); - message.outputAudioConfig = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.fromObject(object.outputAudioConfig); + if (message.speechEndOffset != null && message.hasOwnProperty("speechEndOffset")) { + var error = $root.google.protobuf.Duration.verify(message.speechEndOffset); + if (error) + return "speechEndOffset." + error; + } + return null; + }; + + /** + * Creates a StreamingRecognitionResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.StreamingRecognitionResult + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.StreamingRecognitionResult} StreamingRecognitionResult + */ + StreamingRecognitionResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.StreamingRecognitionResult) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.StreamingRecognitionResult(); + switch (object.messageType) { + case "MESSAGE_TYPE_UNSPECIFIED": + case 0: + message.messageType = 0; + break; + case "TRANSCRIPT": + case 1: + message.messageType = 1; + break; + case "END_OF_SINGLE_UTTERANCE": + case 2: + message.messageType = 2; + break; + } + if (object.transcript != null) + message.transcript = String(object.transcript); + if (object.isFinal != null) + message.isFinal = Boolean(object.isFinal); + if (object.confidence != null) + message.confidence = Number(object.confidence); + if (object.stability != null) + message.stability = Number(object.stability); + if (object.speechWordInfo) { + if (!Array.isArray(object.speechWordInfo)) + throw TypeError(".google.cloud.dialogflow.cx.v3.StreamingRecognitionResult.speechWordInfo: array expected"); + message.speechWordInfo = []; + for (var i = 0; i < object.speechWordInfo.length; ++i) { + if (typeof object.speechWordInfo[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.StreamingRecognitionResult.speechWordInfo: object expected"); + message.speechWordInfo[i] = $root.google.cloud.dialogflow.cx.v3.SpeechWordInfo.fromObject(object.speechWordInfo[i]); + } + } + if (object.speechEndOffset != null) { + if (typeof object.speechEndOffset !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.StreamingRecognitionResult.speechEndOffset: object expected"); + message.speechEndOffset = $root.google.protobuf.Duration.fromObject(object.speechEndOffset); } return message; }; /** - * Creates a plain object from a FulfillIntentResponse message. Also converts values to other types if specified. + * Creates a plain object from a StreamingRecognitionResult message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentResponse + * @memberof google.cloud.dialogflow.cx.v3.StreamingRecognitionResult * @static - * @param {google.cloud.dialogflow.cx.v3.FulfillIntentResponse} message FulfillIntentResponse + * @param {google.cloud.dialogflow.cx.v3.StreamingRecognitionResult} message StreamingRecognitionResult * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FulfillIntentResponse.toObject = function toObject(message, options) { + StreamingRecognitionResult.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.speechWordInfo = []; if (options.defaults) { - object.responseId = ""; - object.queryResult = null; - if (options.bytes === String) - object.outputAudio = ""; - else { - object.outputAudio = []; - if (options.bytes !== Array) - object.outputAudio = $util.newBuffer(object.outputAudio); - } - object.outputAudioConfig = null; + object.messageType = options.enums === String ? "MESSAGE_TYPE_UNSPECIFIED" : 0; + object.transcript = ""; + object.isFinal = false; + object.confidence = 0; + object.stability = 0; + object.speechEndOffset = null; } - if (message.responseId != null && message.hasOwnProperty("responseId")) - object.responseId = message.responseId; - if (message.queryResult != null && message.hasOwnProperty("queryResult")) - object.queryResult = $root.google.cloud.dialogflow.cx.v3.QueryResult.toObject(message.queryResult, options); - if (message.outputAudio != null && message.hasOwnProperty("outputAudio")) - object.outputAudio = options.bytes === String ? $util.base64.encode(message.outputAudio, 0, message.outputAudio.length) : options.bytes === Array ? Array.prototype.slice.call(message.outputAudio) : message.outputAudio; - if (message.outputAudioConfig != null && message.hasOwnProperty("outputAudioConfig")) - object.outputAudioConfig = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.toObject(message.outputAudioConfig, options); + if (message.messageType != null && message.hasOwnProperty("messageType")) + object.messageType = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.StreamingRecognitionResult.MessageType[message.messageType] : message.messageType; + if (message.transcript != null && message.hasOwnProperty("transcript")) + object.transcript = message.transcript; + if (message.isFinal != null && message.hasOwnProperty("isFinal")) + object.isFinal = message.isFinal; + if (message.confidence != null && message.hasOwnProperty("confidence")) + object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence; + if (message.stability != null && message.hasOwnProperty("stability")) + object.stability = options.json && !isFinite(message.stability) ? String(message.stability) : message.stability; + if (message.speechWordInfo && message.speechWordInfo.length) { + object.speechWordInfo = []; + for (var j = 0; j < message.speechWordInfo.length; ++j) + object.speechWordInfo[j] = $root.google.cloud.dialogflow.cx.v3.SpeechWordInfo.toObject(message.speechWordInfo[j], options); + } + if (message.speechEndOffset != null && message.hasOwnProperty("speechEndOffset")) + object.speechEndOffset = $root.google.protobuf.Duration.toObject(message.speechEndOffset, options); return object; }; /** - * Converts this FulfillIntentResponse to JSON. + * Converts this StreamingRecognitionResult to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentResponse + * @memberof google.cloud.dialogflow.cx.v3.StreamingRecognitionResult * @instance * @returns {Object.} JSON object */ - FulfillIntentResponse.prototype.toJSON = function toJSON() { + StreamingRecognitionResult.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return FulfillIntentResponse; + /** + * MessageType enum. + * @name google.cloud.dialogflow.cx.v3.StreamingRecognitionResult.MessageType + * @enum {number} + * @property {number} MESSAGE_TYPE_UNSPECIFIED=0 MESSAGE_TYPE_UNSPECIFIED value + * @property {number} TRANSCRIPT=1 TRANSCRIPT value + * @property {number} END_OF_SINGLE_UTTERANCE=2 END_OF_SINGLE_UTTERANCE value + */ + StreamingRecognitionResult.MessageType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MESSAGE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "TRANSCRIPT"] = 1; + values[valuesById[2] = "END_OF_SINGLE_UTTERANCE"] = 2; + return values; + })(); + + return StreamingRecognitionResult; })(); - v3.SentimentAnalysisResult = (function() { + v3.QueryParameters = (function() { /** - * Properties of a SentimentAnalysisResult. + * Properties of a QueryParameters. * @memberof google.cloud.dialogflow.cx.v3 - * @interface ISentimentAnalysisResult - * @property {number|null} [score] SentimentAnalysisResult score - * @property {number|null} [magnitude] SentimentAnalysisResult magnitude + * @interface IQueryParameters + * @property {string|null} [timeZone] QueryParameters timeZone + * @property {google.type.ILatLng|null} [geoLocation] QueryParameters geoLocation + * @property {Array.|null} [sessionEntityTypes] QueryParameters sessionEntityTypes + * @property {google.protobuf.IStruct|null} [payload] QueryParameters payload + * @property {google.protobuf.IStruct|null} [parameters] QueryParameters parameters + * @property {boolean|null} [analyzeQueryTextSentiment] QueryParameters analyzeQueryTextSentiment + * @property {Object.|null} [webhookHeaders] QueryParameters webhookHeaders */ /** - * Constructs a new SentimentAnalysisResult. + * Constructs a new QueryParameters. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a SentimentAnalysisResult. - * @implements ISentimentAnalysisResult + * @classdesc Represents a QueryParameters. + * @implements IQueryParameters * @constructor - * @param {google.cloud.dialogflow.cx.v3.ISentimentAnalysisResult=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IQueryParameters=} [properties] Properties to set */ - function SentimentAnalysisResult(properties) { + function QueryParameters(properties) { + this.sessionEntityTypes = []; + this.webhookHeaders = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -28687,88 +29281,176 @@ } /** - * SentimentAnalysisResult score. - * @member {number} score - * @memberof google.cloud.dialogflow.cx.v3.SentimentAnalysisResult + * QueryParameters timeZone. + * @member {string} timeZone + * @memberof google.cloud.dialogflow.cx.v3.QueryParameters * @instance */ - SentimentAnalysisResult.prototype.score = 0; + QueryParameters.prototype.timeZone = ""; /** - * SentimentAnalysisResult magnitude. - * @member {number} magnitude - * @memberof google.cloud.dialogflow.cx.v3.SentimentAnalysisResult + * QueryParameters geoLocation. + * @member {google.type.ILatLng|null|undefined} geoLocation + * @memberof google.cloud.dialogflow.cx.v3.QueryParameters * @instance */ - SentimentAnalysisResult.prototype.magnitude = 0; + QueryParameters.prototype.geoLocation = null; /** - * Creates a new SentimentAnalysisResult instance using the specified properties. + * QueryParameters sessionEntityTypes. + * @member {Array.} sessionEntityTypes + * @memberof google.cloud.dialogflow.cx.v3.QueryParameters + * @instance + */ + QueryParameters.prototype.sessionEntityTypes = $util.emptyArray; + + /** + * QueryParameters payload. + * @member {google.protobuf.IStruct|null|undefined} payload + * @memberof google.cloud.dialogflow.cx.v3.QueryParameters + * @instance + */ + QueryParameters.prototype.payload = null; + + /** + * QueryParameters parameters. + * @member {google.protobuf.IStruct|null|undefined} parameters + * @memberof google.cloud.dialogflow.cx.v3.QueryParameters + * @instance + */ + QueryParameters.prototype.parameters = null; + + /** + * QueryParameters analyzeQueryTextSentiment. + * @member {boolean} analyzeQueryTextSentiment + * @memberof google.cloud.dialogflow.cx.v3.QueryParameters + * @instance + */ + QueryParameters.prototype.analyzeQueryTextSentiment = false; + + /** + * QueryParameters webhookHeaders. + * @member {Object.} webhookHeaders + * @memberof google.cloud.dialogflow.cx.v3.QueryParameters + * @instance + */ + QueryParameters.prototype.webhookHeaders = $util.emptyObject; + + /** + * Creates a new QueryParameters instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.SentimentAnalysisResult + * @memberof google.cloud.dialogflow.cx.v3.QueryParameters * @static - * @param {google.cloud.dialogflow.cx.v3.ISentimentAnalysisResult=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.SentimentAnalysisResult} SentimentAnalysisResult instance + * @param {google.cloud.dialogflow.cx.v3.IQueryParameters=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.QueryParameters} QueryParameters instance */ - SentimentAnalysisResult.create = function create(properties) { - return new SentimentAnalysisResult(properties); + QueryParameters.create = function create(properties) { + return new QueryParameters(properties); }; /** - * Encodes the specified SentimentAnalysisResult message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SentimentAnalysisResult.verify|verify} messages. + * Encodes the specified QueryParameters message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.QueryParameters.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.SentimentAnalysisResult + * @memberof google.cloud.dialogflow.cx.v3.QueryParameters * @static - * @param {google.cloud.dialogflow.cx.v3.ISentimentAnalysisResult} message SentimentAnalysisResult message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IQueryParameters} message QueryParameters message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SentimentAnalysisResult.encode = function encode(message, writer) { + QueryParameters.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.score != null && Object.hasOwnProperty.call(message, "score")) - writer.uint32(/* id 1, wireType 5 =*/13).float(message.score); - if (message.magnitude != null && Object.hasOwnProperty.call(message, "magnitude")) - writer.uint32(/* id 2, wireType 5 =*/21).float(message.magnitude); + if (message.timeZone != null && Object.hasOwnProperty.call(message, "timeZone")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.timeZone); + if (message.geoLocation != null && Object.hasOwnProperty.call(message, "geoLocation")) + $root.google.type.LatLng.encode(message.geoLocation, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.sessionEntityTypes != null && message.sessionEntityTypes.length) + for (var i = 0; i < message.sessionEntityTypes.length; ++i) + $root.google.cloud.dialogflow.cx.v3.SessionEntityType.encode(message.sessionEntityTypes[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.payload != null && Object.hasOwnProperty.call(message, "payload")) + $root.google.protobuf.Struct.encode(message.payload, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.parameters != null && Object.hasOwnProperty.call(message, "parameters")) + $root.google.protobuf.Struct.encode(message.parameters, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.analyzeQueryTextSentiment != null && Object.hasOwnProperty.call(message, "analyzeQueryTextSentiment")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.analyzeQueryTextSentiment); + if (message.webhookHeaders != null && Object.hasOwnProperty.call(message, "webhookHeaders")) + for (var keys = Object.keys(message.webhookHeaders), i = 0; i < keys.length; ++i) + writer.uint32(/* id 10, wireType 2 =*/82).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.webhookHeaders[keys[i]]).ldelim(); return writer; }; /** - * Encodes the specified SentimentAnalysisResult message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SentimentAnalysisResult.verify|verify} messages. + * Encodes the specified QueryParameters message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.QueryParameters.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.SentimentAnalysisResult + * @memberof google.cloud.dialogflow.cx.v3.QueryParameters * @static - * @param {google.cloud.dialogflow.cx.v3.ISentimentAnalysisResult} message SentimentAnalysisResult message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IQueryParameters} message QueryParameters message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SentimentAnalysisResult.encodeDelimited = function encodeDelimited(message, writer) { + QueryParameters.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SentimentAnalysisResult message from the specified reader or buffer. + * Decodes a QueryParameters message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.SentimentAnalysisResult + * @memberof google.cloud.dialogflow.cx.v3.QueryParameters * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.SentimentAnalysisResult} SentimentAnalysisResult + * @returns {google.cloud.dialogflow.cx.v3.QueryParameters} QueryParameters * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SentimentAnalysisResult.decode = function decode(reader, length) { + QueryParameters.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.SentimentAnalysisResult(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.QueryParameters(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.score = reader.float(); + message.timeZone = reader.string(); break; case 2: - message.magnitude = reader.float(); + message.geoLocation = $root.google.type.LatLng.decode(reader, reader.uint32()); + break; + case 3: + if (!(message.sessionEntityTypes && message.sessionEntityTypes.length)) + message.sessionEntityTypes = []; + message.sessionEntityTypes.push($root.google.cloud.dialogflow.cx.v3.SessionEntityType.decode(reader, reader.uint32())); + break; + case 4: + message.payload = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + case 5: + message.parameters = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + case 8: + message.analyzeQueryTextSentiment = reader.bool(); + break; + case 10: + if (message.webhookHeaders === $util.emptyObject) + message.webhookHeaders = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.webhookHeaders[key] = value; break; default: reader.skipType(tag & 7); @@ -28779,424 +29461,364 @@ }; /** - * Decodes a SentimentAnalysisResult message from the specified reader or buffer, length delimited. + * Decodes a QueryParameters message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.SentimentAnalysisResult + * @memberof google.cloud.dialogflow.cx.v3.QueryParameters * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.SentimentAnalysisResult} SentimentAnalysisResult + * @returns {google.cloud.dialogflow.cx.v3.QueryParameters} QueryParameters * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SentimentAnalysisResult.decodeDelimited = function decodeDelimited(reader) { + QueryParameters.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SentimentAnalysisResult message. + * Verifies a QueryParameters message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.SentimentAnalysisResult + * @memberof google.cloud.dialogflow.cx.v3.QueryParameters * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SentimentAnalysisResult.verify = function verify(message) { + QueryParameters.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.score != null && message.hasOwnProperty("score")) - if (typeof message.score !== "number") - return "score: number expected"; - if (message.magnitude != null && message.hasOwnProperty("magnitude")) - if (typeof message.magnitude !== "number") - return "magnitude: number expected"; + if (message.timeZone != null && message.hasOwnProperty("timeZone")) + if (!$util.isString(message.timeZone)) + return "timeZone: string expected"; + if (message.geoLocation != null && message.hasOwnProperty("geoLocation")) { + var error = $root.google.type.LatLng.verify(message.geoLocation); + if (error) + return "geoLocation." + error; + } + if (message.sessionEntityTypes != null && message.hasOwnProperty("sessionEntityTypes")) { + if (!Array.isArray(message.sessionEntityTypes)) + return "sessionEntityTypes: array expected"; + for (var i = 0; i < message.sessionEntityTypes.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.SessionEntityType.verify(message.sessionEntityTypes[i]); + if (error) + return "sessionEntityTypes." + error; + } + } + if (message.payload != null && message.hasOwnProperty("payload")) { + var error = $root.google.protobuf.Struct.verify(message.payload); + if (error) + return "payload." + error; + } + if (message.parameters != null && message.hasOwnProperty("parameters")) { + var error = $root.google.protobuf.Struct.verify(message.parameters); + if (error) + return "parameters." + error; + } + if (message.analyzeQueryTextSentiment != null && message.hasOwnProperty("analyzeQueryTextSentiment")) + if (typeof message.analyzeQueryTextSentiment !== "boolean") + return "analyzeQueryTextSentiment: boolean expected"; + if (message.webhookHeaders != null && message.hasOwnProperty("webhookHeaders")) { + if (!$util.isObject(message.webhookHeaders)) + return "webhookHeaders: object expected"; + var key = Object.keys(message.webhookHeaders); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.webhookHeaders[key[i]])) + return "webhookHeaders: string{k:string} expected"; + } return null; }; /** - * Creates a SentimentAnalysisResult message from a plain object. Also converts values to their respective internal types. + * Creates a QueryParameters message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.SentimentAnalysisResult + * @memberof google.cloud.dialogflow.cx.v3.QueryParameters * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.SentimentAnalysisResult} SentimentAnalysisResult + * @returns {google.cloud.dialogflow.cx.v3.QueryParameters} QueryParameters */ - SentimentAnalysisResult.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.SentimentAnalysisResult) + QueryParameters.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.QueryParameters) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.SentimentAnalysisResult(); - if (object.score != null) - message.score = Number(object.score); - if (object.magnitude != null) - message.magnitude = Number(object.magnitude); + var message = new $root.google.cloud.dialogflow.cx.v3.QueryParameters(); + if (object.timeZone != null) + message.timeZone = String(object.timeZone); + if (object.geoLocation != null) { + if (typeof object.geoLocation !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.QueryParameters.geoLocation: object expected"); + message.geoLocation = $root.google.type.LatLng.fromObject(object.geoLocation); + } + if (object.sessionEntityTypes) { + if (!Array.isArray(object.sessionEntityTypes)) + throw TypeError(".google.cloud.dialogflow.cx.v3.QueryParameters.sessionEntityTypes: array expected"); + message.sessionEntityTypes = []; + for (var i = 0; i < object.sessionEntityTypes.length; ++i) { + if (typeof object.sessionEntityTypes[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.QueryParameters.sessionEntityTypes: object expected"); + message.sessionEntityTypes[i] = $root.google.cloud.dialogflow.cx.v3.SessionEntityType.fromObject(object.sessionEntityTypes[i]); + } + } + if (object.payload != null) { + if (typeof object.payload !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.QueryParameters.payload: object expected"); + message.payload = $root.google.protobuf.Struct.fromObject(object.payload); + } + if (object.parameters != null) { + if (typeof object.parameters !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.QueryParameters.parameters: object expected"); + message.parameters = $root.google.protobuf.Struct.fromObject(object.parameters); + } + if (object.analyzeQueryTextSentiment != null) + message.analyzeQueryTextSentiment = Boolean(object.analyzeQueryTextSentiment); + if (object.webhookHeaders) { + if (typeof object.webhookHeaders !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.QueryParameters.webhookHeaders: object expected"); + message.webhookHeaders = {}; + for (var keys = Object.keys(object.webhookHeaders), i = 0; i < keys.length; ++i) + message.webhookHeaders[keys[i]] = String(object.webhookHeaders[keys[i]]); + } return message; }; /** - * Creates a plain object from a SentimentAnalysisResult message. Also converts values to other types if specified. + * Creates a plain object from a QueryParameters message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.SentimentAnalysisResult + * @memberof google.cloud.dialogflow.cx.v3.QueryParameters * @static - * @param {google.cloud.dialogflow.cx.v3.SentimentAnalysisResult} message SentimentAnalysisResult + * @param {google.cloud.dialogflow.cx.v3.QueryParameters} message QueryParameters * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SentimentAnalysisResult.toObject = function toObject(message, options) { + QueryParameters.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.sessionEntityTypes = []; + if (options.objects || options.defaults) + object.webhookHeaders = {}; if (options.defaults) { - object.score = 0; - object.magnitude = 0; + object.timeZone = ""; + object.geoLocation = null; + object.payload = null; + object.parameters = null; + object.analyzeQueryTextSentiment = false; + } + if (message.timeZone != null && message.hasOwnProperty("timeZone")) + object.timeZone = message.timeZone; + if (message.geoLocation != null && message.hasOwnProperty("geoLocation")) + object.geoLocation = $root.google.type.LatLng.toObject(message.geoLocation, options); + if (message.sessionEntityTypes && message.sessionEntityTypes.length) { + object.sessionEntityTypes = []; + for (var j = 0; j < message.sessionEntityTypes.length; ++j) + object.sessionEntityTypes[j] = $root.google.cloud.dialogflow.cx.v3.SessionEntityType.toObject(message.sessionEntityTypes[j], options); + } + if (message.payload != null && message.hasOwnProperty("payload")) + object.payload = $root.google.protobuf.Struct.toObject(message.payload, options); + if (message.parameters != null && message.hasOwnProperty("parameters")) + object.parameters = $root.google.protobuf.Struct.toObject(message.parameters, options); + if (message.analyzeQueryTextSentiment != null && message.hasOwnProperty("analyzeQueryTextSentiment")) + object.analyzeQueryTextSentiment = message.analyzeQueryTextSentiment; + var keys2; + if (message.webhookHeaders && (keys2 = Object.keys(message.webhookHeaders)).length) { + object.webhookHeaders = {}; + for (var j = 0; j < keys2.length; ++j) + object.webhookHeaders[keys2[j]] = message.webhookHeaders[keys2[j]]; } - if (message.score != null && message.hasOwnProperty("score")) - object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score; - if (message.magnitude != null && message.hasOwnProperty("magnitude")) - object.magnitude = options.json && !isFinite(message.magnitude) ? String(message.magnitude) : message.magnitude; return object; }; /** - * Converts this SentimentAnalysisResult to JSON. + * Converts this QueryParameters to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.SentimentAnalysisResult + * @memberof google.cloud.dialogflow.cx.v3.QueryParameters * @instance * @returns {Object.} JSON object */ - SentimentAnalysisResult.prototype.toJSON = function toJSON() { + QueryParameters.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return SentimentAnalysisResult; + return QueryParameters; })(); - v3.SessionEntityTypes = (function() { + v3.QueryInput = (function() { /** - * Constructs a new SessionEntityTypes service. + * Properties of a QueryInput. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a SessionEntityTypes - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function SessionEntityTypes(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (SessionEntityTypes.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = SessionEntityTypes; - - /** - * Creates new SessionEntityTypes service using the specified rpc implementation. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.SessionEntityTypes - * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {SessionEntityTypes} RPC service. Useful where requests and/or responses are streamed. - */ - SessionEntityTypes.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.SessionEntityTypes#listSessionEntityTypes}. - * @memberof google.cloud.dialogflow.cx.v3.SessionEntityTypes - * @typedef ListSessionEntityTypesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse} [response] ListSessionEntityTypesResponse - */ - - /** - * Calls ListSessionEntityTypes. - * @function listSessionEntityTypes - * @memberof google.cloud.dialogflow.cx.v3.SessionEntityTypes - * @instance - * @param {google.cloud.dialogflow.cx.v3.IListSessionEntityTypesRequest} request ListSessionEntityTypesRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.SessionEntityTypes.ListSessionEntityTypesCallback} callback Node-style callback called with the error, if any, and ListSessionEntityTypesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(SessionEntityTypes.prototype.listSessionEntityTypes = function listSessionEntityTypes(request, callback) { - return this.rpcCall(listSessionEntityTypes, $root.google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest, $root.google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse, request, callback); - }, "name", { value: "ListSessionEntityTypes" }); - - /** - * Calls ListSessionEntityTypes. - * @function listSessionEntityTypes - * @memberof google.cloud.dialogflow.cx.v3.SessionEntityTypes - * @instance - * @param {google.cloud.dialogflow.cx.v3.IListSessionEntityTypesRequest} request ListSessionEntityTypesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.SessionEntityTypes#getSessionEntityType}. - * @memberof google.cloud.dialogflow.cx.v3.SessionEntityTypes - * @typedef GetSessionEntityTypeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.SessionEntityType} [response] SessionEntityType - */ - - /** - * Calls GetSessionEntityType. - * @function getSessionEntityType - * @memberof google.cloud.dialogflow.cx.v3.SessionEntityTypes - * @instance - * @param {google.cloud.dialogflow.cx.v3.IGetSessionEntityTypeRequest} request GetSessionEntityTypeRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.SessionEntityTypes.GetSessionEntityTypeCallback} callback Node-style callback called with the error, if any, and SessionEntityType - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(SessionEntityTypes.prototype.getSessionEntityType = function getSessionEntityType(request, callback) { - return this.rpcCall(getSessionEntityType, $root.google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest, $root.google.cloud.dialogflow.cx.v3.SessionEntityType, request, callback); - }, "name", { value: "GetSessionEntityType" }); - - /** - * Calls GetSessionEntityType. - * @function getSessionEntityType - * @memberof google.cloud.dialogflow.cx.v3.SessionEntityTypes - * @instance - * @param {google.cloud.dialogflow.cx.v3.IGetSessionEntityTypeRequest} request GetSessionEntityTypeRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.SessionEntityTypes#createSessionEntityType}. - * @memberof google.cloud.dialogflow.cx.v3.SessionEntityTypes - * @typedef CreateSessionEntityTypeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.SessionEntityType} [response] SessionEntityType + * @interface IQueryInput + * @property {google.cloud.dialogflow.cx.v3.ITextInput|null} [text] QueryInput text + * @property {google.cloud.dialogflow.cx.v3.IIntentInput|null} [intent] QueryInput intent + * @property {google.cloud.dialogflow.cx.v3.IAudioInput|null} [audio] QueryInput audio + * @property {google.cloud.dialogflow.cx.v3.IEventInput|null} [event] QueryInput event + * @property {google.cloud.dialogflow.cx.v3.IDtmfInput|null} [dtmf] QueryInput dtmf + * @property {string|null} [languageCode] QueryInput languageCode */ /** - * Calls CreateSessionEntityType. - * @function createSessionEntityType - * @memberof google.cloud.dialogflow.cx.v3.SessionEntityTypes - * @instance - * @param {google.cloud.dialogflow.cx.v3.ICreateSessionEntityTypeRequest} request CreateSessionEntityTypeRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.SessionEntityTypes.CreateSessionEntityTypeCallback} callback Node-style callback called with the error, if any, and SessionEntityType - * @returns {undefined} - * @variation 1 + * Constructs a new QueryInput. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a QueryInput. + * @implements IQueryInput + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IQueryInput=} [properties] Properties to set */ - Object.defineProperty(SessionEntityTypes.prototype.createSessionEntityType = function createSessionEntityType(request, callback) { - return this.rpcCall(createSessionEntityType, $root.google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest, $root.google.cloud.dialogflow.cx.v3.SessionEntityType, request, callback); - }, "name", { value: "CreateSessionEntityType" }); + function QueryInput(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Calls CreateSessionEntityType. - * @function createSessionEntityType - * @memberof google.cloud.dialogflow.cx.v3.SessionEntityTypes + * QueryInput text. + * @member {google.cloud.dialogflow.cx.v3.ITextInput|null|undefined} text + * @memberof google.cloud.dialogflow.cx.v3.QueryInput * @instance - * @param {google.cloud.dialogflow.cx.v3.ICreateSessionEntityTypeRequest} request CreateSessionEntityTypeRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.SessionEntityTypes#updateSessionEntityType}. - * @memberof google.cloud.dialogflow.cx.v3.SessionEntityTypes - * @typedef UpdateSessionEntityTypeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.SessionEntityType} [response] SessionEntityType */ + QueryInput.prototype.text = null; /** - * Calls UpdateSessionEntityType. - * @function updateSessionEntityType - * @memberof google.cloud.dialogflow.cx.v3.SessionEntityTypes + * QueryInput intent. + * @member {google.cloud.dialogflow.cx.v3.IIntentInput|null|undefined} intent + * @memberof google.cloud.dialogflow.cx.v3.QueryInput * @instance - * @param {google.cloud.dialogflow.cx.v3.IUpdateSessionEntityTypeRequest} request UpdateSessionEntityTypeRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.SessionEntityTypes.UpdateSessionEntityTypeCallback} callback Node-style callback called with the error, if any, and SessionEntityType - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(SessionEntityTypes.prototype.updateSessionEntityType = function updateSessionEntityType(request, callback) { - return this.rpcCall(updateSessionEntityType, $root.google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest, $root.google.cloud.dialogflow.cx.v3.SessionEntityType, request, callback); - }, "name", { value: "UpdateSessionEntityType" }); + QueryInput.prototype.intent = null; /** - * Calls UpdateSessionEntityType. - * @function updateSessionEntityType - * @memberof google.cloud.dialogflow.cx.v3.SessionEntityTypes + * QueryInput audio. + * @member {google.cloud.dialogflow.cx.v3.IAudioInput|null|undefined} audio + * @memberof google.cloud.dialogflow.cx.v3.QueryInput * @instance - * @param {google.cloud.dialogflow.cx.v3.IUpdateSessionEntityTypeRequest} request UpdateSessionEntityTypeRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.SessionEntityTypes#deleteSessionEntityType}. - * @memberof google.cloud.dialogflow.cx.v3.SessionEntityTypes - * @typedef DeleteSessionEntityTypeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty */ + QueryInput.prototype.audio = null; /** - * Calls DeleteSessionEntityType. - * @function deleteSessionEntityType - * @memberof google.cloud.dialogflow.cx.v3.SessionEntityTypes + * QueryInput event. + * @member {google.cloud.dialogflow.cx.v3.IEventInput|null|undefined} event + * @memberof google.cloud.dialogflow.cx.v3.QueryInput * @instance - * @param {google.cloud.dialogflow.cx.v3.IDeleteSessionEntityTypeRequest} request DeleteSessionEntityTypeRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.SessionEntityTypes.DeleteSessionEntityTypeCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(SessionEntityTypes.prototype.deleteSessionEntityType = function deleteSessionEntityType(request, callback) { - return this.rpcCall(deleteSessionEntityType, $root.google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteSessionEntityType" }); + QueryInput.prototype.event = null; /** - * Calls DeleteSessionEntityType. - * @function deleteSessionEntityType - * @memberof google.cloud.dialogflow.cx.v3.SessionEntityTypes + * QueryInput dtmf. + * @member {google.cloud.dialogflow.cx.v3.IDtmfInput|null|undefined} dtmf + * @memberof google.cloud.dialogflow.cx.v3.QueryInput * @instance - * @param {google.cloud.dialogflow.cx.v3.IDeleteSessionEntityTypeRequest} request DeleteSessionEntityTypeRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return SessionEntityTypes; - })(); - - v3.SessionEntityType = (function() { - - /** - * Properties of a SessionEntityType. - * @memberof google.cloud.dialogflow.cx.v3 - * @interface ISessionEntityType - * @property {string|null} [name] SessionEntityType name - * @property {google.cloud.dialogflow.cx.v3.SessionEntityType.EntityOverrideMode|null} [entityOverrideMode] SessionEntityType entityOverrideMode - * @property {Array.|null} [entities] SessionEntityType entities - */ - - /** - * Constructs a new SessionEntityType. - * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a SessionEntityType. - * @implements ISessionEntityType - * @constructor - * @param {google.cloud.dialogflow.cx.v3.ISessionEntityType=} [properties] Properties to set */ - function SessionEntityType(properties) { - this.entities = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + QueryInput.prototype.dtmf = null; /** - * SessionEntityType name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.SessionEntityType + * QueryInput languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3.QueryInput * @instance */ - SessionEntityType.prototype.name = ""; + QueryInput.prototype.languageCode = ""; - /** - * SessionEntityType entityOverrideMode. - * @member {google.cloud.dialogflow.cx.v3.SessionEntityType.EntityOverrideMode} entityOverrideMode - * @memberof google.cloud.dialogflow.cx.v3.SessionEntityType - * @instance - */ - SessionEntityType.prototype.entityOverrideMode = 0; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * SessionEntityType entities. - * @member {Array.} entities - * @memberof google.cloud.dialogflow.cx.v3.SessionEntityType + * QueryInput input. + * @member {"text"|"intent"|"audio"|"event"|"dtmf"|undefined} input + * @memberof google.cloud.dialogflow.cx.v3.QueryInput * @instance */ - SessionEntityType.prototype.entities = $util.emptyArray; + Object.defineProperty(QueryInput.prototype, "input", { + get: $util.oneOfGetter($oneOfFields = ["text", "intent", "audio", "event", "dtmf"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new SessionEntityType instance using the specified properties. + * Creates a new QueryInput instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.SessionEntityType + * @memberof google.cloud.dialogflow.cx.v3.QueryInput * @static - * @param {google.cloud.dialogflow.cx.v3.ISessionEntityType=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.SessionEntityType} SessionEntityType instance + * @param {google.cloud.dialogflow.cx.v3.IQueryInput=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.QueryInput} QueryInput instance */ - SessionEntityType.create = function create(properties) { - return new SessionEntityType(properties); + QueryInput.create = function create(properties) { + return new QueryInput(properties); }; /** - * Encodes the specified SessionEntityType message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SessionEntityType.verify|verify} messages. + * Encodes the specified QueryInput message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.QueryInput.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.SessionEntityType + * @memberof google.cloud.dialogflow.cx.v3.QueryInput * @static - * @param {google.cloud.dialogflow.cx.v3.ISessionEntityType} message SessionEntityType message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IQueryInput} message QueryInput message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SessionEntityType.encode = function encode(message, writer) { + QueryInput.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.entityOverrideMode != null && Object.hasOwnProperty.call(message, "entityOverrideMode")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.entityOverrideMode); - if (message.entities != null && message.entities.length) - for (var i = 0; i < message.entities.length; ++i) - $root.google.cloud.dialogflow.cx.v3.EntityType.Entity.encode(message.entities[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.text != null && Object.hasOwnProperty.call(message, "text")) + $root.google.cloud.dialogflow.cx.v3.TextInput.encode(message.text, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.intent != null && Object.hasOwnProperty.call(message, "intent")) + $root.google.cloud.dialogflow.cx.v3.IntentInput.encode(message.intent, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.languageCode); + if (message.audio != null && Object.hasOwnProperty.call(message, "audio")) + $root.google.cloud.dialogflow.cx.v3.AudioInput.encode(message.audio, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.event != null && Object.hasOwnProperty.call(message, "event")) + $root.google.cloud.dialogflow.cx.v3.EventInput.encode(message.event, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.dtmf != null && Object.hasOwnProperty.call(message, "dtmf")) + $root.google.cloud.dialogflow.cx.v3.DtmfInput.encode(message.dtmf, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); return writer; }; /** - * Encodes the specified SessionEntityType message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SessionEntityType.verify|verify} messages. + * Encodes the specified QueryInput message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.QueryInput.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.SessionEntityType + * @memberof google.cloud.dialogflow.cx.v3.QueryInput * @static - * @param {google.cloud.dialogflow.cx.v3.ISessionEntityType} message SessionEntityType message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IQueryInput} message QueryInput message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SessionEntityType.encodeDelimited = function encodeDelimited(message, writer) { + QueryInput.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SessionEntityType message from the specified reader or buffer. + * Decodes a QueryInput message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.SessionEntityType + * @memberof google.cloud.dialogflow.cx.v3.QueryInput * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.SessionEntityType} SessionEntityType + * @returns {google.cloud.dialogflow.cx.v3.QueryInput} QueryInput * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SessionEntityType.decode = function decode(reader, length) { + QueryInput.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.SessionEntityType(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.QueryInput(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); + case 2: + message.text = $root.google.cloud.dialogflow.cx.v3.TextInput.decode(reader, reader.uint32()); break; case 3: - message.entityOverrideMode = reader.int32(); + message.intent = $root.google.cloud.dialogflow.cx.v3.IntentInput.decode(reader, reader.uint32()); + break; + case 5: + message.audio = $root.google.cloud.dialogflow.cx.v3.AudioInput.decode(reader, reader.uint32()); + break; + case 6: + message.event = $root.google.cloud.dialogflow.cx.v3.EventInput.decode(reader, reader.uint32()); + break; + case 7: + message.dtmf = $root.google.cloud.dialogflow.cx.v3.DtmfInput.decode(reader, reader.uint32()); break; case 4: - if (!(message.entities && message.entities.length)) - message.entities = []; - message.entities.push($root.google.cloud.dialogflow.cx.v3.EntityType.Entity.decode(reader, reader.uint32())); + message.languageCode = reader.string(); break; default: reader.skipType(tag & 7); @@ -29207,178 +29829,223 @@ }; /** - * Decodes a SessionEntityType message from the specified reader or buffer, length delimited. + * Decodes a QueryInput message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.SessionEntityType + * @memberof google.cloud.dialogflow.cx.v3.QueryInput * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.SessionEntityType} SessionEntityType + * @returns {google.cloud.dialogflow.cx.v3.QueryInput} QueryInput * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SessionEntityType.decodeDelimited = function decodeDelimited(reader) { + QueryInput.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SessionEntityType message. + * Verifies a QueryInput message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.SessionEntityType + * @memberof google.cloud.dialogflow.cx.v3.QueryInput * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SessionEntityType.verify = function verify(message) { + QueryInput.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.entityOverrideMode != null && message.hasOwnProperty("entityOverrideMode")) - switch (message.entityOverrideMode) { - default: - return "entityOverrideMode: enum value expected"; - case 0: - case 1: - case 2: - break; + var properties = {}; + if (message.text != null && message.hasOwnProperty("text")) { + properties.input = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3.TextInput.verify(message.text); + if (error) + return "text." + error; } - if (message.entities != null && message.hasOwnProperty("entities")) { - if (!Array.isArray(message.entities)) - return "entities: array expected"; - for (var i = 0; i < message.entities.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.EntityType.Entity.verify(message.entities[i]); + } + if (message.intent != null && message.hasOwnProperty("intent")) { + if (properties.input === 1) + return "input: multiple values"; + properties.input = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3.IntentInput.verify(message.intent); if (error) - return "entities." + error; + return "intent." + error; + } + } + if (message.audio != null && message.hasOwnProperty("audio")) { + if (properties.input === 1) + return "input: multiple values"; + properties.input = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3.AudioInput.verify(message.audio); + if (error) + return "audio." + error; + } + } + if (message.event != null && message.hasOwnProperty("event")) { + if (properties.input === 1) + return "input: multiple values"; + properties.input = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3.EventInput.verify(message.event); + if (error) + return "event." + error; + } + } + if (message.dtmf != null && message.hasOwnProperty("dtmf")) { + if (properties.input === 1) + return "input: multiple values"; + properties.input = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3.DtmfInput.verify(message.dtmf); + if (error) + return "dtmf." + error; } } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; return null; }; /** - * Creates a SessionEntityType message from a plain object. Also converts values to their respective internal types. + * Creates a QueryInput message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.SessionEntityType + * @memberof google.cloud.dialogflow.cx.v3.QueryInput * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.SessionEntityType} SessionEntityType + * @returns {google.cloud.dialogflow.cx.v3.QueryInput} QueryInput */ - SessionEntityType.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.SessionEntityType) + QueryInput.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.QueryInput) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.SessionEntityType(); - if (object.name != null) - message.name = String(object.name); - switch (object.entityOverrideMode) { - case "ENTITY_OVERRIDE_MODE_UNSPECIFIED": - case 0: - message.entityOverrideMode = 0; - break; - case "ENTITY_OVERRIDE_MODE_OVERRIDE": - case 1: - message.entityOverrideMode = 1; - break; - case "ENTITY_OVERRIDE_MODE_SUPPLEMENT": - case 2: - message.entityOverrideMode = 2; - break; + var message = new $root.google.cloud.dialogflow.cx.v3.QueryInput(); + if (object.text != null) { + if (typeof object.text !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.QueryInput.text: object expected"); + message.text = $root.google.cloud.dialogflow.cx.v3.TextInput.fromObject(object.text); } - if (object.entities) { - if (!Array.isArray(object.entities)) - throw TypeError(".google.cloud.dialogflow.cx.v3.SessionEntityType.entities: array expected"); - message.entities = []; - for (var i = 0; i < object.entities.length; ++i) { - if (typeof object.entities[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.SessionEntityType.entities: object expected"); - message.entities[i] = $root.google.cloud.dialogflow.cx.v3.EntityType.Entity.fromObject(object.entities[i]); - } + if (object.intent != null) { + if (typeof object.intent !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.QueryInput.intent: object expected"); + message.intent = $root.google.cloud.dialogflow.cx.v3.IntentInput.fromObject(object.intent); + } + if (object.audio != null) { + if (typeof object.audio !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.QueryInput.audio: object expected"); + message.audio = $root.google.cloud.dialogflow.cx.v3.AudioInput.fromObject(object.audio); + } + if (object.event != null) { + if (typeof object.event !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.QueryInput.event: object expected"); + message.event = $root.google.cloud.dialogflow.cx.v3.EventInput.fromObject(object.event); + } + if (object.dtmf != null) { + if (typeof object.dtmf !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.QueryInput.dtmf: object expected"); + message.dtmf = $root.google.cloud.dialogflow.cx.v3.DtmfInput.fromObject(object.dtmf); } + if (object.languageCode != null) + message.languageCode = String(object.languageCode); return message; }; /** - * Creates a plain object from a SessionEntityType message. Also converts values to other types if specified. + * Creates a plain object from a QueryInput message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.SessionEntityType + * @memberof google.cloud.dialogflow.cx.v3.QueryInput * @static - * @param {google.cloud.dialogflow.cx.v3.SessionEntityType} message SessionEntityType + * @param {google.cloud.dialogflow.cx.v3.QueryInput} message QueryInput * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SessionEntityType.toObject = function toObject(message, options) { + QueryInput.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.entities = []; - if (options.defaults) { - object.name = ""; - object.entityOverrideMode = options.enums === String ? "ENTITY_OVERRIDE_MODE_UNSPECIFIED" : 0; + if (options.defaults) + object.languageCode = ""; + if (message.text != null && message.hasOwnProperty("text")) { + object.text = $root.google.cloud.dialogflow.cx.v3.TextInput.toObject(message.text, options); + if (options.oneofs) + object.input = "text"; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.entityOverrideMode != null && message.hasOwnProperty("entityOverrideMode")) - object.entityOverrideMode = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.SessionEntityType.EntityOverrideMode[message.entityOverrideMode] : message.entityOverrideMode; - if (message.entities && message.entities.length) { - object.entities = []; - for (var j = 0; j < message.entities.length; ++j) - object.entities[j] = $root.google.cloud.dialogflow.cx.v3.EntityType.Entity.toObject(message.entities[j], options); + if (message.intent != null && message.hasOwnProperty("intent")) { + object.intent = $root.google.cloud.dialogflow.cx.v3.IntentInput.toObject(message.intent, options); + if (options.oneofs) + object.input = "intent"; + } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; + if (message.audio != null && message.hasOwnProperty("audio")) { + object.audio = $root.google.cloud.dialogflow.cx.v3.AudioInput.toObject(message.audio, options); + if (options.oneofs) + object.input = "audio"; + } + if (message.event != null && message.hasOwnProperty("event")) { + object.event = $root.google.cloud.dialogflow.cx.v3.EventInput.toObject(message.event, options); + if (options.oneofs) + object.input = "event"; + } + if (message.dtmf != null && message.hasOwnProperty("dtmf")) { + object.dtmf = $root.google.cloud.dialogflow.cx.v3.DtmfInput.toObject(message.dtmf, options); + if (options.oneofs) + object.input = "dtmf"; } return object; }; /** - * Converts this SessionEntityType to JSON. + * Converts this QueryInput to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.SessionEntityType + * @memberof google.cloud.dialogflow.cx.v3.QueryInput * @instance * @returns {Object.} JSON object */ - SessionEntityType.prototype.toJSON = function toJSON() { + QueryInput.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * EntityOverrideMode enum. - * @name google.cloud.dialogflow.cx.v3.SessionEntityType.EntityOverrideMode - * @enum {number} - * @property {number} ENTITY_OVERRIDE_MODE_UNSPECIFIED=0 ENTITY_OVERRIDE_MODE_UNSPECIFIED value - * @property {number} ENTITY_OVERRIDE_MODE_OVERRIDE=1 ENTITY_OVERRIDE_MODE_OVERRIDE value - * @property {number} ENTITY_OVERRIDE_MODE_SUPPLEMENT=2 ENTITY_OVERRIDE_MODE_SUPPLEMENT value - */ - SessionEntityType.EntityOverrideMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ENTITY_OVERRIDE_MODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ENTITY_OVERRIDE_MODE_OVERRIDE"] = 1; - values[valuesById[2] = "ENTITY_OVERRIDE_MODE_SUPPLEMENT"] = 2; - return values; - })(); - - return SessionEntityType; + return QueryInput; })(); - v3.ListSessionEntityTypesRequest = (function() { + v3.QueryResult = (function() { /** - * Properties of a ListSessionEntityTypesRequest. + * Properties of a QueryResult. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IListSessionEntityTypesRequest - * @property {string|null} [parent] ListSessionEntityTypesRequest parent - * @property {number|null} [pageSize] ListSessionEntityTypesRequest pageSize - * @property {string|null} [pageToken] ListSessionEntityTypesRequest pageToken + * @interface IQueryResult + * @property {string|null} [text] QueryResult text + * @property {string|null} [triggerIntent] QueryResult triggerIntent + * @property {string|null} [transcript] QueryResult transcript + * @property {string|null} [triggerEvent] QueryResult triggerEvent + * @property {string|null} [languageCode] QueryResult languageCode + * @property {google.protobuf.IStruct|null} [parameters] QueryResult parameters + * @property {Array.|null} [responseMessages] QueryResult responseMessages + * @property {Array.|null} [webhookStatuses] QueryResult webhookStatuses + * @property {Array.|null} [webhookPayloads] QueryResult webhookPayloads + * @property {google.cloud.dialogflow.cx.v3.IPage|null} [currentPage] QueryResult currentPage + * @property {google.cloud.dialogflow.cx.v3.IIntent|null} [intent] QueryResult intent + * @property {number|null} [intentDetectionConfidence] QueryResult intentDetectionConfidence + * @property {google.cloud.dialogflow.cx.v3.IMatch|null} [match] QueryResult match + * @property {google.protobuf.IStruct|null} [diagnosticInfo] QueryResult diagnosticInfo + * @property {google.cloud.dialogflow.cx.v3.ISentimentAnalysisResult|null} [sentimentAnalysisResult] QueryResult sentimentAnalysisResult */ /** - * Constructs a new ListSessionEntityTypesRequest. + * Constructs a new QueryResult. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a ListSessionEntityTypesRequest. - * @implements IListSessionEntityTypesRequest + * @classdesc Represents a QueryResult. + * @implements IQueryResult * @constructor - * @param {google.cloud.dialogflow.cx.v3.IListSessionEntityTypesRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IQueryResult=} [properties] Properties to set */ - function ListSessionEntityTypesRequest(properties) { + function QueryResult(properties) { + this.responseMessages = []; + this.webhookStatuses = []; + this.webhookPayloads = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -29386,323 +30053,280 @@ } /** - * ListSessionEntityTypesRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest + * QueryResult text. + * @member {string} text + * @memberof google.cloud.dialogflow.cx.v3.QueryResult * @instance */ - ListSessionEntityTypesRequest.prototype.parent = ""; + QueryResult.prototype.text = ""; /** - * ListSessionEntityTypesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest + * QueryResult triggerIntent. + * @member {string} triggerIntent + * @memberof google.cloud.dialogflow.cx.v3.QueryResult * @instance */ - ListSessionEntityTypesRequest.prototype.pageSize = 0; + QueryResult.prototype.triggerIntent = ""; /** - * ListSessionEntityTypesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest + * QueryResult transcript. + * @member {string} transcript + * @memberof google.cloud.dialogflow.cx.v3.QueryResult * @instance */ - ListSessionEntityTypesRequest.prototype.pageToken = ""; + QueryResult.prototype.transcript = ""; /** - * Creates a new ListSessionEntityTypesRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.IListSessionEntityTypesRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest} ListSessionEntityTypesRequest instance + * QueryResult triggerEvent. + * @member {string} triggerEvent + * @memberof google.cloud.dialogflow.cx.v3.QueryResult + * @instance */ - ListSessionEntityTypesRequest.create = function create(properties) { - return new ListSessionEntityTypesRequest(properties); - }; + QueryResult.prototype.triggerEvent = ""; /** - * Encodes the specified ListSessionEntityTypesRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.IListSessionEntityTypesRequest} message ListSessionEntityTypesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * QueryResult languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3.QueryResult + * @instance */ - ListSessionEntityTypesRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - return writer; - }; + QueryResult.prototype.languageCode = ""; /** - * Encodes the specified ListSessionEntityTypesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.IListSessionEntityTypesRequest} message ListSessionEntityTypesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * QueryResult parameters. + * @member {google.protobuf.IStruct|null|undefined} parameters + * @memberof google.cloud.dialogflow.cx.v3.QueryResult + * @instance */ - ListSessionEntityTypesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + QueryResult.prototype.parameters = null; /** - * Decodes a ListSessionEntityTypesRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest} ListSessionEntityTypesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * QueryResult responseMessages. + * @member {Array.} responseMessages + * @memberof google.cloud.dialogflow.cx.v3.QueryResult + * @instance */ - ListSessionEntityTypesRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + QueryResult.prototype.responseMessages = $util.emptyArray; /** - * Decodes a ListSessionEntityTypesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest} ListSessionEntityTypesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * QueryResult webhookStatuses. + * @member {Array.} webhookStatuses + * @memberof google.cloud.dialogflow.cx.v3.QueryResult + * @instance */ - ListSessionEntityTypesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + QueryResult.prototype.webhookStatuses = $util.emptyArray; /** - * Verifies a ListSessionEntityTypesRequest message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * QueryResult webhookPayloads. + * @member {Array.} webhookPayloads + * @memberof google.cloud.dialogflow.cx.v3.QueryResult + * @instance */ - ListSessionEntityTypesRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - return null; - }; + QueryResult.prototype.webhookPayloads = $util.emptyArray; /** - * Creates a ListSessionEntityTypesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest} ListSessionEntityTypesRequest + * QueryResult currentPage. + * @member {google.cloud.dialogflow.cx.v3.IPage|null|undefined} currentPage + * @memberof google.cloud.dialogflow.cx.v3.QueryResult + * @instance */ - ListSessionEntityTypesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - return message; - }; + QueryResult.prototype.currentPage = null; /** - * Creates a plain object from a ListSessionEntityTypesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest} message ListSessionEntityTypesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * QueryResult intent. + * @member {google.cloud.dialogflow.cx.v3.IIntent|null|undefined} intent + * @memberof google.cloud.dialogflow.cx.v3.QueryResult + * @instance */ - ListSessionEntityTypesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - return object; - }; + QueryResult.prototype.intent = null; /** - * Converts this ListSessionEntityTypesRequest to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest + * QueryResult intentDetectionConfidence. + * @member {number} intentDetectionConfidence + * @memberof google.cloud.dialogflow.cx.v3.QueryResult * @instance - * @returns {Object.} JSON object */ - ListSessionEntityTypesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ListSessionEntityTypesRequest; - })(); - - v3.ListSessionEntityTypesResponse = (function() { + QueryResult.prototype.intentDetectionConfidence = 0; /** - * Properties of a ListSessionEntityTypesResponse. - * @memberof google.cloud.dialogflow.cx.v3 - * @interface IListSessionEntityTypesResponse - * @property {Array.|null} [sessionEntityTypes] ListSessionEntityTypesResponse sessionEntityTypes - * @property {string|null} [nextPageToken] ListSessionEntityTypesResponse nextPageToken + * QueryResult match. + * @member {google.cloud.dialogflow.cx.v3.IMatch|null|undefined} match + * @memberof google.cloud.dialogflow.cx.v3.QueryResult + * @instance */ + QueryResult.prototype.match = null; /** - * Constructs a new ListSessionEntityTypesResponse. - * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a ListSessionEntityTypesResponse. - * @implements IListSessionEntityTypesResponse - * @constructor - * @param {google.cloud.dialogflow.cx.v3.IListSessionEntityTypesResponse=} [properties] Properties to set + * QueryResult diagnosticInfo. + * @member {google.protobuf.IStruct|null|undefined} diagnosticInfo + * @memberof google.cloud.dialogflow.cx.v3.QueryResult + * @instance */ - function ListSessionEntityTypesResponse(properties) { - this.sessionEntityTypes = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + QueryResult.prototype.diagnosticInfo = null; /** - * ListSessionEntityTypesResponse sessionEntityTypes. - * @member {Array.} sessionEntityTypes - * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse + * QueryResult sentimentAnalysisResult. + * @member {google.cloud.dialogflow.cx.v3.ISentimentAnalysisResult|null|undefined} sentimentAnalysisResult + * @memberof google.cloud.dialogflow.cx.v3.QueryResult * @instance */ - ListSessionEntityTypesResponse.prototype.sessionEntityTypes = $util.emptyArray; + QueryResult.prototype.sentimentAnalysisResult = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * ListSessionEntityTypesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse + * QueryResult query. + * @member {"text"|"triggerIntent"|"transcript"|"triggerEvent"|undefined} query + * @memberof google.cloud.dialogflow.cx.v3.QueryResult * @instance */ - ListSessionEntityTypesResponse.prototype.nextPageToken = ""; + Object.defineProperty(QueryResult.prototype, "query", { + get: $util.oneOfGetter($oneOfFields = ["text", "triggerIntent", "transcript", "triggerEvent"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new ListSessionEntityTypesResponse instance using the specified properties. + * Creates a new QueryResult instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse + * @memberof google.cloud.dialogflow.cx.v3.QueryResult * @static - * @param {google.cloud.dialogflow.cx.v3.IListSessionEntityTypesResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse} ListSessionEntityTypesResponse instance + * @param {google.cloud.dialogflow.cx.v3.IQueryResult=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.QueryResult} QueryResult instance */ - ListSessionEntityTypesResponse.create = function create(properties) { - return new ListSessionEntityTypesResponse(properties); + QueryResult.create = function create(properties) { + return new QueryResult(properties); }; /** - * Encodes the specified ListSessionEntityTypesResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse.verify|verify} messages. + * Encodes the specified QueryResult message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.QueryResult.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse + * @memberof google.cloud.dialogflow.cx.v3.QueryResult * @static - * @param {google.cloud.dialogflow.cx.v3.IListSessionEntityTypesResponse} message ListSessionEntityTypesResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IQueryResult} message QueryResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListSessionEntityTypesResponse.encode = function encode(message, writer) { + QueryResult.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.sessionEntityTypes != null && message.sessionEntityTypes.length) - for (var i = 0; i < message.sessionEntityTypes.length; ++i) - $root.google.cloud.dialogflow.cx.v3.SessionEntityType.encode(message.sessionEntityTypes[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.text != null && Object.hasOwnProperty.call(message, "text")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.text); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); + if (message.parameters != null && Object.hasOwnProperty.call(message, "parameters")) + $root.google.protobuf.Struct.encode(message.parameters, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.responseMessages != null && message.responseMessages.length) + for (var i = 0; i < message.responseMessages.length; ++i) + $root.google.cloud.dialogflow.cx.v3.ResponseMessage.encode(message.responseMessages[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.webhookPayloads != null && message.webhookPayloads.length) + for (var i = 0; i < message.webhookPayloads.length; ++i) + $root.google.protobuf.Struct.encode(message.webhookPayloads[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.currentPage != null && Object.hasOwnProperty.call(message, "currentPage")) + $root.google.cloud.dialogflow.cx.v3.Page.encode(message.currentPage, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.intent != null && Object.hasOwnProperty.call(message, "intent")) + $root.google.cloud.dialogflow.cx.v3.Intent.encode(message.intent, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.intentDetectionConfidence != null && Object.hasOwnProperty.call(message, "intentDetectionConfidence")) + writer.uint32(/* id 9, wireType 5 =*/77).float(message.intentDetectionConfidence); + if (message.diagnosticInfo != null && Object.hasOwnProperty.call(message, "diagnosticInfo")) + $root.google.protobuf.Struct.encode(message.diagnosticInfo, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.triggerIntent != null && Object.hasOwnProperty.call(message, "triggerIntent")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.triggerIntent); + if (message.transcript != null && Object.hasOwnProperty.call(message, "transcript")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.transcript); + if (message.webhookStatuses != null && message.webhookStatuses.length) + for (var i = 0; i < message.webhookStatuses.length; ++i) + $root.google.rpc.Status.encode(message.webhookStatuses[i], writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.triggerEvent != null && Object.hasOwnProperty.call(message, "triggerEvent")) + writer.uint32(/* id 14, wireType 2 =*/114).string(message.triggerEvent); + if (message.match != null && Object.hasOwnProperty.call(message, "match")) + $root.google.cloud.dialogflow.cx.v3.Match.encode(message.match, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.sentimentAnalysisResult != null && Object.hasOwnProperty.call(message, "sentimentAnalysisResult")) + $root.google.cloud.dialogflow.cx.v3.SentimentAnalysisResult.encode(message.sentimentAnalysisResult, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListSessionEntityTypesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse.verify|verify} messages. + * Encodes the specified QueryResult message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.QueryResult.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse + * @memberof google.cloud.dialogflow.cx.v3.QueryResult * @static - * @param {google.cloud.dialogflow.cx.v3.IListSessionEntityTypesResponse} message ListSessionEntityTypesResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IQueryResult} message QueryResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListSessionEntityTypesResponse.encodeDelimited = function encodeDelimited(message, writer) { + QueryResult.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListSessionEntityTypesResponse message from the specified reader or buffer. + * Decodes a QueryResult message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse + * @memberof google.cloud.dialogflow.cx.v3.QueryResult * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse} ListSessionEntityTypesResponse + * @returns {google.cloud.dialogflow.cx.v3.QueryResult} QueryResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListSessionEntityTypesResponse.decode = function decode(reader, length) { + QueryResult.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.QueryResult(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.sessionEntityTypes && message.sessionEntityTypes.length)) - message.sessionEntityTypes = []; - message.sessionEntityTypes.push($root.google.cloud.dialogflow.cx.v3.SessionEntityType.decode(reader, reader.uint32())); + message.text = reader.string(); + break; + case 11: + message.triggerIntent = reader.string(); + break; + case 12: + message.transcript = reader.string(); + break; + case 14: + message.triggerEvent = reader.string(); break; case 2: - message.nextPageToken = reader.string(); + message.languageCode = reader.string(); + break; + case 3: + message.parameters = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + case 4: + if (!(message.responseMessages && message.responseMessages.length)) + message.responseMessages = []; + message.responseMessages.push($root.google.cloud.dialogflow.cx.v3.ResponseMessage.decode(reader, reader.uint32())); + break; + case 13: + if (!(message.webhookStatuses && message.webhookStatuses.length)) + message.webhookStatuses = []; + message.webhookStatuses.push($root.google.rpc.Status.decode(reader, reader.uint32())); + break; + case 6: + if (!(message.webhookPayloads && message.webhookPayloads.length)) + message.webhookPayloads = []; + message.webhookPayloads.push($root.google.protobuf.Struct.decode(reader, reader.uint32())); + break; + case 7: + message.currentPage = $root.google.cloud.dialogflow.cx.v3.Page.decode(reader, reader.uint32()); + break; + case 8: + message.intent = $root.google.cloud.dialogflow.cx.v3.Intent.decode(reader, reader.uint32()); + break; + case 9: + message.intentDetectionConfidence = reader.float(); + break; + case 15: + message.match = $root.google.cloud.dialogflow.cx.v3.Match.decode(reader, reader.uint32()); + break; + case 10: + message.diagnosticInfo = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + case 17: + message.sentimentAnalysisResult = $root.google.cloud.dialogflow.cx.v3.SentimentAnalysisResult.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -29713,133 +30337,326 @@ }; /** - * Decodes a ListSessionEntityTypesResponse message from the specified reader or buffer, length delimited. + * Decodes a QueryResult message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse + * @memberof google.cloud.dialogflow.cx.v3.QueryResult * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse} ListSessionEntityTypesResponse + * @returns {google.cloud.dialogflow.cx.v3.QueryResult} QueryResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListSessionEntityTypesResponse.decodeDelimited = function decodeDelimited(reader) { + QueryResult.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListSessionEntityTypesResponse message. + * Verifies a QueryResult message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse + * @memberof google.cloud.dialogflow.cx.v3.QueryResult * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListSessionEntityTypesResponse.verify = function verify(message) { + QueryResult.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.sessionEntityTypes != null && message.hasOwnProperty("sessionEntityTypes")) { - if (!Array.isArray(message.sessionEntityTypes)) - return "sessionEntityTypes: array expected"; - for (var i = 0; i < message.sessionEntityTypes.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.SessionEntityType.verify(message.sessionEntityTypes[i]); - if (error) - return "sessionEntityTypes." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; + var properties = {}; + if (message.text != null && message.hasOwnProperty("text")) { + properties.query = 1; + if (!$util.isString(message.text)) + return "text: string expected"; + } + if (message.triggerIntent != null && message.hasOwnProperty("triggerIntent")) { + if (properties.query === 1) + return "query: multiple values"; + properties.query = 1; + if (!$util.isString(message.triggerIntent)) + return "triggerIntent: string expected"; + } + if (message.transcript != null && message.hasOwnProperty("transcript")) { + if (properties.query === 1) + return "query: multiple values"; + properties.query = 1; + if (!$util.isString(message.transcript)) + return "transcript: string expected"; + } + if (message.triggerEvent != null && message.hasOwnProperty("triggerEvent")) { + if (properties.query === 1) + return "query: multiple values"; + properties.query = 1; + if (!$util.isString(message.triggerEvent)) + return "triggerEvent: string expected"; + } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; + if (message.parameters != null && message.hasOwnProperty("parameters")) { + var error = $root.google.protobuf.Struct.verify(message.parameters); + if (error) + return "parameters." + error; + } + if (message.responseMessages != null && message.hasOwnProperty("responseMessages")) { + if (!Array.isArray(message.responseMessages)) + return "responseMessages: array expected"; + for (var i = 0; i < message.responseMessages.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.verify(message.responseMessages[i]); + if (error) + return "responseMessages." + error; + } + } + if (message.webhookStatuses != null && message.hasOwnProperty("webhookStatuses")) { + if (!Array.isArray(message.webhookStatuses)) + return "webhookStatuses: array expected"; + for (var i = 0; i < message.webhookStatuses.length; ++i) { + var error = $root.google.rpc.Status.verify(message.webhookStatuses[i]); + if (error) + return "webhookStatuses." + error; + } + } + if (message.webhookPayloads != null && message.hasOwnProperty("webhookPayloads")) { + if (!Array.isArray(message.webhookPayloads)) + return "webhookPayloads: array expected"; + for (var i = 0; i < message.webhookPayloads.length; ++i) { + var error = $root.google.protobuf.Struct.verify(message.webhookPayloads[i]); + if (error) + return "webhookPayloads." + error; + } + } + if (message.currentPage != null && message.hasOwnProperty("currentPage")) { + var error = $root.google.cloud.dialogflow.cx.v3.Page.verify(message.currentPage); + if (error) + return "currentPage." + error; + } + if (message.intent != null && message.hasOwnProperty("intent")) { + var error = $root.google.cloud.dialogflow.cx.v3.Intent.verify(message.intent); + if (error) + return "intent." + error; + } + if (message.intentDetectionConfidence != null && message.hasOwnProperty("intentDetectionConfidence")) + if (typeof message.intentDetectionConfidence !== "number") + return "intentDetectionConfidence: number expected"; + if (message.match != null && message.hasOwnProperty("match")) { + var error = $root.google.cloud.dialogflow.cx.v3.Match.verify(message.match); + if (error) + return "match." + error; + } + if (message.diagnosticInfo != null && message.hasOwnProperty("diagnosticInfo")) { + var error = $root.google.protobuf.Struct.verify(message.diagnosticInfo); + if (error) + return "diagnosticInfo." + error; + } + if (message.sentimentAnalysisResult != null && message.hasOwnProperty("sentimentAnalysisResult")) { + var error = $root.google.cloud.dialogflow.cx.v3.SentimentAnalysisResult.verify(message.sentimentAnalysisResult); + if (error) + return "sentimentAnalysisResult." + error; + } return null; }; /** - * Creates a ListSessionEntityTypesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a QueryResult message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse + * @memberof google.cloud.dialogflow.cx.v3.QueryResult * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse} ListSessionEntityTypesResponse + * @returns {google.cloud.dialogflow.cx.v3.QueryResult} QueryResult */ - ListSessionEntityTypesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse) + QueryResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.QueryResult) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse(); - if (object.sessionEntityTypes) { - if (!Array.isArray(object.sessionEntityTypes)) - throw TypeError(".google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse.sessionEntityTypes: array expected"); - message.sessionEntityTypes = []; - for (var i = 0; i < object.sessionEntityTypes.length; ++i) { - if (typeof object.sessionEntityTypes[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse.sessionEntityTypes: object expected"); - message.sessionEntityTypes[i] = $root.google.cloud.dialogflow.cx.v3.SessionEntityType.fromObject(object.sessionEntityTypes[i]); + var message = new $root.google.cloud.dialogflow.cx.v3.QueryResult(); + if (object.text != null) + message.text = String(object.text); + if (object.triggerIntent != null) + message.triggerIntent = String(object.triggerIntent); + if (object.transcript != null) + message.transcript = String(object.transcript); + if (object.triggerEvent != null) + message.triggerEvent = String(object.triggerEvent); + if (object.languageCode != null) + message.languageCode = String(object.languageCode); + if (object.parameters != null) { + if (typeof object.parameters !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.QueryResult.parameters: object expected"); + message.parameters = $root.google.protobuf.Struct.fromObject(object.parameters); + } + if (object.responseMessages) { + if (!Array.isArray(object.responseMessages)) + throw TypeError(".google.cloud.dialogflow.cx.v3.QueryResult.responseMessages: array expected"); + message.responseMessages = []; + for (var i = 0; i < object.responseMessages.length; ++i) { + if (typeof object.responseMessages[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.QueryResult.responseMessages: object expected"); + message.responseMessages[i] = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.fromObject(object.responseMessages[i]); } } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); + if (object.webhookStatuses) { + if (!Array.isArray(object.webhookStatuses)) + throw TypeError(".google.cloud.dialogflow.cx.v3.QueryResult.webhookStatuses: array expected"); + message.webhookStatuses = []; + for (var i = 0; i < object.webhookStatuses.length; ++i) { + if (typeof object.webhookStatuses[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.QueryResult.webhookStatuses: object expected"); + message.webhookStatuses[i] = $root.google.rpc.Status.fromObject(object.webhookStatuses[i]); + } + } + if (object.webhookPayloads) { + if (!Array.isArray(object.webhookPayloads)) + throw TypeError(".google.cloud.dialogflow.cx.v3.QueryResult.webhookPayloads: array expected"); + message.webhookPayloads = []; + for (var i = 0; i < object.webhookPayloads.length; ++i) { + if (typeof object.webhookPayloads[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.QueryResult.webhookPayloads: object expected"); + message.webhookPayloads[i] = $root.google.protobuf.Struct.fromObject(object.webhookPayloads[i]); + } + } + if (object.currentPage != null) { + if (typeof object.currentPage !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.QueryResult.currentPage: object expected"); + message.currentPage = $root.google.cloud.dialogflow.cx.v3.Page.fromObject(object.currentPage); + } + if (object.intent != null) { + if (typeof object.intent !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.QueryResult.intent: object expected"); + message.intent = $root.google.cloud.dialogflow.cx.v3.Intent.fromObject(object.intent); + } + if (object.intentDetectionConfidence != null) + message.intentDetectionConfidence = Number(object.intentDetectionConfidence); + if (object.match != null) { + if (typeof object.match !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.QueryResult.match: object expected"); + message.match = $root.google.cloud.dialogflow.cx.v3.Match.fromObject(object.match); + } + if (object.diagnosticInfo != null) { + if (typeof object.diagnosticInfo !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.QueryResult.diagnosticInfo: object expected"); + message.diagnosticInfo = $root.google.protobuf.Struct.fromObject(object.diagnosticInfo); + } + if (object.sentimentAnalysisResult != null) { + if (typeof object.sentimentAnalysisResult !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.QueryResult.sentimentAnalysisResult: object expected"); + message.sentimentAnalysisResult = $root.google.cloud.dialogflow.cx.v3.SentimentAnalysisResult.fromObject(object.sentimentAnalysisResult); + } return message; }; /** - * Creates a plain object from a ListSessionEntityTypesResponse message. Also converts values to other types if specified. + * Creates a plain object from a QueryResult message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse + * @memberof google.cloud.dialogflow.cx.v3.QueryResult * @static - * @param {google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse} message ListSessionEntityTypesResponse + * @param {google.cloud.dialogflow.cx.v3.QueryResult} message QueryResult * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListSessionEntityTypesResponse.toObject = function toObject(message, options) { + QueryResult.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.sessionEntityTypes = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.sessionEntityTypes && message.sessionEntityTypes.length) { - object.sessionEntityTypes = []; - for (var j = 0; j < message.sessionEntityTypes.length; ++j) - object.sessionEntityTypes[j] = $root.google.cloud.dialogflow.cx.v3.SessionEntityType.toObject(message.sessionEntityTypes[j], options); + if (options.arrays || options.defaults) { + object.responseMessages = []; + object.webhookPayloads = []; + object.webhookStatuses = []; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + if (options.defaults) { + object.languageCode = ""; + object.parameters = null; + object.currentPage = null; + object.intent = null; + object.intentDetectionConfidence = 0; + object.diagnosticInfo = null; + object.match = null; + object.sentimentAnalysisResult = null; + } + if (message.text != null && message.hasOwnProperty("text")) { + object.text = message.text; + if (options.oneofs) + object.query = "text"; + } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; + if (message.parameters != null && message.hasOwnProperty("parameters")) + object.parameters = $root.google.protobuf.Struct.toObject(message.parameters, options); + if (message.responseMessages && message.responseMessages.length) { + object.responseMessages = []; + for (var j = 0; j < message.responseMessages.length; ++j) + object.responseMessages[j] = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.toObject(message.responseMessages[j], options); + } + if (message.webhookPayloads && message.webhookPayloads.length) { + object.webhookPayloads = []; + for (var j = 0; j < message.webhookPayloads.length; ++j) + object.webhookPayloads[j] = $root.google.protobuf.Struct.toObject(message.webhookPayloads[j], options); + } + if (message.currentPage != null && message.hasOwnProperty("currentPage")) + object.currentPage = $root.google.cloud.dialogflow.cx.v3.Page.toObject(message.currentPage, options); + if (message.intent != null && message.hasOwnProperty("intent")) + object.intent = $root.google.cloud.dialogflow.cx.v3.Intent.toObject(message.intent, options); + if (message.intentDetectionConfidence != null && message.hasOwnProperty("intentDetectionConfidence")) + object.intentDetectionConfidence = options.json && !isFinite(message.intentDetectionConfidence) ? String(message.intentDetectionConfidence) : message.intentDetectionConfidence; + if (message.diagnosticInfo != null && message.hasOwnProperty("diagnosticInfo")) + object.diagnosticInfo = $root.google.protobuf.Struct.toObject(message.diagnosticInfo, options); + if (message.triggerIntent != null && message.hasOwnProperty("triggerIntent")) { + object.triggerIntent = message.triggerIntent; + if (options.oneofs) + object.query = "triggerIntent"; + } + if (message.transcript != null && message.hasOwnProperty("transcript")) { + object.transcript = message.transcript; + if (options.oneofs) + object.query = "transcript"; + } + if (message.webhookStatuses && message.webhookStatuses.length) { + object.webhookStatuses = []; + for (var j = 0; j < message.webhookStatuses.length; ++j) + object.webhookStatuses[j] = $root.google.rpc.Status.toObject(message.webhookStatuses[j], options); + } + if (message.triggerEvent != null && message.hasOwnProperty("triggerEvent")) { + object.triggerEvent = message.triggerEvent; + if (options.oneofs) + object.query = "triggerEvent"; + } + if (message.match != null && message.hasOwnProperty("match")) + object.match = $root.google.cloud.dialogflow.cx.v3.Match.toObject(message.match, options); + if (message.sentimentAnalysisResult != null && message.hasOwnProperty("sentimentAnalysisResult")) + object.sentimentAnalysisResult = $root.google.cloud.dialogflow.cx.v3.SentimentAnalysisResult.toObject(message.sentimentAnalysisResult, options); return object; }; /** - * Converts this ListSessionEntityTypesResponse to JSON. + * Converts this QueryResult to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse + * @memberof google.cloud.dialogflow.cx.v3.QueryResult * @instance * @returns {Object.} JSON object */ - ListSessionEntityTypesResponse.prototype.toJSON = function toJSON() { + QueryResult.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListSessionEntityTypesResponse; + return QueryResult; })(); - v3.GetSessionEntityTypeRequest = (function() { + v3.TextInput = (function() { /** - * Properties of a GetSessionEntityTypeRequest. + * Properties of a TextInput. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IGetSessionEntityTypeRequest - * @property {string|null} [name] GetSessionEntityTypeRequest name + * @interface ITextInput + * @property {string|null} [text] TextInput text */ /** - * Constructs a new GetSessionEntityTypeRequest. + * Constructs a new TextInput. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a GetSessionEntityTypeRequest. - * @implements IGetSessionEntityTypeRequest + * @classdesc Represents a TextInput. + * @implements ITextInput * @constructor - * @param {google.cloud.dialogflow.cx.v3.IGetSessionEntityTypeRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.ITextInput=} [properties] Properties to set */ - function GetSessionEntityTypeRequest(properties) { + function TextInput(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -29847,75 +30664,75 @@ } /** - * GetSessionEntityTypeRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest + * TextInput text. + * @member {string} text + * @memberof google.cloud.dialogflow.cx.v3.TextInput * @instance */ - GetSessionEntityTypeRequest.prototype.name = ""; + TextInput.prototype.text = ""; /** - * Creates a new GetSessionEntityTypeRequest instance using the specified properties. + * Creates a new TextInput instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.TextInput * @static - * @param {google.cloud.dialogflow.cx.v3.IGetSessionEntityTypeRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest} GetSessionEntityTypeRequest instance + * @param {google.cloud.dialogflow.cx.v3.ITextInput=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.TextInput} TextInput instance */ - GetSessionEntityTypeRequest.create = function create(properties) { - return new GetSessionEntityTypeRequest(properties); + TextInput.create = function create(properties) { + return new TextInput(properties); }; /** - * Encodes the specified GetSessionEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest.verify|verify} messages. + * Encodes the specified TextInput message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TextInput.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.TextInput * @static - * @param {google.cloud.dialogflow.cx.v3.IGetSessionEntityTypeRequest} message GetSessionEntityTypeRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ITextInput} message TextInput message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSessionEntityTypeRequest.encode = function encode(message, writer) { + TextInput.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.text != null && Object.hasOwnProperty.call(message, "text")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.text); return writer; }; /** - * Encodes the specified GetSessionEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest.verify|verify} messages. + * Encodes the specified TextInput message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TextInput.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.TextInput * @static - * @param {google.cloud.dialogflow.cx.v3.IGetSessionEntityTypeRequest} message GetSessionEntityTypeRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ITextInput} message TextInput message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSessionEntityTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { + TextInput.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetSessionEntityTypeRequest message from the specified reader or buffer. + * Decodes a TextInput message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.TextInput * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest} GetSessionEntityTypeRequest + * @returns {google.cloud.dialogflow.cx.v3.TextInput} TextInput * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetSessionEntityTypeRequest.decode = function decode(reader, length) { + TextInput.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.TextInput(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.text = reader.string(); break; default: reader.skipType(tag & 7); @@ -29926,108 +30743,107 @@ }; /** - * Decodes a GetSessionEntityTypeRequest message from the specified reader or buffer, length delimited. + * Decodes a TextInput message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.TextInput * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest} GetSessionEntityTypeRequest + * @returns {google.cloud.dialogflow.cx.v3.TextInput} TextInput * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetSessionEntityTypeRequest.decodeDelimited = function decodeDelimited(reader) { + TextInput.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetSessionEntityTypeRequest message. + * Verifies a TextInput message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.TextInput * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetSessionEntityTypeRequest.verify = function verify(message) { + TextInput.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.text != null && message.hasOwnProperty("text")) + if (!$util.isString(message.text)) + return "text: string expected"; return null; }; /** - * Creates a GetSessionEntityTypeRequest message from a plain object. Also converts values to their respective internal types. + * Creates a TextInput message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.TextInput * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest} GetSessionEntityTypeRequest + * @returns {google.cloud.dialogflow.cx.v3.TextInput} TextInput */ - GetSessionEntityTypeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest) + TextInput.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.TextInput) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.dialogflow.cx.v3.TextInput(); + if (object.text != null) + message.text = String(object.text); return message; }; /** - * Creates a plain object from a GetSessionEntityTypeRequest message. Also converts values to other types if specified. + * Creates a plain object from a TextInput message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.TextInput * @static - * @param {google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest} message GetSessionEntityTypeRequest + * @param {google.cloud.dialogflow.cx.v3.TextInput} message TextInput * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetSessionEntityTypeRequest.toObject = function toObject(message, options) { + TextInput.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + object.text = ""; + if (message.text != null && message.hasOwnProperty("text")) + object.text = message.text; return object; }; /** - * Converts this GetSessionEntityTypeRequest to JSON. + * Converts this TextInput to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.TextInput * @instance * @returns {Object.} JSON object */ - GetSessionEntityTypeRequest.prototype.toJSON = function toJSON() { + TextInput.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetSessionEntityTypeRequest; + return TextInput; })(); - v3.CreateSessionEntityTypeRequest = (function() { + v3.IntentInput = (function() { /** - * Properties of a CreateSessionEntityTypeRequest. + * Properties of an IntentInput. * @memberof google.cloud.dialogflow.cx.v3 - * @interface ICreateSessionEntityTypeRequest - * @property {string|null} [parent] CreateSessionEntityTypeRequest parent - * @property {google.cloud.dialogflow.cx.v3.ISessionEntityType|null} [sessionEntityType] CreateSessionEntityTypeRequest sessionEntityType + * @interface IIntentInput + * @property {string|null} [intent] IntentInput intent */ /** - * Constructs a new CreateSessionEntityTypeRequest. + * Constructs a new IntentInput. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a CreateSessionEntityTypeRequest. - * @implements ICreateSessionEntityTypeRequest + * @classdesc Represents an IntentInput. + * @implements IIntentInput * @constructor - * @param {google.cloud.dialogflow.cx.v3.ICreateSessionEntityTypeRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IIntentInput=} [properties] Properties to set */ - function CreateSessionEntityTypeRequest(properties) { + function IntentInput(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -30035,88 +30851,75 @@ } /** - * CreateSessionEntityTypeRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest - * @instance - */ - CreateSessionEntityTypeRequest.prototype.parent = ""; - - /** - * CreateSessionEntityTypeRequest sessionEntityType. - * @member {google.cloud.dialogflow.cx.v3.ISessionEntityType|null|undefined} sessionEntityType - * @memberof google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest + * IntentInput intent. + * @member {string} intent + * @memberof google.cloud.dialogflow.cx.v3.IntentInput * @instance */ - CreateSessionEntityTypeRequest.prototype.sessionEntityType = null; + IntentInput.prototype.intent = ""; /** - * Creates a new CreateSessionEntityTypeRequest instance using the specified properties. + * Creates a new IntentInput instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.IntentInput * @static - * @param {google.cloud.dialogflow.cx.v3.ICreateSessionEntityTypeRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest} CreateSessionEntityTypeRequest instance + * @param {google.cloud.dialogflow.cx.v3.IIntentInput=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.IntentInput} IntentInput instance */ - CreateSessionEntityTypeRequest.create = function create(properties) { - return new CreateSessionEntityTypeRequest(properties); + IntentInput.create = function create(properties) { + return new IntentInput(properties); }; /** - * Encodes the specified CreateSessionEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest.verify|verify} messages. + * Encodes the specified IntentInput message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.IntentInput.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.IntentInput * @static - * @param {google.cloud.dialogflow.cx.v3.ICreateSessionEntityTypeRequest} message CreateSessionEntityTypeRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IIntentInput} message IntentInput message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateSessionEntityTypeRequest.encode = function encode(message, writer) { + IntentInput.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.sessionEntityType != null && Object.hasOwnProperty.call(message, "sessionEntityType")) - $root.google.cloud.dialogflow.cx.v3.SessionEntityType.encode(message.sessionEntityType, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.intent != null && Object.hasOwnProperty.call(message, "intent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.intent); return writer; }; /** - * Encodes the specified CreateSessionEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest.verify|verify} messages. + * Encodes the specified IntentInput message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.IntentInput.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.IntentInput * @static - * @param {google.cloud.dialogflow.cx.v3.ICreateSessionEntityTypeRequest} message CreateSessionEntityTypeRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IIntentInput} message IntentInput message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateSessionEntityTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { + IntentInput.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateSessionEntityTypeRequest message from the specified reader or buffer. + * Decodes an IntentInput message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.IntentInput * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest} CreateSessionEntityTypeRequest + * @returns {google.cloud.dialogflow.cx.v3.IntentInput} IntentInput * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateSessionEntityTypeRequest.decode = function decode(reader, length) { + IntentInput.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.IntentInput(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); - break; - case 2: - message.sessionEntityType = $root.google.cloud.dialogflow.cx.v3.SessionEntityType.decode(reader, reader.uint32()); + message.intent = reader.string(); break; default: reader.skipType(tag & 7); @@ -30127,122 +30930,108 @@ }; /** - * Decodes a CreateSessionEntityTypeRequest message from the specified reader or buffer, length delimited. + * Decodes an IntentInput message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.IntentInput * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest} CreateSessionEntityTypeRequest + * @returns {google.cloud.dialogflow.cx.v3.IntentInput} IntentInput * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateSessionEntityTypeRequest.decodeDelimited = function decodeDelimited(reader) { + IntentInput.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateSessionEntityTypeRequest message. + * Verifies an IntentInput message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.IntentInput * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateSessionEntityTypeRequest.verify = function verify(message) { + IntentInput.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.sessionEntityType != null && message.hasOwnProperty("sessionEntityType")) { - var error = $root.google.cloud.dialogflow.cx.v3.SessionEntityType.verify(message.sessionEntityType); - if (error) - return "sessionEntityType." + error; - } + if (message.intent != null && message.hasOwnProperty("intent")) + if (!$util.isString(message.intent)) + return "intent: string expected"; return null; }; /** - * Creates a CreateSessionEntityTypeRequest message from a plain object. Also converts values to their respective internal types. + * Creates an IntentInput message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.IntentInput * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest} CreateSessionEntityTypeRequest + * @returns {google.cloud.dialogflow.cx.v3.IntentInput} IntentInput */ - CreateSessionEntityTypeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest) + IntentInput.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.IntentInput) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.sessionEntityType != null) { - if (typeof object.sessionEntityType !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest.sessionEntityType: object expected"); - message.sessionEntityType = $root.google.cloud.dialogflow.cx.v3.SessionEntityType.fromObject(object.sessionEntityType); - } + var message = new $root.google.cloud.dialogflow.cx.v3.IntentInput(); + if (object.intent != null) + message.intent = String(object.intent); return message; }; /** - * Creates a plain object from a CreateSessionEntityTypeRequest message. Also converts values to other types if specified. + * Creates a plain object from an IntentInput message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.IntentInput * @static - * @param {google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest} message CreateSessionEntityTypeRequest + * @param {google.cloud.dialogflow.cx.v3.IntentInput} message IntentInput * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateSessionEntityTypeRequest.toObject = function toObject(message, options) { + IntentInput.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.sessionEntityType = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.sessionEntityType != null && message.hasOwnProperty("sessionEntityType")) - object.sessionEntityType = $root.google.cloud.dialogflow.cx.v3.SessionEntityType.toObject(message.sessionEntityType, options); + if (options.defaults) + object.intent = ""; + if (message.intent != null && message.hasOwnProperty("intent")) + object.intent = message.intent; return object; }; /** - * Converts this CreateSessionEntityTypeRequest to JSON. + * Converts this IntentInput to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.IntentInput * @instance * @returns {Object.} JSON object */ - CreateSessionEntityTypeRequest.prototype.toJSON = function toJSON() { + IntentInput.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CreateSessionEntityTypeRequest; + return IntentInput; })(); - v3.UpdateSessionEntityTypeRequest = (function() { + v3.AudioInput = (function() { /** - * Properties of an UpdateSessionEntityTypeRequest. + * Properties of an AudioInput. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IUpdateSessionEntityTypeRequest - * @property {google.cloud.dialogflow.cx.v3.ISessionEntityType|null} [sessionEntityType] UpdateSessionEntityTypeRequest sessionEntityType - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateSessionEntityTypeRequest updateMask + * @interface IAudioInput + * @property {google.cloud.dialogflow.cx.v3.IInputAudioConfig|null} [config] AudioInput config + * @property {Uint8Array|null} [audio] AudioInput audio */ /** - * Constructs a new UpdateSessionEntityTypeRequest. + * Constructs a new AudioInput. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents an UpdateSessionEntityTypeRequest. - * @implements IUpdateSessionEntityTypeRequest + * @classdesc Represents an AudioInput. + * @implements IAudioInput * @constructor - * @param {google.cloud.dialogflow.cx.v3.IUpdateSessionEntityTypeRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IAudioInput=} [properties] Properties to set */ - function UpdateSessionEntityTypeRequest(properties) { + function AudioInput(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -30250,88 +31039,88 @@ } /** - * UpdateSessionEntityTypeRequest sessionEntityType. - * @member {google.cloud.dialogflow.cx.v3.ISessionEntityType|null|undefined} sessionEntityType - * @memberof google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest + * AudioInput config. + * @member {google.cloud.dialogflow.cx.v3.IInputAudioConfig|null|undefined} config + * @memberof google.cloud.dialogflow.cx.v3.AudioInput * @instance */ - UpdateSessionEntityTypeRequest.prototype.sessionEntityType = null; + AudioInput.prototype.config = null; /** - * UpdateSessionEntityTypeRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest + * AudioInput audio. + * @member {Uint8Array} audio + * @memberof google.cloud.dialogflow.cx.v3.AudioInput * @instance */ - UpdateSessionEntityTypeRequest.prototype.updateMask = null; + AudioInput.prototype.audio = $util.newBuffer([]); /** - * Creates a new UpdateSessionEntityTypeRequest instance using the specified properties. + * Creates a new AudioInput instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.AudioInput * @static - * @param {google.cloud.dialogflow.cx.v3.IUpdateSessionEntityTypeRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest} UpdateSessionEntityTypeRequest instance + * @param {google.cloud.dialogflow.cx.v3.IAudioInput=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.AudioInput} AudioInput instance */ - UpdateSessionEntityTypeRequest.create = function create(properties) { - return new UpdateSessionEntityTypeRequest(properties); + AudioInput.create = function create(properties) { + return new AudioInput(properties); }; /** - * Encodes the specified UpdateSessionEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest.verify|verify} messages. + * Encodes the specified AudioInput message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.AudioInput.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.AudioInput * @static - * @param {google.cloud.dialogflow.cx.v3.IUpdateSessionEntityTypeRequest} message UpdateSessionEntityTypeRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IAudioInput} message AudioInput message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateSessionEntityTypeRequest.encode = function encode(message, writer) { + AudioInput.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.sessionEntityType != null && Object.hasOwnProperty.call(message, "sessionEntityType")) - $root.google.cloud.dialogflow.cx.v3.SessionEntityType.encode(message.sessionEntityType, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.config != null && Object.hasOwnProperty.call(message, "config")) + $root.google.cloud.dialogflow.cx.v3.InputAudioConfig.encode(message.config, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.audio != null && Object.hasOwnProperty.call(message, "audio")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.audio); return writer; }; /** - * Encodes the specified UpdateSessionEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest.verify|verify} messages. + * Encodes the specified AudioInput message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.AudioInput.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.AudioInput * @static - * @param {google.cloud.dialogflow.cx.v3.IUpdateSessionEntityTypeRequest} message UpdateSessionEntityTypeRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IAudioInput} message AudioInput message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateSessionEntityTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { + AudioInput.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateSessionEntityTypeRequest message from the specified reader or buffer. + * Decodes an AudioInput message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.AudioInput * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest} UpdateSessionEntityTypeRequest + * @returns {google.cloud.dialogflow.cx.v3.AudioInput} AudioInput * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateSessionEntityTypeRequest.decode = function decode(reader, length) { + AudioInput.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.AudioInput(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.sessionEntityType = $root.google.cloud.dialogflow.cx.v3.SessionEntityType.decode(reader, reader.uint32()); + message.config = $root.google.cloud.dialogflow.cx.v3.InputAudioConfig.decode(reader, reader.uint32()); break; case 2: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.audio = reader.bytes(); break; default: reader.skipType(tag & 7); @@ -30342,126 +31131,130 @@ }; /** - * Decodes an UpdateSessionEntityTypeRequest message from the specified reader or buffer, length delimited. + * Decodes an AudioInput message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.AudioInput * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest} UpdateSessionEntityTypeRequest + * @returns {google.cloud.dialogflow.cx.v3.AudioInput} AudioInput * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateSessionEntityTypeRequest.decodeDelimited = function decodeDelimited(reader) { + AudioInput.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateSessionEntityTypeRequest message. + * Verifies an AudioInput message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.AudioInput * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateSessionEntityTypeRequest.verify = function verify(message) { + AudioInput.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.sessionEntityType != null && message.hasOwnProperty("sessionEntityType")) { - var error = $root.google.cloud.dialogflow.cx.v3.SessionEntityType.verify(message.sessionEntityType); - if (error) - return "sessionEntityType." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (message.config != null && message.hasOwnProperty("config")) { + var error = $root.google.cloud.dialogflow.cx.v3.InputAudioConfig.verify(message.config); if (error) - return "updateMask." + error; + return "config." + error; } + if (message.audio != null && message.hasOwnProperty("audio")) + if (!(message.audio && typeof message.audio.length === "number" || $util.isString(message.audio))) + return "audio: buffer expected"; return null; }; /** - * Creates an UpdateSessionEntityTypeRequest message from a plain object. Also converts values to their respective internal types. + * Creates an AudioInput message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.AudioInput * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest} UpdateSessionEntityTypeRequest + * @returns {google.cloud.dialogflow.cx.v3.AudioInput} AudioInput */ - UpdateSessionEntityTypeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest) + AudioInput.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.AudioInput) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest(); - if (object.sessionEntityType != null) { - if (typeof object.sessionEntityType !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest.sessionEntityType: object expected"); - message.sessionEntityType = $root.google.cloud.dialogflow.cx.v3.SessionEntityType.fromObject(object.sessionEntityType); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + var message = new $root.google.cloud.dialogflow.cx.v3.AudioInput(); + if (object.config != null) { + if (typeof object.config !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.AudioInput.config: object expected"); + message.config = $root.google.cloud.dialogflow.cx.v3.InputAudioConfig.fromObject(object.config); } + if (object.audio != null) + if (typeof object.audio === "string") + $util.base64.decode(object.audio, message.audio = $util.newBuffer($util.base64.length(object.audio)), 0); + else if (object.audio.length) + message.audio = object.audio; return message; }; /** - * Creates a plain object from an UpdateSessionEntityTypeRequest message. Also converts values to other types if specified. + * Creates a plain object from an AudioInput message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.AudioInput * @static - * @param {google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest} message UpdateSessionEntityTypeRequest + * @param {google.cloud.dialogflow.cx.v3.AudioInput} message AudioInput * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateSessionEntityTypeRequest.toObject = function toObject(message, options) { + AudioInput.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.sessionEntityType = null; - object.updateMask = null; + object.config = null; + if (options.bytes === String) + object.audio = ""; + else { + object.audio = []; + if (options.bytes !== Array) + object.audio = $util.newBuffer(object.audio); + } } - if (message.sessionEntityType != null && message.hasOwnProperty("sessionEntityType")) - object.sessionEntityType = $root.google.cloud.dialogflow.cx.v3.SessionEntityType.toObject(message.sessionEntityType, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.config != null && message.hasOwnProperty("config")) + object.config = $root.google.cloud.dialogflow.cx.v3.InputAudioConfig.toObject(message.config, options); + if (message.audio != null && message.hasOwnProperty("audio")) + object.audio = options.bytes === String ? $util.base64.encode(message.audio, 0, message.audio.length) : options.bytes === Array ? Array.prototype.slice.call(message.audio) : message.audio; return object; }; /** - * Converts this UpdateSessionEntityTypeRequest to JSON. + * Converts this AudioInput to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.AudioInput * @instance * @returns {Object.} JSON object */ - UpdateSessionEntityTypeRequest.prototype.toJSON = function toJSON() { + AudioInput.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UpdateSessionEntityTypeRequest; + return AudioInput; })(); - v3.DeleteSessionEntityTypeRequest = (function() { + v3.EventInput = (function() { /** - * Properties of a DeleteSessionEntityTypeRequest. + * Properties of an EventInput. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IDeleteSessionEntityTypeRequest - * @property {string|null} [name] DeleteSessionEntityTypeRequest name + * @interface IEventInput + * @property {string|null} [event] EventInput event */ /** - * Constructs a new DeleteSessionEntityTypeRequest. + * Constructs a new EventInput. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a DeleteSessionEntityTypeRequest. - * @implements IDeleteSessionEntityTypeRequest + * @classdesc Represents an EventInput. + * @implements IEventInput * @constructor - * @param {google.cloud.dialogflow.cx.v3.IDeleteSessionEntityTypeRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IEventInput=} [properties] Properties to set */ - function DeleteSessionEntityTypeRequest(properties) { + function EventInput(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -30469,75 +31262,75 @@ } /** - * DeleteSessionEntityTypeRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest + * EventInput event. + * @member {string} event + * @memberof google.cloud.dialogflow.cx.v3.EventInput * @instance */ - DeleteSessionEntityTypeRequest.prototype.name = ""; + EventInput.prototype.event = ""; /** - * Creates a new DeleteSessionEntityTypeRequest instance using the specified properties. + * Creates a new EventInput instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.EventInput * @static - * @param {google.cloud.dialogflow.cx.v3.IDeleteSessionEntityTypeRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest} DeleteSessionEntityTypeRequest instance + * @param {google.cloud.dialogflow.cx.v3.IEventInput=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.EventInput} EventInput instance */ - DeleteSessionEntityTypeRequest.create = function create(properties) { - return new DeleteSessionEntityTypeRequest(properties); + EventInput.create = function create(properties) { + return new EventInput(properties); }; /** - * Encodes the specified DeleteSessionEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest.verify|verify} messages. + * Encodes the specified EventInput message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.EventInput.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.EventInput * @static - * @param {google.cloud.dialogflow.cx.v3.IDeleteSessionEntityTypeRequest} message DeleteSessionEntityTypeRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IEventInput} message EventInput message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteSessionEntityTypeRequest.encode = function encode(message, writer) { + EventInput.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.event != null && Object.hasOwnProperty.call(message, "event")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.event); return writer; }; /** - * Encodes the specified DeleteSessionEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest.verify|verify} messages. + * Encodes the specified EventInput message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.EventInput.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.EventInput * @static - * @param {google.cloud.dialogflow.cx.v3.IDeleteSessionEntityTypeRequest} message DeleteSessionEntityTypeRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IEventInput} message EventInput message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteSessionEntityTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { + EventInput.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteSessionEntityTypeRequest message from the specified reader or buffer. + * Decodes an EventInput message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.EventInput * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest} DeleteSessionEntityTypeRequest + * @returns {google.cloud.dialogflow.cx.v3.EventInput} EventInput * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteSessionEntityTypeRequest.decode = function decode(reader, length) { + EventInput.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.EventInput(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.event = reader.string(); break; default: reader.skipType(tag & 7); @@ -30548,415 +31341,197 @@ }; /** - * Decodes a DeleteSessionEntityTypeRequest message from the specified reader or buffer, length delimited. + * Decodes an EventInput message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.EventInput * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest} DeleteSessionEntityTypeRequest + * @returns {google.cloud.dialogflow.cx.v3.EventInput} EventInput * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteSessionEntityTypeRequest.decodeDelimited = function decodeDelimited(reader) { + EventInput.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteSessionEntityTypeRequest message. + * Verifies an EventInput message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.EventInput * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteSessionEntityTypeRequest.verify = function verify(message) { + EventInput.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.event != null && message.hasOwnProperty("event")) + if (!$util.isString(message.event)) + return "event: string expected"; return null; }; /** - * Creates a DeleteSessionEntityTypeRequest message from a plain object. Also converts values to their respective internal types. + * Creates an EventInput message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.EventInput * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest} DeleteSessionEntityTypeRequest + * @returns {google.cloud.dialogflow.cx.v3.EventInput} EventInput */ - DeleteSessionEntityTypeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest) + EventInput.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.EventInput) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.dialogflow.cx.v3.EventInput(); + if (object.event != null) + message.event = String(object.event); return message; }; /** - * Creates a plain object from a DeleteSessionEntityTypeRequest message. Also converts values to other types if specified. + * Creates a plain object from an EventInput message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.EventInput * @static - * @param {google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest} message DeleteSessionEntityTypeRequest + * @param {google.cloud.dialogflow.cx.v3.EventInput} message EventInput * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteSessionEntityTypeRequest.toObject = function toObject(message, options) { + EventInput.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + object.event = ""; + if (message.event != null && message.hasOwnProperty("event")) + object.event = message.event; return object; }; /** - * Converts this DeleteSessionEntityTypeRequest to JSON. + * Converts this EventInput to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.EventInput * @instance * @returns {Object.} JSON object */ - DeleteSessionEntityTypeRequest.prototype.toJSON = function toJSON() { + EventInput.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeleteSessionEntityTypeRequest; + return EventInput; })(); - v3.TransitionRouteGroups = (function() { + v3.DtmfInput = (function() { /** - * Constructs a new TransitionRouteGroups service. + * Properties of a DtmfInput. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a TransitionRouteGroups - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function TransitionRouteGroups(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (TransitionRouteGroups.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = TransitionRouteGroups; - - /** - * Creates new TransitionRouteGroups service using the specified rpc implementation. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroups - * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {TransitionRouteGroups} RPC service. Useful where requests and/or responses are streamed. + * @interface IDtmfInput + * @property {string|null} [digits] DtmfInput digits + * @property {string|null} [finishDigit] DtmfInput finishDigit */ - TransitionRouteGroups.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.TransitionRouteGroups#listTransitionRouteGroups}. - * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroups - * @typedef ListTransitionRouteGroupsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse} [response] ListTransitionRouteGroupsResponse + * Constructs a new DtmfInput. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a DtmfInput. + * @implements IDtmfInput + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IDtmfInput=} [properties] Properties to set */ + function DtmfInput(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Calls ListTransitionRouteGroups. - * @function listTransitionRouteGroups - * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroups + * DtmfInput digits. + * @member {string} digits + * @memberof google.cloud.dialogflow.cx.v3.DtmfInput * @instance - * @param {google.cloud.dialogflow.cx.v3.IListTransitionRouteGroupsRequest} request ListTransitionRouteGroupsRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.TransitionRouteGroups.ListTransitionRouteGroupsCallback} callback Node-style callback called with the error, if any, and ListTransitionRouteGroupsResponse - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(TransitionRouteGroups.prototype.listTransitionRouteGroups = function listTransitionRouteGroups(request, callback) { - return this.rpcCall(listTransitionRouteGroups, $root.google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest, $root.google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse, request, callback); - }, "name", { value: "ListTransitionRouteGroups" }); + DtmfInput.prototype.digits = ""; /** - * Calls ListTransitionRouteGroups. - * @function listTransitionRouteGroups - * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroups + * DtmfInput finishDigit. + * @member {string} finishDigit + * @memberof google.cloud.dialogflow.cx.v3.DtmfInput * @instance - * @param {google.cloud.dialogflow.cx.v3.IListTransitionRouteGroupsRequest} request ListTransitionRouteGroupsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.TransitionRouteGroups#getTransitionRouteGroup}. - * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroups - * @typedef GetTransitionRouteGroupCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.TransitionRouteGroup} [response] TransitionRouteGroup */ + DtmfInput.prototype.finishDigit = ""; /** - * Calls GetTransitionRouteGroup. - * @function getTransitionRouteGroup - * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroups - * @instance - * @param {google.cloud.dialogflow.cx.v3.IGetTransitionRouteGroupRequest} request GetTransitionRouteGroupRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.TransitionRouteGroups.GetTransitionRouteGroupCallback} callback Node-style callback called with the error, if any, and TransitionRouteGroup - * @returns {undefined} - * @variation 1 + * Creates a new DtmfInput instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.DtmfInput + * @static + * @param {google.cloud.dialogflow.cx.v3.IDtmfInput=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.DtmfInput} DtmfInput instance */ - Object.defineProperty(TransitionRouteGroups.prototype.getTransitionRouteGroup = function getTransitionRouteGroup(request, callback) { - return this.rpcCall(getTransitionRouteGroup, $root.google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest, $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup, request, callback); - }, "name", { value: "GetTransitionRouteGroup" }); + DtmfInput.create = function create(properties) { + return new DtmfInput(properties); + }; /** - * Calls GetTransitionRouteGroup. - * @function getTransitionRouteGroup - * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroups - * @instance - * @param {google.cloud.dialogflow.cx.v3.IGetTransitionRouteGroupRequest} request GetTransitionRouteGroupRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Encodes the specified DtmfInput message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DtmfInput.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.DtmfInput + * @static + * @param {google.cloud.dialogflow.cx.v3.IDtmfInput} message DtmfInput message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + DtmfInput.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.digits != null && Object.hasOwnProperty.call(message, "digits")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.digits); + if (message.finishDigit != null && Object.hasOwnProperty.call(message, "finishDigit")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.finishDigit); + return writer; + }; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.TransitionRouteGroups#createTransitionRouteGroup}. - * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroups - * @typedef CreateTransitionRouteGroupCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.TransitionRouteGroup} [response] TransitionRouteGroup + * Encodes the specified DtmfInput message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DtmfInput.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.DtmfInput + * @static + * @param {google.cloud.dialogflow.cx.v3.IDtmfInput} message DtmfInput message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + DtmfInput.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Calls CreateTransitionRouteGroup. - * @function createTransitionRouteGroup - * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroups - * @instance - * @param {google.cloud.dialogflow.cx.v3.ICreateTransitionRouteGroupRequest} request CreateTransitionRouteGroupRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.TransitionRouteGroups.CreateTransitionRouteGroupCallback} callback Node-style callback called with the error, if any, and TransitionRouteGroup - * @returns {undefined} - * @variation 1 + * Decodes a DtmfInput message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.DtmfInput + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3.DtmfInput} DtmfInput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Object.defineProperty(TransitionRouteGroups.prototype.createTransitionRouteGroup = function createTransitionRouteGroup(request, callback) { - return this.rpcCall(createTransitionRouteGroup, $root.google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest, $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup, request, callback); - }, "name", { value: "CreateTransitionRouteGroup" }); - - /** - * Calls CreateTransitionRouteGroup. - * @function createTransitionRouteGroup - * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroups - * @instance - * @param {google.cloud.dialogflow.cx.v3.ICreateTransitionRouteGroupRequest} request CreateTransitionRouteGroupRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.TransitionRouteGroups#updateTransitionRouteGroup}. - * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroups - * @typedef UpdateTransitionRouteGroupCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.TransitionRouteGroup} [response] TransitionRouteGroup - */ - - /** - * Calls UpdateTransitionRouteGroup. - * @function updateTransitionRouteGroup - * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroups - * @instance - * @param {google.cloud.dialogflow.cx.v3.IUpdateTransitionRouteGroupRequest} request UpdateTransitionRouteGroupRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.TransitionRouteGroups.UpdateTransitionRouteGroupCallback} callback Node-style callback called with the error, if any, and TransitionRouteGroup - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(TransitionRouteGroups.prototype.updateTransitionRouteGroup = function updateTransitionRouteGroup(request, callback) { - return this.rpcCall(updateTransitionRouteGroup, $root.google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest, $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup, request, callback); - }, "name", { value: "UpdateTransitionRouteGroup" }); - - /** - * Calls UpdateTransitionRouteGroup. - * @function updateTransitionRouteGroup - * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroups - * @instance - * @param {google.cloud.dialogflow.cx.v3.IUpdateTransitionRouteGroupRequest} request UpdateTransitionRouteGroupRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.TransitionRouteGroups#deleteTransitionRouteGroup}. - * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroups - * @typedef DeleteTransitionRouteGroupCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls DeleteTransitionRouteGroup. - * @function deleteTransitionRouteGroup - * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroups - * @instance - * @param {google.cloud.dialogflow.cx.v3.IDeleteTransitionRouteGroupRequest} request DeleteTransitionRouteGroupRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.TransitionRouteGroups.DeleteTransitionRouteGroupCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(TransitionRouteGroups.prototype.deleteTransitionRouteGroup = function deleteTransitionRouteGroup(request, callback) { - return this.rpcCall(deleteTransitionRouteGroup, $root.google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteTransitionRouteGroup" }); - - /** - * Calls DeleteTransitionRouteGroup. - * @function deleteTransitionRouteGroup - * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroups - * @instance - * @param {google.cloud.dialogflow.cx.v3.IDeleteTransitionRouteGroupRequest} request DeleteTransitionRouteGroupRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return TransitionRouteGroups; - })(); - - v3.TransitionRouteGroup = (function() { - - /** - * Properties of a TransitionRouteGroup. - * @memberof google.cloud.dialogflow.cx.v3 - * @interface ITransitionRouteGroup - * @property {string|null} [name] TransitionRouteGroup name - * @property {string|null} [displayName] TransitionRouteGroup displayName - * @property {Array.|null} [transitionRoutes] TransitionRouteGroup transitionRoutes - */ - - /** - * Constructs a new TransitionRouteGroup. - * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a TransitionRouteGroup. - * @implements ITransitionRouteGroup - * @constructor - * @param {google.cloud.dialogflow.cx.v3.ITransitionRouteGroup=} [properties] Properties to set - */ - function TransitionRouteGroup(properties) { - this.transitionRoutes = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TransitionRouteGroup name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroup - * @instance - */ - TransitionRouteGroup.prototype.name = ""; - - /** - * TransitionRouteGroup displayName. - * @member {string} displayName - * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroup - * @instance - */ - TransitionRouteGroup.prototype.displayName = ""; - - /** - * TransitionRouteGroup transitionRoutes. - * @member {Array.} transitionRoutes - * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroup - * @instance - */ - TransitionRouteGroup.prototype.transitionRoutes = $util.emptyArray; - - /** - * Creates a new TransitionRouteGroup instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroup - * @static - * @param {google.cloud.dialogflow.cx.v3.ITransitionRouteGroup=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.TransitionRouteGroup} TransitionRouteGroup instance - */ - TransitionRouteGroup.create = function create(properties) { - return new TransitionRouteGroup(properties); - }; - - /** - * Encodes the specified TransitionRouteGroup message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TransitionRouteGroup.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroup - * @static - * @param {google.cloud.dialogflow.cx.v3.ITransitionRouteGroup} message TransitionRouteGroup message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TransitionRouteGroup.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.transitionRoutes != null && message.transitionRoutes.length) - for (var i = 0; i < message.transitionRoutes.length; ++i) - $root.google.cloud.dialogflow.cx.v3.TransitionRoute.encode(message.transitionRoutes[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified TransitionRouteGroup message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TransitionRouteGroup.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroup - * @static - * @param {google.cloud.dialogflow.cx.v3.ITransitionRouteGroup} message TransitionRouteGroup message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TransitionRouteGroup.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TransitionRouteGroup message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroup - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.TransitionRouteGroup} TransitionRouteGroup - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TransitionRouteGroup.decode = function decode(reader, length) { + DtmfInput.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.DtmfInput(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.digits = reader.string(); break; case 2: - message.displayName = reader.string(); - break; - case 5: - if (!(message.transitionRoutes && message.transitionRoutes.length)) - message.transitionRoutes = []; - message.transitionRoutes.push($root.google.cloud.dialogflow.cx.v3.TransitionRoute.decode(reader, reader.uint32())); + message.finishDigit = reader.string(); break; default: reader.skipType(tag & 7); @@ -30967,145 +31542,121 @@ }; /** - * Decodes a TransitionRouteGroup message from the specified reader or buffer, length delimited. + * Decodes a DtmfInput message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroup + * @memberof google.cloud.dialogflow.cx.v3.DtmfInput * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.TransitionRouteGroup} TransitionRouteGroup + * @returns {google.cloud.dialogflow.cx.v3.DtmfInput} DtmfInput * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TransitionRouteGroup.decodeDelimited = function decodeDelimited(reader) { + DtmfInput.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TransitionRouteGroup message. + * Verifies a DtmfInput message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroup + * @memberof google.cloud.dialogflow.cx.v3.DtmfInput * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TransitionRouteGroup.verify = function verify(message) { + DtmfInput.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.transitionRoutes != null && message.hasOwnProperty("transitionRoutes")) { - if (!Array.isArray(message.transitionRoutes)) - return "transitionRoutes: array expected"; - for (var i = 0; i < message.transitionRoutes.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.TransitionRoute.verify(message.transitionRoutes[i]); - if (error) - return "transitionRoutes." + error; - } - } + if (message.digits != null && message.hasOwnProperty("digits")) + if (!$util.isString(message.digits)) + return "digits: string expected"; + if (message.finishDigit != null && message.hasOwnProperty("finishDigit")) + if (!$util.isString(message.finishDigit)) + return "finishDigit: string expected"; return null; }; /** - * Creates a TransitionRouteGroup message from a plain object. Also converts values to their respective internal types. + * Creates a DtmfInput message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroup + * @memberof google.cloud.dialogflow.cx.v3.DtmfInput * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.TransitionRouteGroup} TransitionRouteGroup + * @returns {google.cloud.dialogflow.cx.v3.DtmfInput} DtmfInput */ - TransitionRouteGroup.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup) + DtmfInput.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.DtmfInput) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup(); - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.transitionRoutes) { - if (!Array.isArray(object.transitionRoutes)) - throw TypeError(".google.cloud.dialogflow.cx.v3.TransitionRouteGroup.transitionRoutes: array expected"); - message.transitionRoutes = []; - for (var i = 0; i < object.transitionRoutes.length; ++i) { - if (typeof object.transitionRoutes[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.TransitionRouteGroup.transitionRoutes: object expected"); - message.transitionRoutes[i] = $root.google.cloud.dialogflow.cx.v3.TransitionRoute.fromObject(object.transitionRoutes[i]); - } - } + var message = new $root.google.cloud.dialogflow.cx.v3.DtmfInput(); + if (object.digits != null) + message.digits = String(object.digits); + if (object.finishDigit != null) + message.finishDigit = String(object.finishDigit); return message; }; /** - * Creates a plain object from a TransitionRouteGroup message. Also converts values to other types if specified. + * Creates a plain object from a DtmfInput message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroup + * @memberof google.cloud.dialogflow.cx.v3.DtmfInput * @static - * @param {google.cloud.dialogflow.cx.v3.TransitionRouteGroup} message TransitionRouteGroup + * @param {google.cloud.dialogflow.cx.v3.DtmfInput} message DtmfInput * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TransitionRouteGroup.toObject = function toObject(message, options) { + DtmfInput.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.transitionRoutes = []; if (options.defaults) { - object.name = ""; - object.displayName = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.transitionRoutes && message.transitionRoutes.length) { - object.transitionRoutes = []; - for (var j = 0; j < message.transitionRoutes.length; ++j) - object.transitionRoutes[j] = $root.google.cloud.dialogflow.cx.v3.TransitionRoute.toObject(message.transitionRoutes[j], options); + object.digits = ""; + object.finishDigit = ""; } + if (message.digits != null && message.hasOwnProperty("digits")) + object.digits = message.digits; + if (message.finishDigit != null && message.hasOwnProperty("finishDigit")) + object.finishDigit = message.finishDigit; return object; }; /** - * Converts this TransitionRouteGroup to JSON. + * Converts this DtmfInput to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroup + * @memberof google.cloud.dialogflow.cx.v3.DtmfInput * @instance * @returns {Object.} JSON object */ - TransitionRouteGroup.prototype.toJSON = function toJSON() { + DtmfInput.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return TransitionRouteGroup; + return DtmfInput; })(); - v3.ListTransitionRouteGroupsRequest = (function() { + v3.Match = (function() { /** - * Properties of a ListTransitionRouteGroupsRequest. + * Properties of a Match. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IListTransitionRouteGroupsRequest - * @property {string|null} [parent] ListTransitionRouteGroupsRequest parent - * @property {number|null} [pageSize] ListTransitionRouteGroupsRequest pageSize - * @property {string|null} [pageToken] ListTransitionRouteGroupsRequest pageToken - * @property {string|null} [languageCode] ListTransitionRouteGroupsRequest languageCode + * @interface IMatch + * @property {google.cloud.dialogflow.cx.v3.IIntent|null} [intent] Match intent + * @property {string|null} [event] Match event + * @property {google.protobuf.IStruct|null} [parameters] Match parameters + * @property {string|null} [resolvedInput] Match resolvedInput + * @property {google.cloud.dialogflow.cx.v3.Match.MatchType|null} [matchType] Match matchType + * @property {number|null} [confidence] Match confidence */ /** - * Constructs a new ListTransitionRouteGroupsRequest. + * Constructs a new Match. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a ListTransitionRouteGroupsRequest. - * @implements IListTransitionRouteGroupsRequest + * @classdesc Represents a Match. + * @implements IMatch * @constructor - * @param {google.cloud.dialogflow.cx.v3.IListTransitionRouteGroupsRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IMatch=} [properties] Properties to set */ - function ListTransitionRouteGroupsRequest(properties) { + function Match(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -31113,114 +31664,140 @@ } /** - * ListTransitionRouteGroupsRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest + * Match intent. + * @member {google.cloud.dialogflow.cx.v3.IIntent|null|undefined} intent + * @memberof google.cloud.dialogflow.cx.v3.Match * @instance */ - ListTransitionRouteGroupsRequest.prototype.parent = ""; + Match.prototype.intent = null; /** - * ListTransitionRouteGroupsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest + * Match event. + * @member {string} event + * @memberof google.cloud.dialogflow.cx.v3.Match * @instance */ - ListTransitionRouteGroupsRequest.prototype.pageSize = 0; + Match.prototype.event = ""; /** - * ListTransitionRouteGroupsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest + * Match parameters. + * @member {google.protobuf.IStruct|null|undefined} parameters + * @memberof google.cloud.dialogflow.cx.v3.Match * @instance */ - ListTransitionRouteGroupsRequest.prototype.pageToken = ""; + Match.prototype.parameters = null; /** - * ListTransitionRouteGroupsRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest + * Match resolvedInput. + * @member {string} resolvedInput + * @memberof google.cloud.dialogflow.cx.v3.Match * @instance */ - ListTransitionRouteGroupsRequest.prototype.languageCode = ""; + Match.prototype.resolvedInput = ""; /** - * Creates a new ListTransitionRouteGroupsRequest instance using the specified properties. + * Match matchType. + * @member {google.cloud.dialogflow.cx.v3.Match.MatchType} matchType + * @memberof google.cloud.dialogflow.cx.v3.Match + * @instance + */ + Match.prototype.matchType = 0; + + /** + * Match confidence. + * @member {number} confidence + * @memberof google.cloud.dialogflow.cx.v3.Match + * @instance + */ + Match.prototype.confidence = 0; + + /** + * Creates a new Match instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest + * @memberof google.cloud.dialogflow.cx.v3.Match * @static - * @param {google.cloud.dialogflow.cx.v3.IListTransitionRouteGroupsRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest} ListTransitionRouteGroupsRequest instance + * @param {google.cloud.dialogflow.cx.v3.IMatch=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Match} Match instance */ - ListTransitionRouteGroupsRequest.create = function create(properties) { - return new ListTransitionRouteGroupsRequest(properties); + Match.create = function create(properties) { + return new Match(properties); }; /** - * Encodes the specified ListTransitionRouteGroupsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest.verify|verify} messages. + * Encodes the specified Match message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Match.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest + * @memberof google.cloud.dialogflow.cx.v3.Match * @static - * @param {google.cloud.dialogflow.cx.v3.IListTransitionRouteGroupsRequest} message ListTransitionRouteGroupsRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IMatch} message Match message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListTransitionRouteGroupsRequest.encode = function encode(message, writer) { + Match.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.languageCode); + if (message.intent != null && Object.hasOwnProperty.call(message, "intent")) + $root.google.cloud.dialogflow.cx.v3.Intent.encode(message.intent, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.parameters != null && Object.hasOwnProperty.call(message, "parameters")) + $root.google.protobuf.Struct.encode(message.parameters, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.resolvedInput != null && Object.hasOwnProperty.call(message, "resolvedInput")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.resolvedInput); + if (message.matchType != null && Object.hasOwnProperty.call(message, "matchType")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.matchType); + if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) + writer.uint32(/* id 5, wireType 5 =*/45).float(message.confidence); + if (message.event != null && Object.hasOwnProperty.call(message, "event")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.event); return writer; }; /** - * Encodes the specified ListTransitionRouteGroupsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest.verify|verify} messages. + * Encodes the specified Match message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Match.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest + * @memberof google.cloud.dialogflow.cx.v3.Match * @static - * @param {google.cloud.dialogflow.cx.v3.IListTransitionRouteGroupsRequest} message ListTransitionRouteGroupsRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IMatch} message Match message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListTransitionRouteGroupsRequest.encodeDelimited = function encodeDelimited(message, writer) { + Match.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListTransitionRouteGroupsRequest message from the specified reader or buffer. + * Decodes a Match message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest + * @memberof google.cloud.dialogflow.cx.v3.Match * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest} ListTransitionRouteGroupsRequest + * @returns {google.cloud.dialogflow.cx.v3.Match} Match * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListTransitionRouteGroupsRequest.decode = function decode(reader, length) { + Match.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.Match(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); + message.intent = $root.google.cloud.dialogflow.cx.v3.Intent.decode(reader, reader.uint32()); + break; + case 6: + message.event = reader.string(); break; case 2: - message.pageSize = reader.int32(); + message.parameters = $root.google.protobuf.Struct.decode(reader, reader.uint32()); break; case 3: - message.pageToken = reader.string(); + message.resolvedInput = reader.string(); break; case 4: - message.languageCode = reader.string(); + message.matchType = reader.int32(); + break; + case 5: + message.confidence = reader.float(); break; default: reader.skipType(tag & 7); @@ -31231,134 +31808,222 @@ }; /** - * Decodes a ListTransitionRouteGroupsRequest message from the specified reader or buffer, length delimited. + * Decodes a Match message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest + * @memberof google.cloud.dialogflow.cx.v3.Match * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest} ListTransitionRouteGroupsRequest + * @returns {google.cloud.dialogflow.cx.v3.Match} Match * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListTransitionRouteGroupsRequest.decodeDelimited = function decodeDelimited(reader) { + Match.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListTransitionRouteGroupsRequest message. + * Verifies a Match message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest + * @memberof google.cloud.dialogflow.cx.v3.Match * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListTransitionRouteGroupsRequest.verify = function verify(message) { + Match.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; + if (message.intent != null && message.hasOwnProperty("intent")) { + var error = $root.google.cloud.dialogflow.cx.v3.Intent.verify(message.intent); + if (error) + return "intent." + error; + } + if (message.event != null && message.hasOwnProperty("event")) + if (!$util.isString(message.event)) + return "event: string expected"; + if (message.parameters != null && message.hasOwnProperty("parameters")) { + var error = $root.google.protobuf.Struct.verify(message.parameters); + if (error) + return "parameters." + error; + } + if (message.resolvedInput != null && message.hasOwnProperty("resolvedInput")) + if (!$util.isString(message.resolvedInput)) + return "resolvedInput: string expected"; + if (message.matchType != null && message.hasOwnProperty("matchType")) + switch (message.matchType) { + default: + return "matchType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.confidence != null && message.hasOwnProperty("confidence")) + if (typeof message.confidence !== "number") + return "confidence: number expected"; return null; }; /** - * Creates a ListTransitionRouteGroupsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Match message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest + * @memberof google.cloud.dialogflow.cx.v3.Match * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest} ListTransitionRouteGroupsRequest + * @returns {google.cloud.dialogflow.cx.v3.Match} Match */ - ListTransitionRouteGroupsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest) + Match.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.Match) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.languageCode != null) - message.languageCode = String(object.languageCode); + var message = new $root.google.cloud.dialogflow.cx.v3.Match(); + if (object.intent != null) { + if (typeof object.intent !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Match.intent: object expected"); + message.intent = $root.google.cloud.dialogflow.cx.v3.Intent.fromObject(object.intent); + } + if (object.event != null) + message.event = String(object.event); + if (object.parameters != null) { + if (typeof object.parameters !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Match.parameters: object expected"); + message.parameters = $root.google.protobuf.Struct.fromObject(object.parameters); + } + if (object.resolvedInput != null) + message.resolvedInput = String(object.resolvedInput); + switch (object.matchType) { + case "MATCH_TYPE_UNSPECIFIED": + case 0: + message.matchType = 0; + break; + case "INTENT": + case 1: + message.matchType = 1; + break; + case "DIRECT_INTENT": + case 2: + message.matchType = 2; + break; + case "PARAMETER_FILLING": + case 3: + message.matchType = 3; + break; + case "NO_MATCH": + case 4: + message.matchType = 4; + break; + case "NO_INPUT": + case 5: + message.matchType = 5; + break; + case "EVENT": + case 6: + message.matchType = 6; + break; + } + if (object.confidence != null) + message.confidence = Number(object.confidence); return message; }; /** - * Creates a plain object from a ListTransitionRouteGroupsRequest message. Also converts values to other types if specified. + * Creates a plain object from a Match message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest + * @memberof google.cloud.dialogflow.cx.v3.Match * @static - * @param {google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest} message ListTransitionRouteGroupsRequest + * @param {google.cloud.dialogflow.cx.v3.Match} message Match * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListTransitionRouteGroupsRequest.toObject = function toObject(message, options) { + Match.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.languageCode = ""; + object.intent = null; + object.parameters = null; + object.resolvedInput = ""; + object.matchType = options.enums === String ? "MATCH_TYPE_UNSPECIFIED" : 0; + object.confidence = 0; + object.event = ""; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; + if (message.intent != null && message.hasOwnProperty("intent")) + object.intent = $root.google.cloud.dialogflow.cx.v3.Intent.toObject(message.intent, options); + if (message.parameters != null && message.hasOwnProperty("parameters")) + object.parameters = $root.google.protobuf.Struct.toObject(message.parameters, options); + if (message.resolvedInput != null && message.hasOwnProperty("resolvedInput")) + object.resolvedInput = message.resolvedInput; + if (message.matchType != null && message.hasOwnProperty("matchType")) + object.matchType = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.Match.MatchType[message.matchType] : message.matchType; + if (message.confidence != null && message.hasOwnProperty("confidence")) + object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence; + if (message.event != null && message.hasOwnProperty("event")) + object.event = message.event; return object; }; /** - * Converts this ListTransitionRouteGroupsRequest to JSON. + * Converts this Match to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest + * @memberof google.cloud.dialogflow.cx.v3.Match * @instance * @returns {Object.} JSON object */ - ListTransitionRouteGroupsRequest.prototype.toJSON = function toJSON() { + Match.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListTransitionRouteGroupsRequest; + /** + * MatchType enum. + * @name google.cloud.dialogflow.cx.v3.Match.MatchType + * @enum {number} + * @property {number} MATCH_TYPE_UNSPECIFIED=0 MATCH_TYPE_UNSPECIFIED value + * @property {number} INTENT=1 INTENT value + * @property {number} DIRECT_INTENT=2 DIRECT_INTENT value + * @property {number} PARAMETER_FILLING=3 PARAMETER_FILLING value + * @property {number} NO_MATCH=4 NO_MATCH value + * @property {number} NO_INPUT=5 NO_INPUT value + * @property {number} EVENT=6 EVENT value + */ + Match.MatchType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MATCH_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "INTENT"] = 1; + values[valuesById[2] = "DIRECT_INTENT"] = 2; + values[valuesById[3] = "PARAMETER_FILLING"] = 3; + values[valuesById[4] = "NO_MATCH"] = 4; + values[valuesById[5] = "NO_INPUT"] = 5; + values[valuesById[6] = "EVENT"] = 6; + return values; + })(); + + return Match; })(); - v3.ListTransitionRouteGroupsResponse = (function() { + v3.MatchIntentRequest = (function() { /** - * Properties of a ListTransitionRouteGroupsResponse. + * Properties of a MatchIntentRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IListTransitionRouteGroupsResponse - * @property {Array.|null} [transitionRouteGroups] ListTransitionRouteGroupsResponse transitionRouteGroups - * @property {string|null} [nextPageToken] ListTransitionRouteGroupsResponse nextPageToken + * @interface IMatchIntentRequest + * @property {string|null} [session] MatchIntentRequest session + * @property {google.cloud.dialogflow.cx.v3.IQueryParameters|null} [queryParams] MatchIntentRequest queryParams + * @property {google.cloud.dialogflow.cx.v3.IQueryInput|null} [queryInput] MatchIntentRequest queryInput */ /** - * Constructs a new ListTransitionRouteGroupsResponse. + * Constructs a new MatchIntentRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a ListTransitionRouteGroupsResponse. - * @implements IListTransitionRouteGroupsResponse + * @classdesc Represents a MatchIntentRequest. + * @implements IMatchIntentRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IListTransitionRouteGroupsResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IMatchIntentRequest=} [properties] Properties to set */ - function ListTransitionRouteGroupsResponse(properties) { - this.transitionRouteGroups = []; + function MatchIntentRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -31366,91 +32031,101 @@ } /** - * ListTransitionRouteGroupsResponse transitionRouteGroups. - * @member {Array.} transitionRouteGroups - * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse + * MatchIntentRequest session. + * @member {string} session + * @memberof google.cloud.dialogflow.cx.v3.MatchIntentRequest * @instance */ - ListTransitionRouteGroupsResponse.prototype.transitionRouteGroups = $util.emptyArray; + MatchIntentRequest.prototype.session = ""; /** - * ListTransitionRouteGroupsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse + * MatchIntentRequest queryParams. + * @member {google.cloud.dialogflow.cx.v3.IQueryParameters|null|undefined} queryParams + * @memberof google.cloud.dialogflow.cx.v3.MatchIntentRequest * @instance */ - ListTransitionRouteGroupsResponse.prototype.nextPageToken = ""; + MatchIntentRequest.prototype.queryParams = null; /** - * Creates a new ListTransitionRouteGroupsResponse instance using the specified properties. + * MatchIntentRequest queryInput. + * @member {google.cloud.dialogflow.cx.v3.IQueryInput|null|undefined} queryInput + * @memberof google.cloud.dialogflow.cx.v3.MatchIntentRequest + * @instance + */ + MatchIntentRequest.prototype.queryInput = null; + + /** + * Creates a new MatchIntentRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse + * @memberof google.cloud.dialogflow.cx.v3.MatchIntentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IListTransitionRouteGroupsResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse} ListTransitionRouteGroupsResponse instance + * @param {google.cloud.dialogflow.cx.v3.IMatchIntentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.MatchIntentRequest} MatchIntentRequest instance */ - ListTransitionRouteGroupsResponse.create = function create(properties) { - return new ListTransitionRouteGroupsResponse(properties); + MatchIntentRequest.create = function create(properties) { + return new MatchIntentRequest(properties); }; /** - * Encodes the specified ListTransitionRouteGroupsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse.verify|verify} messages. + * Encodes the specified MatchIntentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.MatchIntentRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse + * @memberof google.cloud.dialogflow.cx.v3.MatchIntentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IListTransitionRouteGroupsResponse} message ListTransitionRouteGroupsResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IMatchIntentRequest} message MatchIntentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListTransitionRouteGroupsResponse.encode = function encode(message, writer) { + MatchIntentRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.transitionRouteGroups != null && message.transitionRouteGroups.length) - for (var i = 0; i < message.transitionRouteGroups.length; ++i) - $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup.encode(message.transitionRouteGroups[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.session != null && Object.hasOwnProperty.call(message, "session")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.session); + if (message.queryParams != null && Object.hasOwnProperty.call(message, "queryParams")) + $root.google.cloud.dialogflow.cx.v3.QueryParameters.encode(message.queryParams, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.queryInput != null && Object.hasOwnProperty.call(message, "queryInput")) + $root.google.cloud.dialogflow.cx.v3.QueryInput.encode(message.queryInput, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListTransitionRouteGroupsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse.verify|verify} messages. + * Encodes the specified MatchIntentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.MatchIntentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse + * @memberof google.cloud.dialogflow.cx.v3.MatchIntentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IListTransitionRouteGroupsResponse} message ListTransitionRouteGroupsResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IMatchIntentRequest} message MatchIntentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListTransitionRouteGroupsResponse.encodeDelimited = function encodeDelimited(message, writer) { + MatchIntentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListTransitionRouteGroupsResponse message from the specified reader or buffer. + * Decodes a MatchIntentRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse + * @memberof google.cloud.dialogflow.cx.v3.MatchIntentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse} ListTransitionRouteGroupsResponse + * @returns {google.cloud.dialogflow.cx.v3.MatchIntentRequest} MatchIntentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListTransitionRouteGroupsResponse.decode = function decode(reader, length) { + MatchIntentRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.MatchIntentRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.transitionRouteGroups && message.transitionRouteGroups.length)) - message.transitionRouteGroups = []; - message.transitionRouteGroups.push($root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup.decode(reader, reader.uint32())); + message.session = reader.string(); break; case 2: - message.nextPageToken = reader.string(); + message.queryParams = $root.google.cloud.dialogflow.cx.v3.QueryParameters.decode(reader, reader.uint32()); + break; + case 3: + message.queryInput = $root.google.cloud.dialogflow.cx.v3.QueryInput.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -31461,134 +32136,140 @@ }; /** - * Decodes a ListTransitionRouteGroupsResponse message from the specified reader or buffer, length delimited. + * Decodes a MatchIntentRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse + * @memberof google.cloud.dialogflow.cx.v3.MatchIntentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse} ListTransitionRouteGroupsResponse + * @returns {google.cloud.dialogflow.cx.v3.MatchIntentRequest} MatchIntentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListTransitionRouteGroupsResponse.decodeDelimited = function decodeDelimited(reader) { + MatchIntentRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListTransitionRouteGroupsResponse message. + * Verifies a MatchIntentRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse + * @memberof google.cloud.dialogflow.cx.v3.MatchIntentRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListTransitionRouteGroupsResponse.verify = function verify(message) { + MatchIntentRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.transitionRouteGroups != null && message.hasOwnProperty("transitionRouteGroups")) { - if (!Array.isArray(message.transitionRouteGroups)) - return "transitionRouteGroups: array expected"; - for (var i = 0; i < message.transitionRouteGroups.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup.verify(message.transitionRouteGroups[i]); - if (error) - return "transitionRouteGroups." + error; - } + if (message.session != null && message.hasOwnProperty("session")) + if (!$util.isString(message.session)) + return "session: string expected"; + if (message.queryParams != null && message.hasOwnProperty("queryParams")) { + var error = $root.google.cloud.dialogflow.cx.v3.QueryParameters.verify(message.queryParams); + if (error) + return "queryParams." + error; + } + if (message.queryInput != null && message.hasOwnProperty("queryInput")) { + var error = $root.google.cloud.dialogflow.cx.v3.QueryInput.verify(message.queryInput); + if (error) + return "queryInput." + error; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; return null; }; /** - * Creates a ListTransitionRouteGroupsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a MatchIntentRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse + * @memberof google.cloud.dialogflow.cx.v3.MatchIntentRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse} ListTransitionRouteGroupsResponse + * @returns {google.cloud.dialogflow.cx.v3.MatchIntentRequest} MatchIntentRequest */ - ListTransitionRouteGroupsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse) + MatchIntentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.MatchIntentRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse(); - if (object.transitionRouteGroups) { - if (!Array.isArray(object.transitionRouteGroups)) - throw TypeError(".google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse.transitionRouteGroups: array expected"); - message.transitionRouteGroups = []; - for (var i = 0; i < object.transitionRouteGroups.length; ++i) { - if (typeof object.transitionRouteGroups[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse.transitionRouteGroups: object expected"); - message.transitionRouteGroups[i] = $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup.fromObject(object.transitionRouteGroups[i]); - } + var message = new $root.google.cloud.dialogflow.cx.v3.MatchIntentRequest(); + if (object.session != null) + message.session = String(object.session); + if (object.queryParams != null) { + if (typeof object.queryParams !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.MatchIntentRequest.queryParams: object expected"); + message.queryParams = $root.google.cloud.dialogflow.cx.v3.QueryParameters.fromObject(object.queryParams); + } + if (object.queryInput != null) { + if (typeof object.queryInput !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.MatchIntentRequest.queryInput: object expected"); + message.queryInput = $root.google.cloud.dialogflow.cx.v3.QueryInput.fromObject(object.queryInput); } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a ListTransitionRouteGroupsResponse message. Also converts values to other types if specified. + * Creates a plain object from a MatchIntentRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse + * @memberof google.cloud.dialogflow.cx.v3.MatchIntentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse} message ListTransitionRouteGroupsResponse + * @param {google.cloud.dialogflow.cx.v3.MatchIntentRequest} message MatchIntentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListTransitionRouteGroupsResponse.toObject = function toObject(message, options) { + MatchIntentRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.transitionRouteGroups = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.transitionRouteGroups && message.transitionRouteGroups.length) { - object.transitionRouteGroups = []; - for (var j = 0; j < message.transitionRouteGroups.length; ++j) - object.transitionRouteGroups[j] = $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup.toObject(message.transitionRouteGroups[j], options); + if (options.defaults) { + object.session = ""; + object.queryParams = null; + object.queryInput = null; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + if (message.session != null && message.hasOwnProperty("session")) + object.session = message.session; + if (message.queryParams != null && message.hasOwnProperty("queryParams")) + object.queryParams = $root.google.cloud.dialogflow.cx.v3.QueryParameters.toObject(message.queryParams, options); + if (message.queryInput != null && message.hasOwnProperty("queryInput")) + object.queryInput = $root.google.cloud.dialogflow.cx.v3.QueryInput.toObject(message.queryInput, options); return object; }; /** - * Converts this ListTransitionRouteGroupsResponse to JSON. + * Converts this MatchIntentRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse + * @memberof google.cloud.dialogflow.cx.v3.MatchIntentRequest * @instance * @returns {Object.} JSON object */ - ListTransitionRouteGroupsResponse.prototype.toJSON = function toJSON() { + MatchIntentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListTransitionRouteGroupsResponse; + return MatchIntentRequest; })(); - v3.GetTransitionRouteGroupRequest = (function() { + v3.MatchIntentResponse = (function() { /** - * Properties of a GetTransitionRouteGroupRequest. + * Properties of a MatchIntentResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IGetTransitionRouteGroupRequest - * @property {string|null} [name] GetTransitionRouteGroupRequest name - * @property {string|null} [languageCode] GetTransitionRouteGroupRequest languageCode + * @interface IMatchIntentResponse + * @property {string|null} [text] MatchIntentResponse text + * @property {string|null} [triggerIntent] MatchIntentResponse triggerIntent + * @property {string|null} [transcript] MatchIntentResponse transcript + * @property {string|null} [triggerEvent] MatchIntentResponse triggerEvent + * @property {Array.|null} [matches] MatchIntentResponse matches + * @property {google.cloud.dialogflow.cx.v3.IPage|null} [currentPage] MatchIntentResponse currentPage */ /** - * Constructs a new GetTransitionRouteGroupRequest. + * Constructs a new MatchIntentResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a GetTransitionRouteGroupRequest. - * @implements IGetTransitionRouteGroupRequest + * @classdesc Represents a MatchIntentResponse. + * @implements IMatchIntentResponse * @constructor - * @param {google.cloud.dialogflow.cx.v3.IGetTransitionRouteGroupRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IMatchIntentResponse=} [properties] Properties to set */ - function GetTransitionRouteGroupRequest(properties) { + function MatchIntentResponse(properties) { + this.matches = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -31596,88 +32277,157 @@ } /** - * GetTransitionRouteGroupRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest + * MatchIntentResponse text. + * @member {string} text + * @memberof google.cloud.dialogflow.cx.v3.MatchIntentResponse * @instance */ - GetTransitionRouteGroupRequest.prototype.name = ""; + MatchIntentResponse.prototype.text = ""; /** - * GetTransitionRouteGroupRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest + * MatchIntentResponse triggerIntent. + * @member {string} triggerIntent + * @memberof google.cloud.dialogflow.cx.v3.MatchIntentResponse * @instance */ - GetTransitionRouteGroupRequest.prototype.languageCode = ""; + MatchIntentResponse.prototype.triggerIntent = ""; /** - * Creates a new GetTransitionRouteGroupRequest instance using the specified properties. + * MatchIntentResponse transcript. + * @member {string} transcript + * @memberof google.cloud.dialogflow.cx.v3.MatchIntentResponse + * @instance + */ + MatchIntentResponse.prototype.transcript = ""; + + /** + * MatchIntentResponse triggerEvent. + * @member {string} triggerEvent + * @memberof google.cloud.dialogflow.cx.v3.MatchIntentResponse + * @instance + */ + MatchIntentResponse.prototype.triggerEvent = ""; + + /** + * MatchIntentResponse matches. + * @member {Array.} matches + * @memberof google.cloud.dialogflow.cx.v3.MatchIntentResponse + * @instance + */ + MatchIntentResponse.prototype.matches = $util.emptyArray; + + /** + * MatchIntentResponse currentPage. + * @member {google.cloud.dialogflow.cx.v3.IPage|null|undefined} currentPage + * @memberof google.cloud.dialogflow.cx.v3.MatchIntentResponse + * @instance + */ + MatchIntentResponse.prototype.currentPage = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * MatchIntentResponse query. + * @member {"text"|"triggerIntent"|"transcript"|"triggerEvent"|undefined} query + * @memberof google.cloud.dialogflow.cx.v3.MatchIntentResponse + * @instance + */ + Object.defineProperty(MatchIntentResponse.prototype, "query", { + get: $util.oneOfGetter($oneOfFields = ["text", "triggerIntent", "transcript", "triggerEvent"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new MatchIntentResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest + * @memberof google.cloud.dialogflow.cx.v3.MatchIntentResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IGetTransitionRouteGroupRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest} GetTransitionRouteGroupRequest instance + * @param {google.cloud.dialogflow.cx.v3.IMatchIntentResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.MatchIntentResponse} MatchIntentResponse instance */ - GetTransitionRouteGroupRequest.create = function create(properties) { - return new GetTransitionRouteGroupRequest(properties); + MatchIntentResponse.create = function create(properties) { + return new MatchIntentResponse(properties); }; /** - * Encodes the specified GetTransitionRouteGroupRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest.verify|verify} messages. + * Encodes the specified MatchIntentResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.MatchIntentResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest + * @memberof google.cloud.dialogflow.cx.v3.MatchIntentResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IGetTransitionRouteGroupRequest} message GetTransitionRouteGroupRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IMatchIntentResponse} message MatchIntentResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetTransitionRouteGroupRequest.encode = function encode(message, writer) { + MatchIntentResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); + if (message.text != null && Object.hasOwnProperty.call(message, "text")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.text); + if (message.triggerIntent != null && Object.hasOwnProperty.call(message, "triggerIntent")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.triggerIntent); + if (message.transcript != null && Object.hasOwnProperty.call(message, "transcript")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.transcript); + if (message.matches != null && message.matches.length) + for (var i = 0; i < message.matches.length; ++i) + $root.google.cloud.dialogflow.cx.v3.Match.encode(message.matches[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.currentPage != null && Object.hasOwnProperty.call(message, "currentPage")) + $root.google.cloud.dialogflow.cx.v3.Page.encode(message.currentPage, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.triggerEvent != null && Object.hasOwnProperty.call(message, "triggerEvent")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.triggerEvent); return writer; }; /** - * Encodes the specified GetTransitionRouteGroupRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest.verify|verify} messages. + * Encodes the specified MatchIntentResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.MatchIntentResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest + * @memberof google.cloud.dialogflow.cx.v3.MatchIntentResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IGetTransitionRouteGroupRequest} message GetTransitionRouteGroupRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IMatchIntentResponse} message MatchIntentResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetTransitionRouteGroupRequest.encodeDelimited = function encodeDelimited(message, writer) { + MatchIntentResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetTransitionRouteGroupRequest message from the specified reader or buffer. + * Decodes a MatchIntentResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest + * @memberof google.cloud.dialogflow.cx.v3.MatchIntentResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest} GetTransitionRouteGroupRequest + * @returns {google.cloud.dialogflow.cx.v3.MatchIntentResponse} MatchIntentResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetTransitionRouteGroupRequest.decode = function decode(reader, length) { + MatchIntentResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.MatchIntentResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.text = reader.string(); break; case 2: - message.languageCode = reader.string(); + message.triggerIntent = reader.string(); + break; + case 3: + message.transcript = reader.string(); + break; + case 6: + message.triggerEvent = reader.string(); + break; + case 4: + if (!(message.matches && message.matches.length)) + message.matches = []; + message.matches.push($root.google.cloud.dialogflow.cx.v3.Match.decode(reader, reader.uint32())); + break; + case 5: + message.currentPage = $root.google.cloud.dialogflow.cx.v3.Page.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -31688,118 +32438,195 @@ }; /** - * Decodes a GetTransitionRouteGroupRequest message from the specified reader or buffer, length delimited. + * Decodes a MatchIntentResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest + * @memberof google.cloud.dialogflow.cx.v3.MatchIntentResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest} GetTransitionRouteGroupRequest + * @returns {google.cloud.dialogflow.cx.v3.MatchIntentResponse} MatchIntentResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetTransitionRouteGroupRequest.decodeDelimited = function decodeDelimited(reader) { + MatchIntentResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetTransitionRouteGroupRequest message. + * Verifies a MatchIntentResponse message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest + * @memberof google.cloud.dialogflow.cx.v3.MatchIntentResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetTransitionRouteGroupRequest.verify = function verify(message) { + MatchIntentResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; + var properties = {}; + if (message.text != null && message.hasOwnProperty("text")) { + properties.query = 1; + if (!$util.isString(message.text)) + return "text: string expected"; + } + if (message.triggerIntent != null && message.hasOwnProperty("triggerIntent")) { + if (properties.query === 1) + return "query: multiple values"; + properties.query = 1; + if (!$util.isString(message.triggerIntent)) + return "triggerIntent: string expected"; + } + if (message.transcript != null && message.hasOwnProperty("transcript")) { + if (properties.query === 1) + return "query: multiple values"; + properties.query = 1; + if (!$util.isString(message.transcript)) + return "transcript: string expected"; + } + if (message.triggerEvent != null && message.hasOwnProperty("triggerEvent")) { + if (properties.query === 1) + return "query: multiple values"; + properties.query = 1; + if (!$util.isString(message.triggerEvent)) + return "triggerEvent: string expected"; + } + if (message.matches != null && message.hasOwnProperty("matches")) { + if (!Array.isArray(message.matches)) + return "matches: array expected"; + for (var i = 0; i < message.matches.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.Match.verify(message.matches[i]); + if (error) + return "matches." + error; + } + } + if (message.currentPage != null && message.hasOwnProperty("currentPage")) { + var error = $root.google.cloud.dialogflow.cx.v3.Page.verify(message.currentPage); + if (error) + return "currentPage." + error; + } return null; }; /** - * Creates a GetTransitionRouteGroupRequest message from a plain object. Also converts values to their respective internal types. + * Creates a MatchIntentResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest + * @memberof google.cloud.dialogflow.cx.v3.MatchIntentResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest} GetTransitionRouteGroupRequest + * @returns {google.cloud.dialogflow.cx.v3.MatchIntentResponse} MatchIntentResponse */ - GetTransitionRouteGroupRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest) + MatchIntentResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.MatchIntentResponse) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.languageCode != null) - message.languageCode = String(object.languageCode); + var message = new $root.google.cloud.dialogflow.cx.v3.MatchIntentResponse(); + if (object.text != null) + message.text = String(object.text); + if (object.triggerIntent != null) + message.triggerIntent = String(object.triggerIntent); + if (object.transcript != null) + message.transcript = String(object.transcript); + if (object.triggerEvent != null) + message.triggerEvent = String(object.triggerEvent); + if (object.matches) { + if (!Array.isArray(object.matches)) + throw TypeError(".google.cloud.dialogflow.cx.v3.MatchIntentResponse.matches: array expected"); + message.matches = []; + for (var i = 0; i < object.matches.length; ++i) { + if (typeof object.matches[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.MatchIntentResponse.matches: object expected"); + message.matches[i] = $root.google.cloud.dialogflow.cx.v3.Match.fromObject(object.matches[i]); + } + } + if (object.currentPage != null) { + if (typeof object.currentPage !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.MatchIntentResponse.currentPage: object expected"); + message.currentPage = $root.google.cloud.dialogflow.cx.v3.Page.fromObject(object.currentPage); + } return message; }; /** - * Creates a plain object from a GetTransitionRouteGroupRequest message. Also converts values to other types if specified. + * Creates a plain object from a MatchIntentResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest + * @memberof google.cloud.dialogflow.cx.v3.MatchIntentResponse * @static - * @param {google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest} message GetTransitionRouteGroupRequest + * @param {google.cloud.dialogflow.cx.v3.MatchIntentResponse} message MatchIntentResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetTransitionRouteGroupRequest.toObject = function toObject(message, options) { + MatchIntentResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.languageCode = ""; + if (options.arrays || options.defaults) + object.matches = []; + if (options.defaults) + object.currentPage = null; + if (message.text != null && message.hasOwnProperty("text")) { + object.text = message.text; + if (options.oneofs) + object.query = "text"; + } + if (message.triggerIntent != null && message.hasOwnProperty("triggerIntent")) { + object.triggerIntent = message.triggerIntent; + if (options.oneofs) + object.query = "triggerIntent"; + } + if (message.transcript != null && message.hasOwnProperty("transcript")) { + object.transcript = message.transcript; + if (options.oneofs) + object.query = "transcript"; + } + if (message.matches && message.matches.length) { + object.matches = []; + for (var j = 0; j < message.matches.length; ++j) + object.matches[j] = $root.google.cloud.dialogflow.cx.v3.Match.toObject(message.matches[j], options); + } + if (message.currentPage != null && message.hasOwnProperty("currentPage")) + object.currentPage = $root.google.cloud.dialogflow.cx.v3.Page.toObject(message.currentPage, options); + if (message.triggerEvent != null && message.hasOwnProperty("triggerEvent")) { + object.triggerEvent = message.triggerEvent; + if (options.oneofs) + object.query = "triggerEvent"; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; return object; }; /** - * Converts this GetTransitionRouteGroupRequest to JSON. + * Converts this MatchIntentResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest + * @memberof google.cloud.dialogflow.cx.v3.MatchIntentResponse * @instance * @returns {Object.} JSON object */ - GetTransitionRouteGroupRequest.prototype.toJSON = function toJSON() { + MatchIntentResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetTransitionRouteGroupRequest; + return MatchIntentResponse; })(); - v3.CreateTransitionRouteGroupRequest = (function() { + v3.FulfillIntentRequest = (function() { /** - * Properties of a CreateTransitionRouteGroupRequest. + * Properties of a FulfillIntentRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface ICreateTransitionRouteGroupRequest - * @property {string|null} [parent] CreateTransitionRouteGroupRequest parent - * @property {google.cloud.dialogflow.cx.v3.ITransitionRouteGroup|null} [transitionRouteGroup] CreateTransitionRouteGroupRequest transitionRouteGroup - * @property {string|null} [languageCode] CreateTransitionRouteGroupRequest languageCode + * @interface IFulfillIntentRequest + * @property {google.cloud.dialogflow.cx.v3.IMatchIntentRequest|null} [matchIntentRequest] FulfillIntentRequest matchIntentRequest + * @property {google.cloud.dialogflow.cx.v3.IMatch|null} [match] FulfillIntentRequest match + * @property {google.cloud.dialogflow.cx.v3.IOutputAudioConfig|null} [outputAudioConfig] FulfillIntentRequest outputAudioConfig */ /** - * Constructs a new CreateTransitionRouteGroupRequest. + * Constructs a new FulfillIntentRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a CreateTransitionRouteGroupRequest. - * @implements ICreateTransitionRouteGroupRequest + * @classdesc Represents a FulfillIntentRequest. + * @implements IFulfillIntentRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.ICreateTransitionRouteGroupRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IFulfillIntentRequest=} [properties] Properties to set */ - function CreateTransitionRouteGroupRequest(properties) { + function FulfillIntentRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -31807,101 +32634,101 @@ } /** - * CreateTransitionRouteGroupRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest + * FulfillIntentRequest matchIntentRequest. + * @member {google.cloud.dialogflow.cx.v3.IMatchIntentRequest|null|undefined} matchIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentRequest * @instance */ - CreateTransitionRouteGroupRequest.prototype.parent = ""; + FulfillIntentRequest.prototype.matchIntentRequest = null; /** - * CreateTransitionRouteGroupRequest transitionRouteGroup. - * @member {google.cloud.dialogflow.cx.v3.ITransitionRouteGroup|null|undefined} transitionRouteGroup - * @memberof google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest + * FulfillIntentRequest match. + * @member {google.cloud.dialogflow.cx.v3.IMatch|null|undefined} match + * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentRequest * @instance */ - CreateTransitionRouteGroupRequest.prototype.transitionRouteGroup = null; + FulfillIntentRequest.prototype.match = null; /** - * CreateTransitionRouteGroupRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest + * FulfillIntentRequest outputAudioConfig. + * @member {google.cloud.dialogflow.cx.v3.IOutputAudioConfig|null|undefined} outputAudioConfig + * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentRequest * @instance */ - CreateTransitionRouteGroupRequest.prototype.languageCode = ""; + FulfillIntentRequest.prototype.outputAudioConfig = null; /** - * Creates a new CreateTransitionRouteGroupRequest instance using the specified properties. + * Creates a new FulfillIntentRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest + * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.ICreateTransitionRouteGroupRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest} CreateTransitionRouteGroupRequest instance + * @param {google.cloud.dialogflow.cx.v3.IFulfillIntentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.FulfillIntentRequest} FulfillIntentRequest instance */ - CreateTransitionRouteGroupRequest.create = function create(properties) { - return new CreateTransitionRouteGroupRequest(properties); + FulfillIntentRequest.create = function create(properties) { + return new FulfillIntentRequest(properties); }; /** - * Encodes the specified CreateTransitionRouteGroupRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest.verify|verify} messages. + * Encodes the specified FulfillIntentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.FulfillIntentRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest + * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.ICreateTransitionRouteGroupRequest} message CreateTransitionRouteGroupRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IFulfillIntentRequest} message FulfillIntentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateTransitionRouteGroupRequest.encode = function encode(message, writer) { + FulfillIntentRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.transitionRouteGroup != null && Object.hasOwnProperty.call(message, "transitionRouteGroup")) - $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup.encode(message.transitionRouteGroup, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.languageCode); + if (message.matchIntentRequest != null && Object.hasOwnProperty.call(message, "matchIntentRequest")) + $root.google.cloud.dialogflow.cx.v3.MatchIntentRequest.encode(message.matchIntentRequest, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.match != null && Object.hasOwnProperty.call(message, "match")) + $root.google.cloud.dialogflow.cx.v3.Match.encode(message.match, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.outputAudioConfig != null && Object.hasOwnProperty.call(message, "outputAudioConfig")) + $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.encode(message.outputAudioConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified CreateTransitionRouteGroupRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest.verify|verify} messages. + * Encodes the specified FulfillIntentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.FulfillIntentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest + * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.ICreateTransitionRouteGroupRequest} message CreateTransitionRouteGroupRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IFulfillIntentRequest} message FulfillIntentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateTransitionRouteGroupRequest.encodeDelimited = function encodeDelimited(message, writer) { + FulfillIntentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateTransitionRouteGroupRequest message from the specified reader or buffer. + * Decodes a FulfillIntentRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest + * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest} CreateTransitionRouteGroupRequest + * @returns {google.cloud.dialogflow.cx.v3.FulfillIntentRequest} FulfillIntentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateTransitionRouteGroupRequest.decode = function decode(reader, length) { + FulfillIntentRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.FulfillIntentRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); + message.matchIntentRequest = $root.google.cloud.dialogflow.cx.v3.MatchIntentRequest.decode(reader, reader.uint32()); break; case 2: - message.transitionRouteGroup = $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup.decode(reader, reader.uint32()); + message.match = $root.google.cloud.dialogflow.cx.v3.Match.decode(reader, reader.uint32()); break; case 3: - message.languageCode = reader.string(); + message.outputAudioConfig = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -31912,131 +32739,142 @@ }; /** - * Decodes a CreateTransitionRouteGroupRequest message from the specified reader or buffer, length delimited. + * Decodes a FulfillIntentRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest + * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest} CreateTransitionRouteGroupRequest + * @returns {google.cloud.dialogflow.cx.v3.FulfillIntentRequest} FulfillIntentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateTransitionRouteGroupRequest.decodeDelimited = function decodeDelimited(reader) { + FulfillIntentRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateTransitionRouteGroupRequest message. + * Verifies a FulfillIntentRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest + * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateTransitionRouteGroupRequest.verify = function verify(message) { + FulfillIntentRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.transitionRouteGroup != null && message.hasOwnProperty("transitionRouteGroup")) { - var error = $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup.verify(message.transitionRouteGroup); + if (message.matchIntentRequest != null && message.hasOwnProperty("matchIntentRequest")) { + var error = $root.google.cloud.dialogflow.cx.v3.MatchIntentRequest.verify(message.matchIntentRequest); if (error) - return "transitionRouteGroup." + error; + return "matchIntentRequest." + error; + } + if (message.match != null && message.hasOwnProperty("match")) { + var error = $root.google.cloud.dialogflow.cx.v3.Match.verify(message.match); + if (error) + return "match." + error; + } + if (message.outputAudioConfig != null && message.hasOwnProperty("outputAudioConfig")) { + var error = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.verify(message.outputAudioConfig); + if (error) + return "outputAudioConfig." + error; } - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; return null; }; /** - * Creates a CreateTransitionRouteGroupRequest message from a plain object. Also converts values to their respective internal types. + * Creates a FulfillIntentRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest + * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest} CreateTransitionRouteGroupRequest + * @returns {google.cloud.dialogflow.cx.v3.FulfillIntentRequest} FulfillIntentRequest */ - CreateTransitionRouteGroupRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest) + FulfillIntentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.FulfillIntentRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.transitionRouteGroup != null) { - if (typeof object.transitionRouteGroup !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest.transitionRouteGroup: object expected"); - message.transitionRouteGroup = $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup.fromObject(object.transitionRouteGroup); + var message = new $root.google.cloud.dialogflow.cx.v3.FulfillIntentRequest(); + if (object.matchIntentRequest != null) { + if (typeof object.matchIntentRequest !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.FulfillIntentRequest.matchIntentRequest: object expected"); + message.matchIntentRequest = $root.google.cloud.dialogflow.cx.v3.MatchIntentRequest.fromObject(object.matchIntentRequest); + } + if (object.match != null) { + if (typeof object.match !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.FulfillIntentRequest.match: object expected"); + message.match = $root.google.cloud.dialogflow.cx.v3.Match.fromObject(object.match); + } + if (object.outputAudioConfig != null) { + if (typeof object.outputAudioConfig !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.FulfillIntentRequest.outputAudioConfig: object expected"); + message.outputAudioConfig = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.fromObject(object.outputAudioConfig); } - if (object.languageCode != null) - message.languageCode = String(object.languageCode); return message; }; /** - * Creates a plain object from a CreateTransitionRouteGroupRequest message. Also converts values to other types if specified. + * Creates a plain object from a FulfillIntentRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest + * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest} message CreateTransitionRouteGroupRequest + * @param {google.cloud.dialogflow.cx.v3.FulfillIntentRequest} message FulfillIntentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateTransitionRouteGroupRequest.toObject = function toObject(message, options) { + FulfillIntentRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.transitionRouteGroup = null; - object.languageCode = ""; + object.matchIntentRequest = null; + object.match = null; + object.outputAudioConfig = null; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.transitionRouteGroup != null && message.hasOwnProperty("transitionRouteGroup")) - object.transitionRouteGroup = $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup.toObject(message.transitionRouteGroup, options); - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; + if (message.matchIntentRequest != null && message.hasOwnProperty("matchIntentRequest")) + object.matchIntentRequest = $root.google.cloud.dialogflow.cx.v3.MatchIntentRequest.toObject(message.matchIntentRequest, options); + if (message.match != null && message.hasOwnProperty("match")) + object.match = $root.google.cloud.dialogflow.cx.v3.Match.toObject(message.match, options); + if (message.outputAudioConfig != null && message.hasOwnProperty("outputAudioConfig")) + object.outputAudioConfig = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.toObject(message.outputAudioConfig, options); return object; }; /** - * Converts this CreateTransitionRouteGroupRequest to JSON. + * Converts this FulfillIntentRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest + * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentRequest * @instance * @returns {Object.} JSON object */ - CreateTransitionRouteGroupRequest.prototype.toJSON = function toJSON() { + FulfillIntentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CreateTransitionRouteGroupRequest; + return FulfillIntentRequest; })(); - v3.UpdateTransitionRouteGroupRequest = (function() { + v3.FulfillIntentResponse = (function() { /** - * Properties of an UpdateTransitionRouteGroupRequest. + * Properties of a FulfillIntentResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IUpdateTransitionRouteGroupRequest - * @property {google.cloud.dialogflow.cx.v3.ITransitionRouteGroup|null} [transitionRouteGroup] UpdateTransitionRouteGroupRequest transitionRouteGroup - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateTransitionRouteGroupRequest updateMask - * @property {string|null} [languageCode] UpdateTransitionRouteGroupRequest languageCode + * @interface IFulfillIntentResponse + * @property {string|null} [responseId] FulfillIntentResponse responseId + * @property {google.cloud.dialogflow.cx.v3.IQueryResult|null} [queryResult] FulfillIntentResponse queryResult + * @property {Uint8Array|null} [outputAudio] FulfillIntentResponse outputAudio + * @property {google.cloud.dialogflow.cx.v3.IOutputAudioConfig|null} [outputAudioConfig] FulfillIntentResponse outputAudioConfig */ /** - * Constructs a new UpdateTransitionRouteGroupRequest. + * Constructs a new FulfillIntentResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents an UpdateTransitionRouteGroupRequest. - * @implements IUpdateTransitionRouteGroupRequest + * @classdesc Represents a FulfillIntentResponse. + * @implements IFulfillIntentResponse * @constructor - * @param {google.cloud.dialogflow.cx.v3.IUpdateTransitionRouteGroupRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IFulfillIntentResponse=} [properties] Properties to set */ - function UpdateTransitionRouteGroupRequest(properties) { + function FulfillIntentResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -32044,101 +32882,114 @@ } /** - * UpdateTransitionRouteGroupRequest transitionRouteGroup. - * @member {google.cloud.dialogflow.cx.v3.ITransitionRouteGroup|null|undefined} transitionRouteGroup - * @memberof google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest + * FulfillIntentResponse responseId. + * @member {string} responseId + * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentResponse * @instance */ - UpdateTransitionRouteGroupRequest.prototype.transitionRouteGroup = null; + FulfillIntentResponse.prototype.responseId = ""; /** - * UpdateTransitionRouteGroupRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest + * FulfillIntentResponse queryResult. + * @member {google.cloud.dialogflow.cx.v3.IQueryResult|null|undefined} queryResult + * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentResponse * @instance */ - UpdateTransitionRouteGroupRequest.prototype.updateMask = null; + FulfillIntentResponse.prototype.queryResult = null; /** - * UpdateTransitionRouteGroupRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest + * FulfillIntentResponse outputAudio. + * @member {Uint8Array} outputAudio + * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentResponse * @instance */ - UpdateTransitionRouteGroupRequest.prototype.languageCode = ""; + FulfillIntentResponse.prototype.outputAudio = $util.newBuffer([]); /** - * Creates a new UpdateTransitionRouteGroupRequest instance using the specified properties. + * FulfillIntentResponse outputAudioConfig. + * @member {google.cloud.dialogflow.cx.v3.IOutputAudioConfig|null|undefined} outputAudioConfig + * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentResponse + * @instance + */ + FulfillIntentResponse.prototype.outputAudioConfig = null; + + /** + * Creates a new FulfillIntentResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest + * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IUpdateTransitionRouteGroupRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest} UpdateTransitionRouteGroupRequest instance + * @param {google.cloud.dialogflow.cx.v3.IFulfillIntentResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.FulfillIntentResponse} FulfillIntentResponse instance */ - UpdateTransitionRouteGroupRequest.create = function create(properties) { - return new UpdateTransitionRouteGroupRequest(properties); + FulfillIntentResponse.create = function create(properties) { + return new FulfillIntentResponse(properties); }; /** - * Encodes the specified UpdateTransitionRouteGroupRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest.verify|verify} messages. + * Encodes the specified FulfillIntentResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.FulfillIntentResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest + * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IUpdateTransitionRouteGroupRequest} message UpdateTransitionRouteGroupRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IFulfillIntentResponse} message FulfillIntentResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateTransitionRouteGroupRequest.encode = function encode(message, writer) { + FulfillIntentResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.transitionRouteGroup != null && Object.hasOwnProperty.call(message, "transitionRouteGroup")) - $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup.encode(message.transitionRouteGroup, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.languageCode); + if (message.responseId != null && Object.hasOwnProperty.call(message, "responseId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.responseId); + if (message.queryResult != null && Object.hasOwnProperty.call(message, "queryResult")) + $root.google.cloud.dialogflow.cx.v3.QueryResult.encode(message.queryResult, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.outputAudio != null && Object.hasOwnProperty.call(message, "outputAudio")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.outputAudio); + if (message.outputAudioConfig != null && Object.hasOwnProperty.call(message, "outputAudioConfig")) + $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.encode(message.outputAudioConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified UpdateTransitionRouteGroupRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest.verify|verify} messages. + * Encodes the specified FulfillIntentResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.FulfillIntentResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest + * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IUpdateTransitionRouteGroupRequest} message UpdateTransitionRouteGroupRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IFulfillIntentResponse} message FulfillIntentResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateTransitionRouteGroupRequest.encodeDelimited = function encodeDelimited(message, writer) { + FulfillIntentResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateTransitionRouteGroupRequest message from the specified reader or buffer. + * Decodes a FulfillIntentResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest + * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest} UpdateTransitionRouteGroupRequest + * @returns {google.cloud.dialogflow.cx.v3.FulfillIntentResponse} FulfillIntentResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateTransitionRouteGroupRequest.decode = function decode(reader, length) { + FulfillIntentResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.FulfillIntentResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.transitionRouteGroup = $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup.decode(reader, reader.uint32()); + message.responseId = reader.string(); break; case 2: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.queryResult = $root.google.cloud.dialogflow.cx.v3.QueryResult.decode(reader, reader.uint32()); break; case 3: - message.languageCode = reader.string(); + message.outputAudio = reader.bytes(); + break; + case 4: + message.outputAudioConfig = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -32149,135 +33000,152 @@ }; /** - * Decodes an UpdateTransitionRouteGroupRequest message from the specified reader or buffer, length delimited. + * Decodes a FulfillIntentResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest + * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest} UpdateTransitionRouteGroupRequest + * @returns {google.cloud.dialogflow.cx.v3.FulfillIntentResponse} FulfillIntentResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateTransitionRouteGroupRequest.decodeDelimited = function decodeDelimited(reader) { + FulfillIntentResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateTransitionRouteGroupRequest message. + * Verifies a FulfillIntentResponse message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest + * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateTransitionRouteGroupRequest.verify = function verify(message) { + FulfillIntentResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.transitionRouteGroup != null && message.hasOwnProperty("transitionRouteGroup")) { - var error = $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup.verify(message.transitionRouteGroup); + if (message.responseId != null && message.hasOwnProperty("responseId")) + if (!$util.isString(message.responseId)) + return "responseId: string expected"; + if (message.queryResult != null && message.hasOwnProperty("queryResult")) { + var error = $root.google.cloud.dialogflow.cx.v3.QueryResult.verify(message.queryResult); if (error) - return "transitionRouteGroup." + error; + return "queryResult." + error; } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (message.outputAudio != null && message.hasOwnProperty("outputAudio")) + if (!(message.outputAudio && typeof message.outputAudio.length === "number" || $util.isString(message.outputAudio))) + return "outputAudio: buffer expected"; + if (message.outputAudioConfig != null && message.hasOwnProperty("outputAudioConfig")) { + var error = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.verify(message.outputAudioConfig); if (error) - return "updateMask." + error; + return "outputAudioConfig." + error; } - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; return null; }; /** - * Creates an UpdateTransitionRouteGroupRequest message from a plain object. Also converts values to their respective internal types. + * Creates a FulfillIntentResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest + * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest} UpdateTransitionRouteGroupRequest + * @returns {google.cloud.dialogflow.cx.v3.FulfillIntentResponse} FulfillIntentResponse */ - UpdateTransitionRouteGroupRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest) + FulfillIntentResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.FulfillIntentResponse) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest(); - if (object.transitionRouteGroup != null) { - if (typeof object.transitionRouteGroup !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest.transitionRouteGroup: object expected"); - message.transitionRouteGroup = $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup.fromObject(object.transitionRouteGroup); + var message = new $root.google.cloud.dialogflow.cx.v3.FulfillIntentResponse(); + if (object.responseId != null) + message.responseId = String(object.responseId); + if (object.queryResult != null) { + if (typeof object.queryResult !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.FulfillIntentResponse.queryResult: object expected"); + message.queryResult = $root.google.cloud.dialogflow.cx.v3.QueryResult.fromObject(object.queryResult); } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + if (object.outputAudio != null) + if (typeof object.outputAudio === "string") + $util.base64.decode(object.outputAudio, message.outputAudio = $util.newBuffer($util.base64.length(object.outputAudio)), 0); + else if (object.outputAudio.length) + message.outputAudio = object.outputAudio; + if (object.outputAudioConfig != null) { + if (typeof object.outputAudioConfig !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.FulfillIntentResponse.outputAudioConfig: object expected"); + message.outputAudioConfig = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.fromObject(object.outputAudioConfig); } - if (object.languageCode != null) - message.languageCode = String(object.languageCode); return message; }; /** - * Creates a plain object from an UpdateTransitionRouteGroupRequest message. Also converts values to other types if specified. + * Creates a plain object from a FulfillIntentResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest + * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentResponse * @static - * @param {google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest} message UpdateTransitionRouteGroupRequest + * @param {google.cloud.dialogflow.cx.v3.FulfillIntentResponse} message FulfillIntentResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateTransitionRouteGroupRequest.toObject = function toObject(message, options) { + FulfillIntentResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.transitionRouteGroup = null; - object.updateMask = null; - object.languageCode = ""; + object.responseId = ""; + object.queryResult = null; + if (options.bytes === String) + object.outputAudio = ""; + else { + object.outputAudio = []; + if (options.bytes !== Array) + object.outputAudio = $util.newBuffer(object.outputAudio); + } + object.outputAudioConfig = null; } - if (message.transitionRouteGroup != null && message.hasOwnProperty("transitionRouteGroup")) - object.transitionRouteGroup = $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup.toObject(message.transitionRouteGroup, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; + if (message.responseId != null && message.hasOwnProperty("responseId")) + object.responseId = message.responseId; + if (message.queryResult != null && message.hasOwnProperty("queryResult")) + object.queryResult = $root.google.cloud.dialogflow.cx.v3.QueryResult.toObject(message.queryResult, options); + if (message.outputAudio != null && message.hasOwnProperty("outputAudio")) + object.outputAudio = options.bytes === String ? $util.base64.encode(message.outputAudio, 0, message.outputAudio.length) : options.bytes === Array ? Array.prototype.slice.call(message.outputAudio) : message.outputAudio; + if (message.outputAudioConfig != null && message.hasOwnProperty("outputAudioConfig")) + object.outputAudioConfig = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.toObject(message.outputAudioConfig, options); return object; }; /** - * Converts this UpdateTransitionRouteGroupRequest to JSON. + * Converts this FulfillIntentResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest + * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentResponse * @instance * @returns {Object.} JSON object */ - UpdateTransitionRouteGroupRequest.prototype.toJSON = function toJSON() { + FulfillIntentResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UpdateTransitionRouteGroupRequest; + return FulfillIntentResponse; })(); - v3.DeleteTransitionRouteGroupRequest = (function() { + v3.SentimentAnalysisResult = (function() { /** - * Properties of a DeleteTransitionRouteGroupRequest. + * Properties of a SentimentAnalysisResult. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IDeleteTransitionRouteGroupRequest - * @property {string|null} [name] DeleteTransitionRouteGroupRequest name - * @property {boolean|null} [force] DeleteTransitionRouteGroupRequest force + * @interface ISentimentAnalysisResult + * @property {number|null} [score] SentimentAnalysisResult score + * @property {number|null} [magnitude] SentimentAnalysisResult magnitude */ /** - * Constructs a new DeleteTransitionRouteGroupRequest. + * Constructs a new SentimentAnalysisResult. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a DeleteTransitionRouteGroupRequest. - * @implements IDeleteTransitionRouteGroupRequest + * @classdesc Represents a SentimentAnalysisResult. + * @implements ISentimentAnalysisResult * @constructor - * @param {google.cloud.dialogflow.cx.v3.IDeleteTransitionRouteGroupRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.ISentimentAnalysisResult=} [properties] Properties to set */ - function DeleteTransitionRouteGroupRequest(properties) { + function SentimentAnalysisResult(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -32285,88 +33153,88 @@ } /** - * DeleteTransitionRouteGroupRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest + * SentimentAnalysisResult score. + * @member {number} score + * @memberof google.cloud.dialogflow.cx.v3.SentimentAnalysisResult * @instance */ - DeleteTransitionRouteGroupRequest.prototype.name = ""; + SentimentAnalysisResult.prototype.score = 0; /** - * DeleteTransitionRouteGroupRequest force. - * @member {boolean} force - * @memberof google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest + * SentimentAnalysisResult magnitude. + * @member {number} magnitude + * @memberof google.cloud.dialogflow.cx.v3.SentimentAnalysisResult * @instance */ - DeleteTransitionRouteGroupRequest.prototype.force = false; + SentimentAnalysisResult.prototype.magnitude = 0; /** - * Creates a new DeleteTransitionRouteGroupRequest instance using the specified properties. + * Creates a new SentimentAnalysisResult instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest + * @memberof google.cloud.dialogflow.cx.v3.SentimentAnalysisResult * @static - * @param {google.cloud.dialogflow.cx.v3.IDeleteTransitionRouteGroupRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest} DeleteTransitionRouteGroupRequest instance + * @param {google.cloud.dialogflow.cx.v3.ISentimentAnalysisResult=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.SentimentAnalysisResult} SentimentAnalysisResult instance */ - DeleteTransitionRouteGroupRequest.create = function create(properties) { - return new DeleteTransitionRouteGroupRequest(properties); + SentimentAnalysisResult.create = function create(properties) { + return new SentimentAnalysisResult(properties); }; /** - * Encodes the specified DeleteTransitionRouteGroupRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest.verify|verify} messages. + * Encodes the specified SentimentAnalysisResult message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SentimentAnalysisResult.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest + * @memberof google.cloud.dialogflow.cx.v3.SentimentAnalysisResult * @static - * @param {google.cloud.dialogflow.cx.v3.IDeleteTransitionRouteGroupRequest} message DeleteTransitionRouteGroupRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ISentimentAnalysisResult} message SentimentAnalysisResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteTransitionRouteGroupRequest.encode = function encode(message, writer) { + SentimentAnalysisResult.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.force != null && Object.hasOwnProperty.call(message, "force")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.force); + if (message.score != null && Object.hasOwnProperty.call(message, "score")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.score); + if (message.magnitude != null && Object.hasOwnProperty.call(message, "magnitude")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.magnitude); return writer; }; /** - * Encodes the specified DeleteTransitionRouteGroupRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest.verify|verify} messages. + * Encodes the specified SentimentAnalysisResult message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SentimentAnalysisResult.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest + * @memberof google.cloud.dialogflow.cx.v3.SentimentAnalysisResult * @static - * @param {google.cloud.dialogflow.cx.v3.IDeleteTransitionRouteGroupRequest} message DeleteTransitionRouteGroupRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ISentimentAnalysisResult} message SentimentAnalysisResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteTransitionRouteGroupRequest.encodeDelimited = function encodeDelimited(message, writer) { + SentimentAnalysisResult.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteTransitionRouteGroupRequest message from the specified reader or buffer. + * Decodes a SentimentAnalysisResult message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest + * @memberof google.cloud.dialogflow.cx.v3.SentimentAnalysisResult * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest} DeleteTransitionRouteGroupRequest + * @returns {google.cloud.dialogflow.cx.v3.SentimentAnalysisResult} SentimentAnalysisResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteTransitionRouteGroupRequest.decode = function decode(reader, length) { + SentimentAnalysisResult.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.SentimentAnalysisResult(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.score = reader.float(); break; case 2: - message.force = reader.bool(); + message.magnitude = reader.float(); break; default: reader.skipType(tag & 7); @@ -32377,349 +33245,319 @@ }; /** - * Decodes a DeleteTransitionRouteGroupRequest message from the specified reader or buffer, length delimited. + * Decodes a SentimentAnalysisResult message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest + * @memberof google.cloud.dialogflow.cx.v3.SentimentAnalysisResult * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest} DeleteTransitionRouteGroupRequest + * @returns {google.cloud.dialogflow.cx.v3.SentimentAnalysisResult} SentimentAnalysisResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteTransitionRouteGroupRequest.decodeDelimited = function decodeDelimited(reader) { + SentimentAnalysisResult.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteTransitionRouteGroupRequest message. + * Verifies a SentimentAnalysisResult message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest + * @memberof google.cloud.dialogflow.cx.v3.SentimentAnalysisResult * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteTransitionRouteGroupRequest.verify = function verify(message) { + SentimentAnalysisResult.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.force != null && message.hasOwnProperty("force")) - if (typeof message.force !== "boolean") - return "force: boolean expected"; + if (message.score != null && message.hasOwnProperty("score")) + if (typeof message.score !== "number") + return "score: number expected"; + if (message.magnitude != null && message.hasOwnProperty("magnitude")) + if (typeof message.magnitude !== "number") + return "magnitude: number expected"; return null; }; /** - * Creates a DeleteTransitionRouteGroupRequest message from a plain object. Also converts values to their respective internal types. + * Creates a SentimentAnalysisResult message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest + * @memberof google.cloud.dialogflow.cx.v3.SentimentAnalysisResult * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest} DeleteTransitionRouteGroupRequest + * @returns {google.cloud.dialogflow.cx.v3.SentimentAnalysisResult} SentimentAnalysisResult */ - DeleteTransitionRouteGroupRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest) + SentimentAnalysisResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.SentimentAnalysisResult) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.force != null) - message.force = Boolean(object.force); + var message = new $root.google.cloud.dialogflow.cx.v3.SentimentAnalysisResult(); + if (object.score != null) + message.score = Number(object.score); + if (object.magnitude != null) + message.magnitude = Number(object.magnitude); return message; }; /** - * Creates a plain object from a DeleteTransitionRouteGroupRequest message. Also converts values to other types if specified. + * Creates a plain object from a SentimentAnalysisResult message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest + * @memberof google.cloud.dialogflow.cx.v3.SentimentAnalysisResult * @static - * @param {google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest} message DeleteTransitionRouteGroupRequest + * @param {google.cloud.dialogflow.cx.v3.SentimentAnalysisResult} message SentimentAnalysisResult * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteTransitionRouteGroupRequest.toObject = function toObject(message, options) { + SentimentAnalysisResult.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.force = false; + object.score = 0; + object.magnitude = 0; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.force != null && message.hasOwnProperty("force")) - object.force = message.force; + if (message.score != null && message.hasOwnProperty("score")) + object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score; + if (message.magnitude != null && message.hasOwnProperty("magnitude")) + object.magnitude = options.json && !isFinite(message.magnitude) ? String(message.magnitude) : message.magnitude; return object; }; /** - * Converts this DeleteTransitionRouteGroupRequest to JSON. + * Converts this SentimentAnalysisResult to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest + * @memberof google.cloud.dialogflow.cx.v3.SentimentAnalysisResult * @instance * @returns {Object.} JSON object */ - DeleteTransitionRouteGroupRequest.prototype.toJSON = function toJSON() { + SentimentAnalysisResult.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeleteTransitionRouteGroupRequest; + return SentimentAnalysisResult; })(); - v3.Versions = (function() { + v3.SessionEntityTypes = (function() { /** - * Constructs a new Versions service. + * Constructs a new SessionEntityTypes service. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a Versions + * @classdesc Represents a SessionEntityTypes * @extends $protobuf.rpc.Service * @constructor * @param {$protobuf.RPCImpl} rpcImpl RPC implementation * @param {boolean} [requestDelimited=false] Whether requests are length-delimited * @param {boolean} [responseDelimited=false] Whether responses are length-delimited */ - function Versions(rpcImpl, requestDelimited, responseDelimited) { + function SessionEntityTypes(rpcImpl, requestDelimited, responseDelimited) { $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); } - (Versions.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Versions; + (SessionEntityTypes.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = SessionEntityTypes; /** - * Creates new Versions service using the specified rpc implementation. + * Creates new SessionEntityTypes service using the specified rpc implementation. * @function create - * @memberof google.cloud.dialogflow.cx.v3.Versions + * @memberof google.cloud.dialogflow.cx.v3.SessionEntityTypes * @static * @param {$protobuf.RPCImpl} rpcImpl RPC implementation * @param {boolean} [requestDelimited=false] Whether requests are length-delimited * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {Versions} RPC service. Useful where requests and/or responses are streamed. + * @returns {SessionEntityTypes} RPC service. Useful where requests and/or responses are streamed. */ - Versions.create = function create(rpcImpl, requestDelimited, responseDelimited) { + SessionEntityTypes.create = function create(rpcImpl, requestDelimited, responseDelimited) { return new this(rpcImpl, requestDelimited, responseDelimited); }; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Versions#listVersions}. - * @memberof google.cloud.dialogflow.cx.v3.Versions - * @typedef ListVersionsCallback + * Callback as used by {@link google.cloud.dialogflow.cx.v3.SessionEntityTypes#listSessionEntityTypes}. + * @memberof google.cloud.dialogflow.cx.v3.SessionEntityTypes + * @typedef ListSessionEntityTypesCallback * @type {function} * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.ListVersionsResponse} [response] ListVersionsResponse + * @param {google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse} [response] ListSessionEntityTypesResponse */ /** - * Calls ListVersions. - * @function listVersions - * @memberof google.cloud.dialogflow.cx.v3.Versions + * Calls ListSessionEntityTypes. + * @function listSessionEntityTypes + * @memberof google.cloud.dialogflow.cx.v3.SessionEntityTypes * @instance - * @param {google.cloud.dialogflow.cx.v3.IListVersionsRequest} request ListVersionsRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Versions.ListVersionsCallback} callback Node-style callback called with the error, if any, and ListVersionsResponse + * @param {google.cloud.dialogflow.cx.v3.IListSessionEntityTypesRequest} request ListSessionEntityTypesRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.SessionEntityTypes.ListSessionEntityTypesCallback} callback Node-style callback called with the error, if any, and ListSessionEntityTypesResponse * @returns {undefined} * @variation 1 */ - Object.defineProperty(Versions.prototype.listVersions = function listVersions(request, callback) { - return this.rpcCall(listVersions, $root.google.cloud.dialogflow.cx.v3.ListVersionsRequest, $root.google.cloud.dialogflow.cx.v3.ListVersionsResponse, request, callback); - }, "name", { value: "ListVersions" }); + Object.defineProperty(SessionEntityTypes.prototype.listSessionEntityTypes = function listSessionEntityTypes(request, callback) { + return this.rpcCall(listSessionEntityTypes, $root.google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest, $root.google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse, request, callback); + }, "name", { value: "ListSessionEntityTypes" }); /** - * Calls ListVersions. - * @function listVersions - * @memberof google.cloud.dialogflow.cx.v3.Versions + * Calls ListSessionEntityTypes. + * @function listSessionEntityTypes + * @memberof google.cloud.dialogflow.cx.v3.SessionEntityTypes * @instance - * @param {google.cloud.dialogflow.cx.v3.IListVersionsRequest} request ListVersionsRequest message or plain object - * @returns {Promise} Promise + * @param {google.cloud.dialogflow.cx.v3.IListSessionEntityTypesRequest} request ListSessionEntityTypesRequest message or plain object + * @returns {Promise} Promise * @variation 2 */ /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Versions#getVersion}. - * @memberof google.cloud.dialogflow.cx.v3.Versions - * @typedef GetVersionCallback + * Callback as used by {@link google.cloud.dialogflow.cx.v3.SessionEntityTypes#getSessionEntityType}. + * @memberof google.cloud.dialogflow.cx.v3.SessionEntityTypes + * @typedef GetSessionEntityTypeCallback * @type {function} * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.Version} [response] Version + * @param {google.cloud.dialogflow.cx.v3.SessionEntityType} [response] SessionEntityType */ /** - * Calls GetVersion. - * @function getVersion - * @memberof google.cloud.dialogflow.cx.v3.Versions + * Calls GetSessionEntityType. + * @function getSessionEntityType + * @memberof google.cloud.dialogflow.cx.v3.SessionEntityTypes * @instance - * @param {google.cloud.dialogflow.cx.v3.IGetVersionRequest} request GetVersionRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Versions.GetVersionCallback} callback Node-style callback called with the error, if any, and Version + * @param {google.cloud.dialogflow.cx.v3.IGetSessionEntityTypeRequest} request GetSessionEntityTypeRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.SessionEntityTypes.GetSessionEntityTypeCallback} callback Node-style callback called with the error, if any, and SessionEntityType * @returns {undefined} * @variation 1 */ - Object.defineProperty(Versions.prototype.getVersion = function getVersion(request, callback) { - return this.rpcCall(getVersion, $root.google.cloud.dialogflow.cx.v3.GetVersionRequest, $root.google.cloud.dialogflow.cx.v3.Version, request, callback); - }, "name", { value: "GetVersion" }); + Object.defineProperty(SessionEntityTypes.prototype.getSessionEntityType = function getSessionEntityType(request, callback) { + return this.rpcCall(getSessionEntityType, $root.google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest, $root.google.cloud.dialogflow.cx.v3.SessionEntityType, request, callback); + }, "name", { value: "GetSessionEntityType" }); /** - * Calls GetVersion. - * @function getVersion - * @memberof google.cloud.dialogflow.cx.v3.Versions + * Calls GetSessionEntityType. + * @function getSessionEntityType + * @memberof google.cloud.dialogflow.cx.v3.SessionEntityTypes * @instance - * @param {google.cloud.dialogflow.cx.v3.IGetVersionRequest} request GetVersionRequest message or plain object - * @returns {Promise} Promise + * @param {google.cloud.dialogflow.cx.v3.IGetSessionEntityTypeRequest} request GetSessionEntityTypeRequest message or plain object + * @returns {Promise} Promise * @variation 2 */ /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Versions#createVersion}. - * @memberof google.cloud.dialogflow.cx.v3.Versions - * @typedef CreateVersionCallback + * Callback as used by {@link google.cloud.dialogflow.cx.v3.SessionEntityTypes#createSessionEntityType}. + * @memberof google.cloud.dialogflow.cx.v3.SessionEntityTypes + * @typedef CreateSessionEntityTypeCallback * @type {function} * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * @param {google.cloud.dialogflow.cx.v3.SessionEntityType} [response] SessionEntityType */ /** - * Calls CreateVersion. - * @function createVersion - * @memberof google.cloud.dialogflow.cx.v3.Versions + * Calls CreateSessionEntityType. + * @function createSessionEntityType + * @memberof google.cloud.dialogflow.cx.v3.SessionEntityTypes * @instance - * @param {google.cloud.dialogflow.cx.v3.ICreateVersionRequest} request CreateVersionRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Versions.CreateVersionCallback} callback Node-style callback called with the error, if any, and Operation + * @param {google.cloud.dialogflow.cx.v3.ICreateSessionEntityTypeRequest} request CreateSessionEntityTypeRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.SessionEntityTypes.CreateSessionEntityTypeCallback} callback Node-style callback called with the error, if any, and SessionEntityType * @returns {undefined} * @variation 1 */ - Object.defineProperty(Versions.prototype.createVersion = function createVersion(request, callback) { - return this.rpcCall(createVersion, $root.google.cloud.dialogflow.cx.v3.CreateVersionRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateVersion" }); + Object.defineProperty(SessionEntityTypes.prototype.createSessionEntityType = function createSessionEntityType(request, callback) { + return this.rpcCall(createSessionEntityType, $root.google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest, $root.google.cloud.dialogflow.cx.v3.SessionEntityType, request, callback); + }, "name", { value: "CreateSessionEntityType" }); /** - * Calls CreateVersion. - * @function createVersion - * @memberof google.cloud.dialogflow.cx.v3.Versions + * Calls CreateSessionEntityType. + * @function createSessionEntityType + * @memberof google.cloud.dialogflow.cx.v3.SessionEntityTypes * @instance - * @param {google.cloud.dialogflow.cx.v3.ICreateVersionRequest} request CreateVersionRequest message or plain object - * @returns {Promise} Promise + * @param {google.cloud.dialogflow.cx.v3.ICreateSessionEntityTypeRequest} request CreateSessionEntityTypeRequest message or plain object + * @returns {Promise} Promise * @variation 2 */ /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Versions#updateVersion}. - * @memberof google.cloud.dialogflow.cx.v3.Versions - * @typedef UpdateVersionCallback + * Callback as used by {@link google.cloud.dialogflow.cx.v3.SessionEntityTypes#updateSessionEntityType}. + * @memberof google.cloud.dialogflow.cx.v3.SessionEntityTypes + * @typedef UpdateSessionEntityTypeCallback * @type {function} * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.Version} [response] Version + * @param {google.cloud.dialogflow.cx.v3.SessionEntityType} [response] SessionEntityType */ /** - * Calls UpdateVersion. - * @function updateVersion - * @memberof google.cloud.dialogflow.cx.v3.Versions + * Calls UpdateSessionEntityType. + * @function updateSessionEntityType + * @memberof google.cloud.dialogflow.cx.v3.SessionEntityTypes * @instance - * @param {google.cloud.dialogflow.cx.v3.IUpdateVersionRequest} request UpdateVersionRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Versions.UpdateVersionCallback} callback Node-style callback called with the error, if any, and Version + * @param {google.cloud.dialogflow.cx.v3.IUpdateSessionEntityTypeRequest} request UpdateSessionEntityTypeRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.SessionEntityTypes.UpdateSessionEntityTypeCallback} callback Node-style callback called with the error, if any, and SessionEntityType * @returns {undefined} * @variation 1 */ - Object.defineProperty(Versions.prototype.updateVersion = function updateVersion(request, callback) { - return this.rpcCall(updateVersion, $root.google.cloud.dialogflow.cx.v3.UpdateVersionRequest, $root.google.cloud.dialogflow.cx.v3.Version, request, callback); - }, "name", { value: "UpdateVersion" }); + Object.defineProperty(SessionEntityTypes.prototype.updateSessionEntityType = function updateSessionEntityType(request, callback) { + return this.rpcCall(updateSessionEntityType, $root.google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest, $root.google.cloud.dialogflow.cx.v3.SessionEntityType, request, callback); + }, "name", { value: "UpdateSessionEntityType" }); /** - * Calls UpdateVersion. - * @function updateVersion - * @memberof google.cloud.dialogflow.cx.v3.Versions + * Calls UpdateSessionEntityType. + * @function updateSessionEntityType + * @memberof google.cloud.dialogflow.cx.v3.SessionEntityTypes * @instance - * @param {google.cloud.dialogflow.cx.v3.IUpdateVersionRequest} request UpdateVersionRequest message or plain object - * @returns {Promise} Promise + * @param {google.cloud.dialogflow.cx.v3.IUpdateSessionEntityTypeRequest} request UpdateSessionEntityTypeRequest message or plain object + * @returns {Promise} Promise * @variation 2 */ /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Versions#deleteVersion}. - * @memberof google.cloud.dialogflow.cx.v3.Versions - * @typedef DeleteVersionCallback + * Callback as used by {@link google.cloud.dialogflow.cx.v3.SessionEntityTypes#deleteSessionEntityType}. + * @memberof google.cloud.dialogflow.cx.v3.SessionEntityTypes + * @typedef DeleteSessionEntityTypeCallback * @type {function} * @param {Error|null} error Error, if any * @param {google.protobuf.Empty} [response] Empty */ /** - * Calls DeleteVersion. - * @function deleteVersion - * @memberof google.cloud.dialogflow.cx.v3.Versions + * Calls DeleteSessionEntityType. + * @function deleteSessionEntityType + * @memberof google.cloud.dialogflow.cx.v3.SessionEntityTypes * @instance - * @param {google.cloud.dialogflow.cx.v3.IDeleteVersionRequest} request DeleteVersionRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Versions.DeleteVersionCallback} callback Node-style callback called with the error, if any, and Empty + * @param {google.cloud.dialogflow.cx.v3.IDeleteSessionEntityTypeRequest} request DeleteSessionEntityTypeRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.SessionEntityTypes.DeleteSessionEntityTypeCallback} callback Node-style callback called with the error, if any, and Empty * @returns {undefined} * @variation 1 */ - Object.defineProperty(Versions.prototype.deleteVersion = function deleteVersion(request, callback) { - return this.rpcCall(deleteVersion, $root.google.cloud.dialogflow.cx.v3.DeleteVersionRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteVersion" }); + Object.defineProperty(SessionEntityTypes.prototype.deleteSessionEntityType = function deleteSessionEntityType(request, callback) { + return this.rpcCall(deleteSessionEntityType, $root.google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteSessionEntityType" }); /** - * Calls DeleteVersion. - * @function deleteVersion - * @memberof google.cloud.dialogflow.cx.v3.Versions + * Calls DeleteSessionEntityType. + * @function deleteSessionEntityType + * @memberof google.cloud.dialogflow.cx.v3.SessionEntityTypes * @instance - * @param {google.cloud.dialogflow.cx.v3.IDeleteVersionRequest} request DeleteVersionRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.IDeleteSessionEntityTypeRequest} request DeleteSessionEntityTypeRequest message or plain object * @returns {Promise} Promise * @variation 2 */ - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Versions#loadVersion}. - * @memberof google.cloud.dialogflow.cx.v3.Versions - * @typedef LoadVersionCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls LoadVersion. - * @function loadVersion - * @memberof google.cloud.dialogflow.cx.v3.Versions - * @instance - * @param {google.cloud.dialogflow.cx.v3.ILoadVersionRequest} request LoadVersionRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Versions.LoadVersionCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Versions.prototype.loadVersion = function loadVersion(request, callback) { - return this.rpcCall(loadVersion, $root.google.cloud.dialogflow.cx.v3.LoadVersionRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "LoadVersion" }); - - /** - * Calls LoadVersion. - * @function loadVersion - * @memberof google.cloud.dialogflow.cx.v3.Versions - * @instance - * @param {google.cloud.dialogflow.cx.v3.ILoadVersionRequest} request LoadVersionRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Versions; + return SessionEntityTypes; })(); - v3.CreateVersionOperationMetadata = (function() { + v3.SessionEntityType = (function() { /** - * Properties of a CreateVersionOperationMetadata. + * Properties of a SessionEntityType. * @memberof google.cloud.dialogflow.cx.v3 - * @interface ICreateVersionOperationMetadata - * @property {string|null} [version] CreateVersionOperationMetadata version + * @interface ISessionEntityType + * @property {string|null} [name] SessionEntityType name + * @property {google.cloud.dialogflow.cx.v3.SessionEntityType.EntityOverrideMode|null} [entityOverrideMode] SessionEntityType entityOverrideMode + * @property {Array.|null} [entities] SessionEntityType entities */ /** - * Constructs a new CreateVersionOperationMetadata. + * Constructs a new SessionEntityType. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a CreateVersionOperationMetadata. - * @implements ICreateVersionOperationMetadata + * @classdesc Represents a SessionEntityType. + * @implements ISessionEntityType * @constructor - * @param {google.cloud.dialogflow.cx.v3.ICreateVersionOperationMetadata=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.ISessionEntityType=} [properties] Properties to set */ - function CreateVersionOperationMetadata(properties) { + function SessionEntityType(properties) { + this.entities = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -32727,75 +33565,104 @@ } /** - * CreateVersionOperationMetadata version. - * @member {string} version - * @memberof google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata + * SessionEntityType name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.SessionEntityType * @instance */ - CreateVersionOperationMetadata.prototype.version = ""; + SessionEntityType.prototype.name = ""; /** - * Creates a new CreateVersionOperationMetadata instance using the specified properties. + * SessionEntityType entityOverrideMode. + * @member {google.cloud.dialogflow.cx.v3.SessionEntityType.EntityOverrideMode} entityOverrideMode + * @memberof google.cloud.dialogflow.cx.v3.SessionEntityType + * @instance + */ + SessionEntityType.prototype.entityOverrideMode = 0; + + /** + * SessionEntityType entities. + * @member {Array.} entities + * @memberof google.cloud.dialogflow.cx.v3.SessionEntityType + * @instance + */ + SessionEntityType.prototype.entities = $util.emptyArray; + + /** + * Creates a new SessionEntityType instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata + * @memberof google.cloud.dialogflow.cx.v3.SessionEntityType * @static - * @param {google.cloud.dialogflow.cx.v3.ICreateVersionOperationMetadata=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata} CreateVersionOperationMetadata instance + * @param {google.cloud.dialogflow.cx.v3.ISessionEntityType=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.SessionEntityType} SessionEntityType instance */ - CreateVersionOperationMetadata.create = function create(properties) { - return new CreateVersionOperationMetadata(properties); + SessionEntityType.create = function create(properties) { + return new SessionEntityType(properties); }; /** - * Encodes the specified CreateVersionOperationMetadata message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata.verify|verify} messages. + * Encodes the specified SessionEntityType message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SessionEntityType.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata + * @memberof google.cloud.dialogflow.cx.v3.SessionEntityType * @static - * @param {google.cloud.dialogflow.cx.v3.ICreateVersionOperationMetadata} message CreateVersionOperationMetadata message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ISessionEntityType} message SessionEntityType message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateVersionOperationMetadata.encode = function encode(message, writer) { + SessionEntityType.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.entityOverrideMode != null && Object.hasOwnProperty.call(message, "entityOverrideMode")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.entityOverrideMode); + if (message.entities != null && message.entities.length) + for (var i = 0; i < message.entities.length; ++i) + $root.google.cloud.dialogflow.cx.v3.EntityType.Entity.encode(message.entities[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified CreateVersionOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata.verify|verify} messages. + * Encodes the specified SessionEntityType message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SessionEntityType.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata + * @memberof google.cloud.dialogflow.cx.v3.SessionEntityType * @static - * @param {google.cloud.dialogflow.cx.v3.ICreateVersionOperationMetadata} message CreateVersionOperationMetadata message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ISessionEntityType} message SessionEntityType message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateVersionOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + SessionEntityType.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateVersionOperationMetadata message from the specified reader or buffer. + * Decodes a SessionEntityType message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata + * @memberof google.cloud.dialogflow.cx.v3.SessionEntityType * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata} CreateVersionOperationMetadata + * @returns {google.cloud.dialogflow.cx.v3.SessionEntityType} SessionEntityType * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateVersionOperationMetadata.decode = function decode(reader, length) { + SessionEntityType.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.SessionEntityType(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.version = reader.string(); + message.name = reader.string(); + break; + case 3: + message.entityOverrideMode = reader.int32(); + break; + case 4: + if (!(message.entities && message.entities.length)) + message.entities = []; + message.entities.push($root.google.cloud.dialogflow.cx.v3.EntityType.Entity.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -32806,112 +33673,178 @@ }; /** - * Decodes a CreateVersionOperationMetadata message from the specified reader or buffer, length delimited. + * Decodes a SessionEntityType message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata + * @memberof google.cloud.dialogflow.cx.v3.SessionEntityType * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata} CreateVersionOperationMetadata + * @returns {google.cloud.dialogflow.cx.v3.SessionEntityType} SessionEntityType * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateVersionOperationMetadata.decodeDelimited = function decodeDelimited(reader) { + SessionEntityType.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateVersionOperationMetadata message. + * Verifies a SessionEntityType message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata + * @memberof google.cloud.dialogflow.cx.v3.SessionEntityType * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateVersionOperationMetadata.verify = function verify(message) { + SessionEntityType.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isString(message.version)) - return "version: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.entityOverrideMode != null && message.hasOwnProperty("entityOverrideMode")) + switch (message.entityOverrideMode) { + default: + return "entityOverrideMode: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.entities != null && message.hasOwnProperty("entities")) { + if (!Array.isArray(message.entities)) + return "entities: array expected"; + for (var i = 0; i < message.entities.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.EntityType.Entity.verify(message.entities[i]); + if (error) + return "entities." + error; + } + } return null; }; /** - * Creates a CreateVersionOperationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a SessionEntityType message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata + * @memberof google.cloud.dialogflow.cx.v3.SessionEntityType * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata} CreateVersionOperationMetadata + * @returns {google.cloud.dialogflow.cx.v3.SessionEntityType} SessionEntityType */ - CreateVersionOperationMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata) + SessionEntityType.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.SessionEntityType) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata(); - if (object.version != null) - message.version = String(object.version); + var message = new $root.google.cloud.dialogflow.cx.v3.SessionEntityType(); + if (object.name != null) + message.name = String(object.name); + switch (object.entityOverrideMode) { + case "ENTITY_OVERRIDE_MODE_UNSPECIFIED": + case 0: + message.entityOverrideMode = 0; + break; + case "ENTITY_OVERRIDE_MODE_OVERRIDE": + case 1: + message.entityOverrideMode = 1; + break; + case "ENTITY_OVERRIDE_MODE_SUPPLEMENT": + case 2: + message.entityOverrideMode = 2; + break; + } + if (object.entities) { + if (!Array.isArray(object.entities)) + throw TypeError(".google.cloud.dialogflow.cx.v3.SessionEntityType.entities: array expected"); + message.entities = []; + for (var i = 0; i < object.entities.length; ++i) { + if (typeof object.entities[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.SessionEntityType.entities: object expected"); + message.entities[i] = $root.google.cloud.dialogflow.cx.v3.EntityType.Entity.fromObject(object.entities[i]); + } + } return message; }; /** - * Creates a plain object from a CreateVersionOperationMetadata message. Also converts values to other types if specified. + * Creates a plain object from a SessionEntityType message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata + * @memberof google.cloud.dialogflow.cx.v3.SessionEntityType * @static - * @param {google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata} message CreateVersionOperationMetadata + * @param {google.cloud.dialogflow.cx.v3.SessionEntityType} message SessionEntityType * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateVersionOperationMetadata.toObject = function toObject(message, options) { + SessionEntityType.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.version = ""; - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; + if (options.arrays || options.defaults) + object.entities = []; + if (options.defaults) { + object.name = ""; + object.entityOverrideMode = options.enums === String ? "ENTITY_OVERRIDE_MODE_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.entityOverrideMode != null && message.hasOwnProperty("entityOverrideMode")) + object.entityOverrideMode = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.SessionEntityType.EntityOverrideMode[message.entityOverrideMode] : message.entityOverrideMode; + if (message.entities && message.entities.length) { + object.entities = []; + for (var j = 0; j < message.entities.length; ++j) + object.entities[j] = $root.google.cloud.dialogflow.cx.v3.EntityType.Entity.toObject(message.entities[j], options); + } return object; }; /** - * Converts this CreateVersionOperationMetadata to JSON. + * Converts this SessionEntityType to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata + * @memberof google.cloud.dialogflow.cx.v3.SessionEntityType * @instance * @returns {Object.} JSON object */ - CreateVersionOperationMetadata.prototype.toJSON = function toJSON() { + SessionEntityType.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CreateVersionOperationMetadata; + /** + * EntityOverrideMode enum. + * @name google.cloud.dialogflow.cx.v3.SessionEntityType.EntityOverrideMode + * @enum {number} + * @property {number} ENTITY_OVERRIDE_MODE_UNSPECIFIED=0 ENTITY_OVERRIDE_MODE_UNSPECIFIED value + * @property {number} ENTITY_OVERRIDE_MODE_OVERRIDE=1 ENTITY_OVERRIDE_MODE_OVERRIDE value + * @property {number} ENTITY_OVERRIDE_MODE_SUPPLEMENT=2 ENTITY_OVERRIDE_MODE_SUPPLEMENT value + */ + SessionEntityType.EntityOverrideMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENTITY_OVERRIDE_MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ENTITY_OVERRIDE_MODE_OVERRIDE"] = 1; + values[valuesById[2] = "ENTITY_OVERRIDE_MODE_SUPPLEMENT"] = 2; + return values; + })(); + + return SessionEntityType; })(); - v3.Version = (function() { + v3.ListSessionEntityTypesRequest = (function() { /** - * Properties of a Version. + * Properties of a ListSessionEntityTypesRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IVersion - * @property {string|null} [name] Version name - * @property {string|null} [displayName] Version displayName - * @property {string|null} [description] Version description - * @property {google.cloud.dialogflow.cx.v3.INluSettings|null} [nluSettings] Version nluSettings - * @property {google.protobuf.ITimestamp|null} [createTime] Version createTime - * @property {google.cloud.dialogflow.cx.v3.Version.State|null} [state] Version state + * @interface IListSessionEntityTypesRequest + * @property {string|null} [parent] ListSessionEntityTypesRequest parent + * @property {number|null} [pageSize] ListSessionEntityTypesRequest pageSize + * @property {string|null} [pageToken] ListSessionEntityTypesRequest pageToken */ /** - * Constructs a new Version. + * Constructs a new ListSessionEntityTypesRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a Version. - * @implements IVersion + * @classdesc Represents a ListSessionEntityTypesRequest. + * @implements IListSessionEntityTypesRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IVersion=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IListSessionEntityTypesRequest=} [properties] Properties to set */ - function Version(properties) { + function ListSessionEntityTypesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -32919,140 +33852,101 @@ } /** - * Version name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.Version - * @instance - */ - Version.prototype.name = ""; - - /** - * Version displayName. - * @member {string} displayName - * @memberof google.cloud.dialogflow.cx.v3.Version - * @instance - */ - Version.prototype.displayName = ""; - - /** - * Version description. - * @member {string} description - * @memberof google.cloud.dialogflow.cx.v3.Version - * @instance - */ - Version.prototype.description = ""; - - /** - * Version nluSettings. - * @member {google.cloud.dialogflow.cx.v3.INluSettings|null|undefined} nluSettings - * @memberof google.cloud.dialogflow.cx.v3.Version + * ListSessionEntityTypesRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest * @instance */ - Version.prototype.nluSettings = null; + ListSessionEntityTypesRequest.prototype.parent = ""; /** - * Version createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.dialogflow.cx.v3.Version + * ListSessionEntityTypesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest * @instance */ - Version.prototype.createTime = null; + ListSessionEntityTypesRequest.prototype.pageSize = 0; /** - * Version state. - * @member {google.cloud.dialogflow.cx.v3.Version.State} state - * @memberof google.cloud.dialogflow.cx.v3.Version + * ListSessionEntityTypesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest * @instance */ - Version.prototype.state = 0; + ListSessionEntityTypesRequest.prototype.pageToken = ""; /** - * Creates a new Version instance using the specified properties. + * Creates a new ListSessionEntityTypesRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.Version + * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IVersion=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.Version} Version instance + * @param {google.cloud.dialogflow.cx.v3.IListSessionEntityTypesRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest} ListSessionEntityTypesRequest instance */ - Version.create = function create(properties) { - return new Version(properties); + ListSessionEntityTypesRequest.create = function create(properties) { + return new ListSessionEntityTypesRequest(properties); }; /** - * Encodes the specified Version message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Version.verify|verify} messages. + * Encodes the specified ListSessionEntityTypesRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.Version + * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IVersion} message Version message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListSessionEntityTypesRequest} message ListSessionEntityTypesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Version.encode = function encode(message, writer) { + ListSessionEntityTypesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); - if (message.nluSettings != null && Object.hasOwnProperty.call(message, "nluSettings")) - $root.google.cloud.dialogflow.cx.v3.NluSettings.encode(message.nluSettings, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.state); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); return writer; }; /** - * Encodes the specified Version message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Version.verify|verify} messages. + * Encodes the specified ListSessionEntityTypesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Version + * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IVersion} message Version message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListSessionEntityTypesRequest} message ListSessionEntityTypesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Version.encodeDelimited = function encodeDelimited(message, writer) { + ListSessionEntityTypesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Version message from the specified reader or buffer. + * Decodes a ListSessionEntityTypesRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.Version + * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.Version} Version + * @returns {google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest} ListSessionEntityTypesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Version.decode = function decode(reader, length) { + ListSessionEntityTypesRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.Version(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.parent = reader.string(); break; case 2: - message.displayName = reader.string(); + message.pageSize = reader.int32(); break; case 3: - message.description = reader.string(); - break; - case 4: - message.nluSettings = $root.google.cloud.dialogflow.cx.v3.NluSettings.decode(reader, reader.uint32()); - break; - case 5: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 6: - message.state = reader.int32(); + message.pageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -33063,201 +33957,126 @@ }; /** - * Decodes a Version message from the specified reader or buffer, length delimited. + * Decodes a ListSessionEntityTypesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Version + * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.Version} Version + * @returns {google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest} ListSessionEntityTypesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Version.decodeDelimited = function decodeDelimited(reader) { + ListSessionEntityTypesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Version message. + * Verifies a ListSessionEntityTypesRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.Version + * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Version.verify = function verify(message) { + ListSessionEntityTypesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.nluSettings != null && message.hasOwnProperty("nluSettings")) { - var error = $root.google.cloud.dialogflow.cx.v3.NluSettings.verify(message.nluSettings); - if (error) - return "nluSettings." + error; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; return null; }; /** - * Creates a Version message from a plain object. Also converts values to their respective internal types. + * Creates a ListSessionEntityTypesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.Version + * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.Version} Version + * @returns {google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest} ListSessionEntityTypesRequest */ - Version.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.Version) + ListSessionEntityTypesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.Version(); - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.description != null) - message.description = String(object.description); - if (object.nluSettings != null) { - if (typeof object.nluSettings !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.Version.nluSettings: object expected"); - message.nluSettings = $root.google.cloud.dialogflow.cx.v3.NluSettings.fromObject(object.nluSettings); - } - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.Version.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - switch (object.state) { - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "RUNNING": - case 1: - message.state = 1; - break; - case "SUCCEEDED": - case 2: - message.state = 2; - break; - case "FAILED": - case 3: - message.state = 3; - break; - } + var message = new $root.google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); return message; }; /** - * Creates a plain object from a Version message. Also converts values to other types if specified. + * Creates a plain object from a ListSessionEntityTypesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.Version + * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest * @static - * @param {google.cloud.dialogflow.cx.v3.Version} message Version + * @param {google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest} message ListSessionEntityTypesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Version.toObject = function toObject(message, options) { + ListSessionEntityTypesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.displayName = ""; - object.description = ""; - object.nluSettings = null; - object.createTime = null; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.nluSettings != null && message.hasOwnProperty("nluSettings")) - object.nluSettings = $root.google.cloud.dialogflow.cx.v3.NluSettings.toObject(message.nluSettings, options); - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.Version.State[message.state] : message.state; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; return object; }; /** - * Converts this Version to JSON. + * Converts this ListSessionEntityTypesRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.Version + * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest * @instance * @returns {Object.} JSON object */ - Version.prototype.toJSON = function toJSON() { + ListSessionEntityTypesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * State enum. - * @name google.cloud.dialogflow.cx.v3.Version.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} RUNNING=1 RUNNING value - * @property {number} SUCCEEDED=2 SUCCEEDED value - * @property {number} FAILED=3 FAILED value - */ - Version.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "RUNNING"] = 1; - values[valuesById[2] = "SUCCEEDED"] = 2; - values[valuesById[3] = "FAILED"] = 3; - return values; - })(); - - return Version; + return ListSessionEntityTypesRequest; })(); - v3.ListVersionsRequest = (function() { + v3.ListSessionEntityTypesResponse = (function() { /** - * Properties of a ListVersionsRequest. + * Properties of a ListSessionEntityTypesResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IListVersionsRequest - * @property {string|null} [parent] ListVersionsRequest parent - * @property {number|null} [pageSize] ListVersionsRequest pageSize - * @property {string|null} [pageToken] ListVersionsRequest pageToken + * @interface IListSessionEntityTypesResponse + * @property {Array.|null} [sessionEntityTypes] ListSessionEntityTypesResponse sessionEntityTypes + * @property {string|null} [nextPageToken] ListSessionEntityTypesResponse nextPageToken */ /** - * Constructs a new ListVersionsRequest. + * Constructs a new ListSessionEntityTypesResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a ListVersionsRequest. - * @implements IListVersionsRequest + * @classdesc Represents a ListSessionEntityTypesResponse. + * @implements IListSessionEntityTypesResponse * @constructor - * @param {google.cloud.dialogflow.cx.v3.IListVersionsRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IListSessionEntityTypesResponse=} [properties] Properties to set */ - function ListVersionsRequest(properties) { + function ListSessionEntityTypesResponse(properties) { + this.sessionEntityTypes = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -33265,101 +34084,91 @@ } /** - * ListVersionsRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3.ListVersionsRequest + * ListSessionEntityTypesResponse sessionEntityTypes. + * @member {Array.} sessionEntityTypes + * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse * @instance */ - ListVersionsRequest.prototype.parent = ""; + ListSessionEntityTypesResponse.prototype.sessionEntityTypes = $util.emptyArray; /** - * ListVersionsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dialogflow.cx.v3.ListVersionsRequest - * @instance - */ - ListVersionsRequest.prototype.pageSize = 0; - - /** - * ListVersionsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dialogflow.cx.v3.ListVersionsRequest + * ListSessionEntityTypesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse * @instance */ - ListVersionsRequest.prototype.pageToken = ""; + ListSessionEntityTypesResponse.prototype.nextPageToken = ""; /** - * Creates a new ListVersionsRequest instance using the specified properties. + * Creates a new ListSessionEntityTypesResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.ListVersionsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IListVersionsRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ListVersionsRequest} ListVersionsRequest instance + * @param {google.cloud.dialogflow.cx.v3.IListSessionEntityTypesResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse} ListSessionEntityTypesResponse instance */ - ListVersionsRequest.create = function create(properties) { - return new ListVersionsRequest(properties); + ListSessionEntityTypesResponse.create = function create(properties) { + return new ListSessionEntityTypesResponse(properties); }; /** - * Encodes the specified ListVersionsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListVersionsRequest.verify|verify} messages. + * Encodes the specified ListSessionEntityTypesResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ListVersionsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IListVersionsRequest} message ListVersionsRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListSessionEntityTypesResponse} message ListSessionEntityTypesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListVersionsRequest.encode = function encode(message, writer) { + ListSessionEntityTypesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.sessionEntityTypes != null && message.sessionEntityTypes.length) + for (var i = 0; i < message.sessionEntityTypes.length; ++i) + $root.google.cloud.dialogflow.cx.v3.SessionEntityType.encode(message.sessionEntityTypes[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified ListVersionsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListVersionsRequest.verify|verify} messages. + * Encodes the specified ListSessionEntityTypesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListVersionsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IListVersionsRequest} message ListVersionsRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListSessionEntityTypesResponse} message ListSessionEntityTypesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListVersionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListSessionEntityTypesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListVersionsRequest message from the specified reader or buffer. + * Decodes a ListSessionEntityTypesResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ListVersionsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.ListVersionsRequest} ListVersionsRequest + * @returns {google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse} ListSessionEntityTypesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListVersionsRequest.decode = function decode(reader, length) { + ListSessionEntityTypesResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ListVersionsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); + if (!(message.sessionEntityTypes && message.sessionEntityTypes.length)) + message.sessionEntityTypes = []; + message.sessionEntityTypes.push($root.google.cloud.dialogflow.cx.v3.SessionEntityType.decode(reader, reader.uint32())); break; case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); + message.nextPageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -33370,126 +34179,133 @@ }; /** - * Decodes a ListVersionsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListSessionEntityTypesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListVersionsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ListVersionsRequest} ListVersionsRequest + * @returns {google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse} ListSessionEntityTypesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListVersionsRequest.decodeDelimited = function decodeDelimited(reader) { + ListSessionEntityTypesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListVersionsRequest message. + * Verifies a ListSessionEntityTypesResponse message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ListVersionsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListVersionsRequest.verify = function verify(message) { + ListSessionEntityTypesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; + if (message.sessionEntityTypes != null && message.hasOwnProperty("sessionEntityTypes")) { + if (!Array.isArray(message.sessionEntityTypes)) + return "sessionEntityTypes: array expected"; + for (var i = 0; i < message.sessionEntityTypes.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.SessionEntityType.verify(message.sessionEntityTypes[i]); + if (error) + return "sessionEntityTypes." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a ListVersionsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListSessionEntityTypesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ListVersionsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ListVersionsRequest} ListVersionsRequest + * @returns {google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse} ListSessionEntityTypesResponse */ - ListVersionsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListVersionsRequest) + ListSessionEntityTypesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.ListVersionsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); + var message = new $root.google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse(); + if (object.sessionEntityTypes) { + if (!Array.isArray(object.sessionEntityTypes)) + throw TypeError(".google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse.sessionEntityTypes: array expected"); + message.sessionEntityTypes = []; + for (var i = 0; i < object.sessionEntityTypes.length; ++i) { + if (typeof object.sessionEntityTypes[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse.sessionEntityTypes: object expected"); + message.sessionEntityTypes[i] = $root.google.cloud.dialogflow.cx.v3.SessionEntityType.fromObject(object.sessionEntityTypes[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a ListVersionsRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListSessionEntityTypesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ListVersionsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse * @static - * @param {google.cloud.dialogflow.cx.v3.ListVersionsRequest} message ListVersionsRequest + * @param {google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse} message ListSessionEntityTypesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListVersionsRequest.toObject = function toObject(message, options) { + ListSessionEntityTypesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; + if (options.arrays || options.defaults) + object.sessionEntityTypes = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.sessionEntityTypes && message.sessionEntityTypes.length) { + object.sessionEntityTypes = []; + for (var j = 0; j < message.sessionEntityTypes.length; ++j) + object.sessionEntityTypes[j] = $root.google.cloud.dialogflow.cx.v3.SessionEntityType.toObject(message.sessionEntityTypes[j], options); } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this ListVersionsRequest to JSON. + * Converts this ListSessionEntityTypesResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ListVersionsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse * @instance * @returns {Object.} JSON object */ - ListVersionsRequest.prototype.toJSON = function toJSON() { + ListSessionEntityTypesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListVersionsRequest; + return ListSessionEntityTypesResponse; })(); - v3.ListVersionsResponse = (function() { + v3.GetSessionEntityTypeRequest = (function() { /** - * Properties of a ListVersionsResponse. + * Properties of a GetSessionEntityTypeRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IListVersionsResponse - * @property {Array.|null} [versions] ListVersionsResponse versions - * @property {string|null} [nextPageToken] ListVersionsResponse nextPageToken + * @interface IGetSessionEntityTypeRequest + * @property {string|null} [name] GetSessionEntityTypeRequest name */ /** - * Constructs a new ListVersionsResponse. + * Constructs a new GetSessionEntityTypeRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a ListVersionsResponse. - * @implements IListVersionsResponse + * @classdesc Represents a GetSessionEntityTypeRequest. + * @implements IGetSessionEntityTypeRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IListVersionsResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IGetSessionEntityTypeRequest=} [properties] Properties to set */ - function ListVersionsResponse(properties) { - this.versions = []; + function GetSessionEntityTypeRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -33497,91 +34313,75 @@ } /** - * ListVersionsResponse versions. - * @member {Array.} versions - * @memberof google.cloud.dialogflow.cx.v3.ListVersionsResponse - * @instance - */ - ListVersionsResponse.prototype.versions = $util.emptyArray; - - /** - * ListVersionsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dialogflow.cx.v3.ListVersionsResponse + * GetSessionEntityTypeRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest * @instance */ - ListVersionsResponse.prototype.nextPageToken = ""; + GetSessionEntityTypeRequest.prototype.name = ""; /** - * Creates a new ListVersionsResponse instance using the specified properties. + * Creates a new GetSessionEntityTypeRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.ListVersionsResponse + * @memberof google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IListVersionsResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ListVersionsResponse} ListVersionsResponse instance + * @param {google.cloud.dialogflow.cx.v3.IGetSessionEntityTypeRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest} GetSessionEntityTypeRequest instance */ - ListVersionsResponse.create = function create(properties) { - return new ListVersionsResponse(properties); + GetSessionEntityTypeRequest.create = function create(properties) { + return new GetSessionEntityTypeRequest(properties); }; /** - * Encodes the specified ListVersionsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListVersionsResponse.verify|verify} messages. + * Encodes the specified GetSessionEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ListVersionsResponse + * @memberof google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IListVersionsResponse} message ListVersionsResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IGetSessionEntityTypeRequest} message GetSessionEntityTypeRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListVersionsResponse.encode = function encode(message, writer) { + GetSessionEntityTypeRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.versions != null && message.versions.length) - for (var i = 0; i < message.versions.length; ++i) - $root.google.cloud.dialogflow.cx.v3.Version.encode(message.versions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified ListVersionsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListVersionsResponse.verify|verify} messages. + * Encodes the specified GetSessionEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListVersionsResponse + * @memberof google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IListVersionsResponse} message ListVersionsResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IGetSessionEntityTypeRequest} message GetSessionEntityTypeRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListVersionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetSessionEntityTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListVersionsResponse message from the specified reader or buffer. + * Decodes a GetSessionEntityTypeRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ListVersionsResponse + * @memberof google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.ListVersionsResponse} ListVersionsResponse + * @returns {google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest} GetSessionEntityTypeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListVersionsResponse.decode = function decode(reader, length) { + GetSessionEntityTypeRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ListVersionsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.versions && message.versions.length)) - message.versions = []; - message.versions.push($root.google.cloud.dialogflow.cx.v3.Version.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -33592,133 +34392,108 @@ }; /** - * Decodes a ListVersionsResponse message from the specified reader or buffer, length delimited. + * Decodes a GetSessionEntityTypeRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListVersionsResponse + * @memberof google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ListVersionsResponse} ListVersionsResponse + * @returns {google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest} GetSessionEntityTypeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListVersionsResponse.decodeDelimited = function decodeDelimited(reader) { + GetSessionEntityTypeRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListVersionsResponse message. + * Verifies a GetSessionEntityTypeRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ListVersionsResponse + * @memberof google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListVersionsResponse.verify = function verify(message) { + GetSessionEntityTypeRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.versions != null && message.hasOwnProperty("versions")) { - if (!Array.isArray(message.versions)) - return "versions: array expected"; - for (var i = 0; i < message.versions.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.Version.verify(message.versions[i]); - if (error) - return "versions." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a ListVersionsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetSessionEntityTypeRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ListVersionsResponse + * @memberof google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ListVersionsResponse} ListVersionsResponse + * @returns {google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest} GetSessionEntityTypeRequest */ - ListVersionsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListVersionsResponse) + GetSessionEntityTypeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.ListVersionsResponse(); - if (object.versions) { - if (!Array.isArray(object.versions)) - throw TypeError(".google.cloud.dialogflow.cx.v3.ListVersionsResponse.versions: array expected"); - message.versions = []; - for (var i = 0; i < object.versions.length; ++i) { - if (typeof object.versions[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.ListVersionsResponse.versions: object expected"); - message.versions[i] = $root.google.cloud.dialogflow.cx.v3.Version.fromObject(object.versions[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); + var message = new $root.google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a ListVersionsResponse message. Also converts values to other types if specified. + * Creates a plain object from a GetSessionEntityTypeRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ListVersionsResponse + * @memberof google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest * @static - * @param {google.cloud.dialogflow.cx.v3.ListVersionsResponse} message ListVersionsResponse + * @param {google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest} message GetSessionEntityTypeRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListVersionsResponse.toObject = function toObject(message, options) { + GetSessionEntityTypeRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.versions = []; if (options.defaults) - object.nextPageToken = ""; - if (message.versions && message.versions.length) { - object.versions = []; - for (var j = 0; j < message.versions.length; ++j) - object.versions[j] = $root.google.cloud.dialogflow.cx.v3.Version.toObject(message.versions[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this ListVersionsResponse to JSON. + * Converts this GetSessionEntityTypeRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ListVersionsResponse + * @memberof google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest * @instance * @returns {Object.} JSON object */ - ListVersionsResponse.prototype.toJSON = function toJSON() { + GetSessionEntityTypeRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListVersionsResponse; + return GetSessionEntityTypeRequest; })(); - v3.GetVersionRequest = (function() { + v3.CreateSessionEntityTypeRequest = (function() { /** - * Properties of a GetVersionRequest. + * Properties of a CreateSessionEntityTypeRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IGetVersionRequest - * @property {string|null} [name] GetVersionRequest name + * @interface ICreateSessionEntityTypeRequest + * @property {string|null} [parent] CreateSessionEntityTypeRequest parent + * @property {google.cloud.dialogflow.cx.v3.ISessionEntityType|null} [sessionEntityType] CreateSessionEntityTypeRequest sessionEntityType */ /** - * Constructs a new GetVersionRequest. + * Constructs a new CreateSessionEntityTypeRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a GetVersionRequest. - * @implements IGetVersionRequest + * @classdesc Represents a CreateSessionEntityTypeRequest. + * @implements ICreateSessionEntityTypeRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IGetVersionRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.ICreateSessionEntityTypeRequest=} [properties] Properties to set */ - function GetVersionRequest(properties) { + function CreateSessionEntityTypeRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -33726,75 +34501,88 @@ } /** - * GetVersionRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.GetVersionRequest + * CreateSessionEntityTypeRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest * @instance */ - GetVersionRequest.prototype.name = ""; + CreateSessionEntityTypeRequest.prototype.parent = ""; /** - * Creates a new GetVersionRequest instance using the specified properties. + * CreateSessionEntityTypeRequest sessionEntityType. + * @member {google.cloud.dialogflow.cx.v3.ISessionEntityType|null|undefined} sessionEntityType + * @memberof google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest + * @instance + */ + CreateSessionEntityTypeRequest.prototype.sessionEntityType = null; + + /** + * Creates a new CreateSessionEntityTypeRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.GetVersionRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IGetVersionRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.GetVersionRequest} GetVersionRequest instance + * @param {google.cloud.dialogflow.cx.v3.ICreateSessionEntityTypeRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest} CreateSessionEntityTypeRequest instance */ - GetVersionRequest.create = function create(properties) { - return new GetVersionRequest(properties); + CreateSessionEntityTypeRequest.create = function create(properties) { + return new CreateSessionEntityTypeRequest(properties); }; /** - * Encodes the specified GetVersionRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetVersionRequest.verify|verify} messages. + * Encodes the specified CreateSessionEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.GetVersionRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IGetVersionRequest} message GetVersionRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ICreateSessionEntityTypeRequest} message CreateSessionEntityTypeRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetVersionRequest.encode = function encode(message, writer) { + CreateSessionEntityTypeRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.sessionEntityType != null && Object.hasOwnProperty.call(message, "sessionEntityType")) + $root.google.cloud.dialogflow.cx.v3.SessionEntityType.encode(message.sessionEntityType, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetVersionRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetVersionRequest.verify|verify} messages. + * Encodes the specified CreateSessionEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.GetVersionRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IGetVersionRequest} message GetVersionRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ICreateSessionEntityTypeRequest} message CreateSessionEntityTypeRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetVersionRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreateSessionEntityTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetVersionRequest message from the specified reader or buffer. + * Decodes a CreateSessionEntityTypeRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.GetVersionRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.GetVersionRequest} GetVersionRequest + * @returns {google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest} CreateSessionEntityTypeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetVersionRequest.decode = function decode(reader, length) { + CreateSessionEntityTypeRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.GetVersionRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.parent = reader.string(); + break; + case 2: + message.sessionEntityType = $root.google.cloud.dialogflow.cx.v3.SessionEntityType.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -33805,323 +34593,122 @@ }; /** - * Decodes a GetVersionRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateSessionEntityTypeRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.GetVersionRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.GetVersionRequest} GetVersionRequest + * @returns {google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest} CreateSessionEntityTypeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetVersionRequest.decodeDelimited = function decodeDelimited(reader) { + CreateSessionEntityTypeRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetVersionRequest message. + * Verifies a CreateSessionEntityTypeRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.GetVersionRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetVersionRequest.verify = function verify(message) { + CreateSessionEntityTypeRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.sessionEntityType != null && message.hasOwnProperty("sessionEntityType")) { + var error = $root.google.cloud.dialogflow.cx.v3.SessionEntityType.verify(message.sessionEntityType); + if (error) + return "sessionEntityType." + error; + } return null; }; /** - * Creates a GetVersionRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateSessionEntityTypeRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.GetVersionRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.GetVersionRequest} GetVersionRequest + * @returns {google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest} CreateSessionEntityTypeRequest */ - GetVersionRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.GetVersionRequest) + CreateSessionEntityTypeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.GetVersionRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.sessionEntityType != null) { + if (typeof object.sessionEntityType !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest.sessionEntityType: object expected"); + message.sessionEntityType = $root.google.cloud.dialogflow.cx.v3.SessionEntityType.fromObject(object.sessionEntityType); + } return message; }; /** - * Creates a plain object from a GetVersionRequest message. Also converts values to other types if specified. + * Creates a plain object from a CreateSessionEntityTypeRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.GetVersionRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest * @static - * @param {google.cloud.dialogflow.cx.v3.GetVersionRequest} message GetVersionRequest + * @param {google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest} message CreateSessionEntityTypeRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetVersionRequest.toObject = function toObject(message, options) { + CreateSessionEntityTypeRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (options.defaults) { + object.parent = ""; + object.sessionEntityType = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.sessionEntityType != null && message.hasOwnProperty("sessionEntityType")) + object.sessionEntityType = $root.google.cloud.dialogflow.cx.v3.SessionEntityType.toObject(message.sessionEntityType, options); return object; }; /** - * Converts this GetVersionRequest to JSON. + * Converts this CreateSessionEntityTypeRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.GetVersionRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest * @instance * @returns {Object.} JSON object */ - GetVersionRequest.prototype.toJSON = function toJSON() { + CreateSessionEntityTypeRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetVersionRequest; + return CreateSessionEntityTypeRequest; })(); - v3.CreateVersionRequest = (function() { + v3.UpdateSessionEntityTypeRequest = (function() { /** - * Properties of a CreateVersionRequest. + * Properties of an UpdateSessionEntityTypeRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface ICreateVersionRequest - * @property {string|null} [parent] CreateVersionRequest parent - * @property {google.cloud.dialogflow.cx.v3.IVersion|null} [version] CreateVersionRequest version + * @interface IUpdateSessionEntityTypeRequest + * @property {google.cloud.dialogflow.cx.v3.ISessionEntityType|null} [sessionEntityType] UpdateSessionEntityTypeRequest sessionEntityType + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateSessionEntityTypeRequest updateMask */ /** - * Constructs a new CreateVersionRequest. + * Constructs a new UpdateSessionEntityTypeRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a CreateVersionRequest. - * @implements ICreateVersionRequest - * @constructor - * @param {google.cloud.dialogflow.cx.v3.ICreateVersionRequest=} [properties] Properties to set - */ - function CreateVersionRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateVersionRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3.CreateVersionRequest - * @instance - */ - CreateVersionRequest.prototype.parent = ""; - - /** - * CreateVersionRequest version. - * @member {google.cloud.dialogflow.cx.v3.IVersion|null|undefined} version - * @memberof google.cloud.dialogflow.cx.v3.CreateVersionRequest - * @instance - */ - CreateVersionRequest.prototype.version = null; - - /** - * Creates a new CreateVersionRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.CreateVersionRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.ICreateVersionRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.CreateVersionRequest} CreateVersionRequest instance - */ - CreateVersionRequest.create = function create(properties) { - return new CreateVersionRequest(properties); - }; - - /** - * Encodes the specified CreateVersionRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateVersionRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.CreateVersionRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.ICreateVersionRequest} message CreateVersionRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateVersionRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - $root.google.cloud.dialogflow.cx.v3.Version.encode(message.version, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CreateVersionRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateVersionRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.CreateVersionRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.ICreateVersionRequest} message CreateVersionRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateVersionRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateVersionRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.CreateVersionRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.CreateVersionRequest} CreateVersionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateVersionRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.CreateVersionRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.version = $root.google.cloud.dialogflow.cx.v3.Version.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateVersionRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.CreateVersionRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.CreateVersionRequest} CreateVersionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateVersionRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateVersionRequest message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.CreateVersionRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateVersionRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.version != null && message.hasOwnProperty("version")) { - var error = $root.google.cloud.dialogflow.cx.v3.Version.verify(message.version); - if (error) - return "version." + error; - } - return null; - }; - - /** - * Creates a CreateVersionRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.CreateVersionRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.CreateVersionRequest} CreateVersionRequest - */ - CreateVersionRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.CreateVersionRequest) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.CreateVersionRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.version != null) { - if (typeof object.version !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.CreateVersionRequest.version: object expected"); - message.version = $root.google.cloud.dialogflow.cx.v3.Version.fromObject(object.version); - } - return message; - }; - - /** - * Creates a plain object from a CreateVersionRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.CreateVersionRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.CreateVersionRequest} message CreateVersionRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateVersionRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.version = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.version != null && message.hasOwnProperty("version")) - object.version = $root.google.cloud.dialogflow.cx.v3.Version.toObject(message.version, options); - return object; - }; - - /** - * Converts this CreateVersionRequest to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.CreateVersionRequest - * @instance - * @returns {Object.} JSON object - */ - CreateVersionRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return CreateVersionRequest; - })(); - - v3.UpdateVersionRequest = (function() { - - /** - * Properties of an UpdateVersionRequest. - * @memberof google.cloud.dialogflow.cx.v3 - * @interface IUpdateVersionRequest - * @property {google.cloud.dialogflow.cx.v3.IVersion|null} [version] UpdateVersionRequest version - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateVersionRequest updateMask - */ - - /** - * Constructs a new UpdateVersionRequest. - * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents an UpdateVersionRequest. - * @implements IUpdateVersionRequest + * @classdesc Represents an UpdateSessionEntityTypeRequest. + * @implements IUpdateSessionEntityTypeRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IUpdateVersionRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IUpdateSessionEntityTypeRequest=} [properties] Properties to set */ - function UpdateVersionRequest(properties) { + function UpdateSessionEntityTypeRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -34129,85 +34716,85 @@ } /** - * UpdateVersionRequest version. - * @member {google.cloud.dialogflow.cx.v3.IVersion|null|undefined} version - * @memberof google.cloud.dialogflow.cx.v3.UpdateVersionRequest + * UpdateSessionEntityTypeRequest sessionEntityType. + * @member {google.cloud.dialogflow.cx.v3.ISessionEntityType|null|undefined} sessionEntityType + * @memberof google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest * @instance */ - UpdateVersionRequest.prototype.version = null; + UpdateSessionEntityTypeRequest.prototype.sessionEntityType = null; /** - * UpdateVersionRequest updateMask. + * UpdateSessionEntityTypeRequest updateMask. * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.dialogflow.cx.v3.UpdateVersionRequest + * @memberof google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest * @instance */ - UpdateVersionRequest.prototype.updateMask = null; + UpdateSessionEntityTypeRequest.prototype.updateMask = null; /** - * Creates a new UpdateVersionRequest instance using the specified properties. + * Creates a new UpdateSessionEntityTypeRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.UpdateVersionRequest + * @memberof google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IUpdateVersionRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.UpdateVersionRequest} UpdateVersionRequest instance + * @param {google.cloud.dialogflow.cx.v3.IUpdateSessionEntityTypeRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest} UpdateSessionEntityTypeRequest instance */ - UpdateVersionRequest.create = function create(properties) { - return new UpdateVersionRequest(properties); + UpdateSessionEntityTypeRequest.create = function create(properties) { + return new UpdateSessionEntityTypeRequest(properties); }; /** - * Encodes the specified UpdateVersionRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateVersionRequest.verify|verify} messages. + * Encodes the specified UpdateSessionEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.UpdateVersionRequest + * @memberof google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IUpdateVersionRequest} message UpdateVersionRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IUpdateSessionEntityTypeRequest} message UpdateSessionEntityTypeRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateVersionRequest.encode = function encode(message, writer) { + UpdateSessionEntityTypeRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - $root.google.cloud.dialogflow.cx.v3.Version.encode(message.version, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.sessionEntityType != null && Object.hasOwnProperty.call(message, "sessionEntityType")) + $root.google.cloud.dialogflow.cx.v3.SessionEntityType.encode(message.sessionEntityType, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified UpdateVersionRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateVersionRequest.verify|verify} messages. + * Encodes the specified UpdateSessionEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.UpdateVersionRequest + * @memberof google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IUpdateVersionRequest} message UpdateVersionRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IUpdateSessionEntityTypeRequest} message UpdateSessionEntityTypeRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateVersionRequest.encodeDelimited = function encodeDelimited(message, writer) { + UpdateSessionEntityTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateVersionRequest message from the specified reader or buffer. + * Decodes an UpdateSessionEntityTypeRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.UpdateVersionRequest + * @memberof google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.UpdateVersionRequest} UpdateVersionRequest + * @returns {google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest} UpdateSessionEntityTypeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateVersionRequest.decode = function decode(reader, length) { + UpdateSessionEntityTypeRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.UpdateVersionRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.version = $root.google.cloud.dialogflow.cx.v3.Version.decode(reader, reader.uint32()); + message.sessionEntityType = $root.google.cloud.dialogflow.cx.v3.SessionEntityType.decode(reader, reader.uint32()); break; case 2: message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); @@ -34221,36 +34808,36 @@ }; /** - * Decodes an UpdateVersionRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateSessionEntityTypeRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.UpdateVersionRequest + * @memberof google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.UpdateVersionRequest} UpdateVersionRequest + * @returns {google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest} UpdateSessionEntityTypeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateVersionRequest.decodeDelimited = function decodeDelimited(reader) { + UpdateSessionEntityTypeRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateVersionRequest message. + * Verifies an UpdateSessionEntityTypeRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.UpdateVersionRequest + * @memberof google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateVersionRequest.verify = function verify(message) { + UpdateSessionEntityTypeRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.version != null && message.hasOwnProperty("version")) { - var error = $root.google.cloud.dialogflow.cx.v3.Version.verify(message.version); + if (message.sessionEntityType != null && message.hasOwnProperty("sessionEntityType")) { + var error = $root.google.cloud.dialogflow.cx.v3.SessionEntityType.verify(message.sessionEntityType); if (error) - return "version." + error; + return "sessionEntityType." + error; } if (message.updateMask != null && message.hasOwnProperty("updateMask")) { var error = $root.google.protobuf.FieldMask.verify(message.updateMask); @@ -34261,86 +34848,86 @@ }; /** - * Creates an UpdateVersionRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateSessionEntityTypeRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.UpdateVersionRequest + * @memberof google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.UpdateVersionRequest} UpdateVersionRequest + * @returns {google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest} UpdateSessionEntityTypeRequest */ - UpdateVersionRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.UpdateVersionRequest) + UpdateSessionEntityTypeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.UpdateVersionRequest(); - if (object.version != null) { - if (typeof object.version !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.UpdateVersionRequest.version: object expected"); - message.version = $root.google.cloud.dialogflow.cx.v3.Version.fromObject(object.version); + var message = new $root.google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest(); + if (object.sessionEntityType != null) { + if (typeof object.sessionEntityType !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest.sessionEntityType: object expected"); + message.sessionEntityType = $root.google.cloud.dialogflow.cx.v3.SessionEntityType.fromObject(object.sessionEntityType); } if (object.updateMask != null) { if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.UpdateVersionRequest.updateMask: object expected"); + throw TypeError(".google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest.updateMask: object expected"); message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } return message; }; /** - * Creates a plain object from an UpdateVersionRequest message. Also converts values to other types if specified. + * Creates a plain object from an UpdateSessionEntityTypeRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.UpdateVersionRequest + * @memberof google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest * @static - * @param {google.cloud.dialogflow.cx.v3.UpdateVersionRequest} message UpdateVersionRequest + * @param {google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest} message UpdateSessionEntityTypeRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateVersionRequest.toObject = function toObject(message, options) { + UpdateSessionEntityTypeRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.version = null; + object.sessionEntityType = null; object.updateMask = null; } - if (message.version != null && message.hasOwnProperty("version")) - object.version = $root.google.cloud.dialogflow.cx.v3.Version.toObject(message.version, options); + if (message.sessionEntityType != null && message.hasOwnProperty("sessionEntityType")) + object.sessionEntityType = $root.google.cloud.dialogflow.cx.v3.SessionEntityType.toObject(message.sessionEntityType, options); if (message.updateMask != null && message.hasOwnProperty("updateMask")) object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this UpdateVersionRequest to JSON. + * Converts this UpdateSessionEntityTypeRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.UpdateVersionRequest + * @memberof google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest * @instance * @returns {Object.} JSON object */ - UpdateVersionRequest.prototype.toJSON = function toJSON() { + UpdateSessionEntityTypeRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UpdateVersionRequest; + return UpdateSessionEntityTypeRequest; })(); - v3.DeleteVersionRequest = (function() { + v3.DeleteSessionEntityTypeRequest = (function() { /** - * Properties of a DeleteVersionRequest. + * Properties of a DeleteSessionEntityTypeRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IDeleteVersionRequest - * @property {string|null} [name] DeleteVersionRequest name + * @interface IDeleteSessionEntityTypeRequest + * @property {string|null} [name] DeleteSessionEntityTypeRequest name */ /** - * Constructs a new DeleteVersionRequest. + * Constructs a new DeleteSessionEntityTypeRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a DeleteVersionRequest. - * @implements IDeleteVersionRequest + * @classdesc Represents a DeleteSessionEntityTypeRequest. + * @implements IDeleteSessionEntityTypeRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IDeleteVersionRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IDeleteSessionEntityTypeRequest=} [properties] Properties to set */ - function DeleteVersionRequest(properties) { + function DeleteSessionEntityTypeRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -34348,35 +34935,35 @@ } /** - * DeleteVersionRequest name. + * DeleteSessionEntityTypeRequest name. * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.DeleteVersionRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest * @instance */ - DeleteVersionRequest.prototype.name = ""; + DeleteSessionEntityTypeRequest.prototype.name = ""; /** - * Creates a new DeleteVersionRequest instance using the specified properties. + * Creates a new DeleteSessionEntityTypeRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.DeleteVersionRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IDeleteVersionRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.DeleteVersionRequest} DeleteVersionRequest instance + * @param {google.cloud.dialogflow.cx.v3.IDeleteSessionEntityTypeRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest} DeleteSessionEntityTypeRequest instance */ - DeleteVersionRequest.create = function create(properties) { - return new DeleteVersionRequest(properties); + DeleteSessionEntityTypeRequest.create = function create(properties) { + return new DeleteSessionEntityTypeRequest(properties); }; /** - * Encodes the specified DeleteVersionRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteVersionRequest.verify|verify} messages. + * Encodes the specified DeleteSessionEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.DeleteVersionRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IDeleteVersionRequest} message DeleteVersionRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IDeleteSessionEntityTypeRequest} message DeleteSessionEntityTypeRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteVersionRequest.encode = function encode(message, writer) { + DeleteSessionEntityTypeRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) @@ -34385,33 +34972,33 @@ }; /** - * Encodes the specified DeleteVersionRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteVersionRequest.verify|verify} messages. + * Encodes the specified DeleteSessionEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.DeleteVersionRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IDeleteVersionRequest} message DeleteVersionRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IDeleteSessionEntityTypeRequest} message DeleteSessionEntityTypeRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteVersionRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeleteSessionEntityTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteVersionRequest message from the specified reader or buffer. + * Decodes a DeleteSessionEntityTypeRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.DeleteVersionRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.DeleteVersionRequest} DeleteVersionRequest + * @returns {google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest} DeleteSessionEntityTypeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteVersionRequest.decode = function decode(reader, length) { + DeleteSessionEntityTypeRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.DeleteVersionRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -34427,30 +35014,30 @@ }; /** - * Decodes a DeleteVersionRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteSessionEntityTypeRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.DeleteVersionRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.DeleteVersionRequest} DeleteVersionRequest + * @returns {google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest} DeleteSessionEntityTypeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteVersionRequest.decodeDelimited = function decodeDelimited(reader) { + DeleteSessionEntityTypeRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteVersionRequest message. + * Verifies a DeleteSessionEntityTypeRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.DeleteVersionRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteVersionRequest.verify = function verify(message) { + DeleteSessionEntityTypeRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) @@ -34460,32 +35047,32 @@ }; /** - * Creates a DeleteVersionRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteSessionEntityTypeRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.DeleteVersionRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.DeleteVersionRequest} DeleteVersionRequest + * @returns {google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest} DeleteSessionEntityTypeRequest */ - DeleteVersionRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.DeleteVersionRequest) + DeleteSessionEntityTypeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.DeleteVersionRequest(); + var message = new $root.google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest(); if (object.name != null) message.name = String(object.name); return message; }; /** - * Creates a plain object from a DeleteVersionRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeleteSessionEntityTypeRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.DeleteVersionRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest * @static - * @param {google.cloud.dialogflow.cx.v3.DeleteVersionRequest} message DeleteVersionRequest + * @param {google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest} message DeleteSessionEntityTypeRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteVersionRequest.toObject = function toObject(message, options) { + DeleteSessionEntityTypeRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -34497,451 +35084,240 @@ }; /** - * Converts this DeleteVersionRequest to JSON. + * Converts this DeleteSessionEntityTypeRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.DeleteVersionRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest * @instance * @returns {Object.} JSON object */ - DeleteVersionRequest.prototype.toJSON = function toJSON() { + DeleteSessionEntityTypeRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeleteVersionRequest; + return DeleteSessionEntityTypeRequest; })(); - v3.LoadVersionRequest = (function() { - - /** - * Properties of a LoadVersionRequest. - * @memberof google.cloud.dialogflow.cx.v3 - * @interface ILoadVersionRequest - * @property {string|null} [name] LoadVersionRequest name - * @property {boolean|null} [allowOverrideAgentResources] LoadVersionRequest allowOverrideAgentResources - */ + v3.TransitionRouteGroups = (function() { /** - * Constructs a new LoadVersionRequest. + * Constructs a new TransitionRouteGroups service. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a LoadVersionRequest. - * @implements ILoadVersionRequest + * @classdesc Represents a TransitionRouteGroups + * @extends $protobuf.rpc.Service * @constructor - * @param {google.cloud.dialogflow.cx.v3.ILoadVersionRequest=} [properties] Properties to set + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited */ - function LoadVersionRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function TransitionRouteGroups(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); } - /** - * LoadVersionRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.LoadVersionRequest - * @instance - */ - LoadVersionRequest.prototype.name = ""; - - /** - * LoadVersionRequest allowOverrideAgentResources. - * @member {boolean} allowOverrideAgentResources - * @memberof google.cloud.dialogflow.cx.v3.LoadVersionRequest - * @instance - */ - LoadVersionRequest.prototype.allowOverrideAgentResources = false; + (TransitionRouteGroups.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = TransitionRouteGroups; /** - * Creates a new LoadVersionRequest instance using the specified properties. + * Creates new TransitionRouteGroups service using the specified rpc implementation. * @function create - * @memberof google.cloud.dialogflow.cx.v3.LoadVersionRequest + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroups * @static - * @param {google.cloud.dialogflow.cx.v3.ILoadVersionRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.LoadVersionRequest} LoadVersionRequest instance + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {TransitionRouteGroups} RPC service. Useful where requests and/or responses are streamed. */ - LoadVersionRequest.create = function create(properties) { - return new LoadVersionRequest(properties); + TransitionRouteGroups.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); }; /** - * Encodes the specified LoadVersionRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.LoadVersionRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.LoadVersionRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.ILoadVersionRequest} message LoadVersionRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LoadVersionRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.allowOverrideAgentResources != null && Object.hasOwnProperty.call(message, "allowOverrideAgentResources")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowOverrideAgentResources); - return writer; - }; - - /** - * Encodes the specified LoadVersionRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.LoadVersionRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.LoadVersionRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.ILoadVersionRequest} message LoadVersionRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LoadVersionRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LoadVersionRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.LoadVersionRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.LoadVersionRequest} LoadVersionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LoadVersionRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.LoadVersionRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.allowOverrideAgentResources = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LoadVersionRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.LoadVersionRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.LoadVersionRequest} LoadVersionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LoadVersionRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LoadVersionRequest message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.LoadVersionRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LoadVersionRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.allowOverrideAgentResources != null && message.hasOwnProperty("allowOverrideAgentResources")) - if (typeof message.allowOverrideAgentResources !== "boolean") - return "allowOverrideAgentResources: boolean expected"; - return null; - }; - - /** - * Creates a LoadVersionRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.LoadVersionRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.LoadVersionRequest} LoadVersionRequest - */ - LoadVersionRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.LoadVersionRequest) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.LoadVersionRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.allowOverrideAgentResources != null) - message.allowOverrideAgentResources = Boolean(object.allowOverrideAgentResources); - return message; - }; - - /** - * Creates a plain object from a LoadVersionRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.LoadVersionRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.LoadVersionRequest} message LoadVersionRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LoadVersionRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.allowOverrideAgentResources = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.allowOverrideAgentResources != null && message.hasOwnProperty("allowOverrideAgentResources")) - object.allowOverrideAgentResources = message.allowOverrideAgentResources; - return object; - }; - - /** - * Converts this LoadVersionRequest to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.LoadVersionRequest - * @instance - * @returns {Object.} JSON object - */ - LoadVersionRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return LoadVersionRequest; - })(); - - v3.Webhooks = (function() { - - /** - * Constructs a new Webhooks service. - * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a Webhooks - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function Webhooks(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (Webhooks.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Webhooks; - - /** - * Creates new Webhooks service using the specified rpc implementation. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.Webhooks - * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {Webhooks} RPC service. Useful where requests and/or responses are streamed. - */ - Webhooks.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Webhooks#listWebhooks}. - * @memberof google.cloud.dialogflow.cx.v3.Webhooks - * @typedef ListWebhooksCallback + * Callback as used by {@link google.cloud.dialogflow.cx.v3.TransitionRouteGroups#listTransitionRouteGroups}. + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroups + * @typedef ListTransitionRouteGroupsCallback * @type {function} * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.ListWebhooksResponse} [response] ListWebhooksResponse + * @param {google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse} [response] ListTransitionRouteGroupsResponse */ /** - * Calls ListWebhooks. - * @function listWebhooks - * @memberof google.cloud.dialogflow.cx.v3.Webhooks + * Calls ListTransitionRouteGroups. + * @function listTransitionRouteGroups + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroups * @instance - * @param {google.cloud.dialogflow.cx.v3.IListWebhooksRequest} request ListWebhooksRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Webhooks.ListWebhooksCallback} callback Node-style callback called with the error, if any, and ListWebhooksResponse + * @param {google.cloud.dialogflow.cx.v3.IListTransitionRouteGroupsRequest} request ListTransitionRouteGroupsRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.TransitionRouteGroups.ListTransitionRouteGroupsCallback} callback Node-style callback called with the error, if any, and ListTransitionRouteGroupsResponse * @returns {undefined} * @variation 1 */ - Object.defineProperty(Webhooks.prototype.listWebhooks = function listWebhooks(request, callback) { - return this.rpcCall(listWebhooks, $root.google.cloud.dialogflow.cx.v3.ListWebhooksRequest, $root.google.cloud.dialogflow.cx.v3.ListWebhooksResponse, request, callback); - }, "name", { value: "ListWebhooks" }); + Object.defineProperty(TransitionRouteGroups.prototype.listTransitionRouteGroups = function listTransitionRouteGroups(request, callback) { + return this.rpcCall(listTransitionRouteGroups, $root.google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest, $root.google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse, request, callback); + }, "name", { value: "ListTransitionRouteGroups" }); /** - * Calls ListWebhooks. - * @function listWebhooks - * @memberof google.cloud.dialogflow.cx.v3.Webhooks + * Calls ListTransitionRouteGroups. + * @function listTransitionRouteGroups + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroups * @instance - * @param {google.cloud.dialogflow.cx.v3.IListWebhooksRequest} request ListWebhooksRequest message or plain object - * @returns {Promise} Promise + * @param {google.cloud.dialogflow.cx.v3.IListTransitionRouteGroupsRequest} request ListTransitionRouteGroupsRequest message or plain object + * @returns {Promise} Promise * @variation 2 */ /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Webhooks#getWebhook}. - * @memberof google.cloud.dialogflow.cx.v3.Webhooks - * @typedef GetWebhookCallback + * Callback as used by {@link google.cloud.dialogflow.cx.v3.TransitionRouteGroups#getTransitionRouteGroup}. + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroups + * @typedef GetTransitionRouteGroupCallback * @type {function} * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.Webhook} [response] Webhook + * @param {google.cloud.dialogflow.cx.v3.TransitionRouteGroup} [response] TransitionRouteGroup */ /** - * Calls GetWebhook. - * @function getWebhook - * @memberof google.cloud.dialogflow.cx.v3.Webhooks + * Calls GetTransitionRouteGroup. + * @function getTransitionRouteGroup + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroups * @instance - * @param {google.cloud.dialogflow.cx.v3.IGetWebhookRequest} request GetWebhookRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Webhooks.GetWebhookCallback} callback Node-style callback called with the error, if any, and Webhook + * @param {google.cloud.dialogflow.cx.v3.IGetTransitionRouteGroupRequest} request GetTransitionRouteGroupRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.TransitionRouteGroups.GetTransitionRouteGroupCallback} callback Node-style callback called with the error, if any, and TransitionRouteGroup * @returns {undefined} * @variation 1 */ - Object.defineProperty(Webhooks.prototype.getWebhook = function getWebhook(request, callback) { - return this.rpcCall(getWebhook, $root.google.cloud.dialogflow.cx.v3.GetWebhookRequest, $root.google.cloud.dialogflow.cx.v3.Webhook, request, callback); - }, "name", { value: "GetWebhook" }); + Object.defineProperty(TransitionRouteGroups.prototype.getTransitionRouteGroup = function getTransitionRouteGroup(request, callback) { + return this.rpcCall(getTransitionRouteGroup, $root.google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest, $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup, request, callback); + }, "name", { value: "GetTransitionRouteGroup" }); /** - * Calls GetWebhook. - * @function getWebhook - * @memberof google.cloud.dialogflow.cx.v3.Webhooks + * Calls GetTransitionRouteGroup. + * @function getTransitionRouteGroup + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroups * @instance - * @param {google.cloud.dialogflow.cx.v3.IGetWebhookRequest} request GetWebhookRequest message or plain object - * @returns {Promise} Promise + * @param {google.cloud.dialogflow.cx.v3.IGetTransitionRouteGroupRequest} request GetTransitionRouteGroupRequest message or plain object + * @returns {Promise} Promise * @variation 2 */ /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Webhooks#createWebhook}. - * @memberof google.cloud.dialogflow.cx.v3.Webhooks - * @typedef CreateWebhookCallback + * Callback as used by {@link google.cloud.dialogflow.cx.v3.TransitionRouteGroups#createTransitionRouteGroup}. + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroups + * @typedef CreateTransitionRouteGroupCallback * @type {function} * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.Webhook} [response] Webhook + * @param {google.cloud.dialogflow.cx.v3.TransitionRouteGroup} [response] TransitionRouteGroup */ /** - * Calls CreateWebhook. - * @function createWebhook - * @memberof google.cloud.dialogflow.cx.v3.Webhooks + * Calls CreateTransitionRouteGroup. + * @function createTransitionRouteGroup + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroups * @instance - * @param {google.cloud.dialogflow.cx.v3.ICreateWebhookRequest} request CreateWebhookRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Webhooks.CreateWebhookCallback} callback Node-style callback called with the error, if any, and Webhook + * @param {google.cloud.dialogflow.cx.v3.ICreateTransitionRouteGroupRequest} request CreateTransitionRouteGroupRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.TransitionRouteGroups.CreateTransitionRouteGroupCallback} callback Node-style callback called with the error, if any, and TransitionRouteGroup * @returns {undefined} * @variation 1 */ - Object.defineProperty(Webhooks.prototype.createWebhook = function createWebhook(request, callback) { - return this.rpcCall(createWebhook, $root.google.cloud.dialogflow.cx.v3.CreateWebhookRequest, $root.google.cloud.dialogflow.cx.v3.Webhook, request, callback); - }, "name", { value: "CreateWebhook" }); + Object.defineProperty(TransitionRouteGroups.prototype.createTransitionRouteGroup = function createTransitionRouteGroup(request, callback) { + return this.rpcCall(createTransitionRouteGroup, $root.google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest, $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup, request, callback); + }, "name", { value: "CreateTransitionRouteGroup" }); /** - * Calls CreateWebhook. - * @function createWebhook - * @memberof google.cloud.dialogflow.cx.v3.Webhooks + * Calls CreateTransitionRouteGroup. + * @function createTransitionRouteGroup + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroups * @instance - * @param {google.cloud.dialogflow.cx.v3.ICreateWebhookRequest} request CreateWebhookRequest message or plain object - * @returns {Promise} Promise + * @param {google.cloud.dialogflow.cx.v3.ICreateTransitionRouteGroupRequest} request CreateTransitionRouteGroupRequest message or plain object + * @returns {Promise} Promise * @variation 2 */ /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Webhooks#updateWebhook}. - * @memberof google.cloud.dialogflow.cx.v3.Webhooks - * @typedef UpdateWebhookCallback + * Callback as used by {@link google.cloud.dialogflow.cx.v3.TransitionRouteGroups#updateTransitionRouteGroup}. + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroups + * @typedef UpdateTransitionRouteGroupCallback * @type {function} * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.Webhook} [response] Webhook + * @param {google.cloud.dialogflow.cx.v3.TransitionRouteGroup} [response] TransitionRouteGroup */ /** - * Calls UpdateWebhook. - * @function updateWebhook - * @memberof google.cloud.dialogflow.cx.v3.Webhooks + * Calls UpdateTransitionRouteGroup. + * @function updateTransitionRouteGroup + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroups * @instance - * @param {google.cloud.dialogflow.cx.v3.IUpdateWebhookRequest} request UpdateWebhookRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Webhooks.UpdateWebhookCallback} callback Node-style callback called with the error, if any, and Webhook + * @param {google.cloud.dialogflow.cx.v3.IUpdateTransitionRouteGroupRequest} request UpdateTransitionRouteGroupRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.TransitionRouteGroups.UpdateTransitionRouteGroupCallback} callback Node-style callback called with the error, if any, and TransitionRouteGroup * @returns {undefined} * @variation 1 */ - Object.defineProperty(Webhooks.prototype.updateWebhook = function updateWebhook(request, callback) { - return this.rpcCall(updateWebhook, $root.google.cloud.dialogflow.cx.v3.UpdateWebhookRequest, $root.google.cloud.dialogflow.cx.v3.Webhook, request, callback); - }, "name", { value: "UpdateWebhook" }); + Object.defineProperty(TransitionRouteGroups.prototype.updateTransitionRouteGroup = function updateTransitionRouteGroup(request, callback) { + return this.rpcCall(updateTransitionRouteGroup, $root.google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest, $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup, request, callback); + }, "name", { value: "UpdateTransitionRouteGroup" }); /** - * Calls UpdateWebhook. - * @function updateWebhook - * @memberof google.cloud.dialogflow.cx.v3.Webhooks + * Calls UpdateTransitionRouteGroup. + * @function updateTransitionRouteGroup + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroups * @instance - * @param {google.cloud.dialogflow.cx.v3.IUpdateWebhookRequest} request UpdateWebhookRequest message or plain object - * @returns {Promise} Promise + * @param {google.cloud.dialogflow.cx.v3.IUpdateTransitionRouteGroupRequest} request UpdateTransitionRouteGroupRequest message or plain object + * @returns {Promise} Promise * @variation 2 */ /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Webhooks#deleteWebhook}. - * @memberof google.cloud.dialogflow.cx.v3.Webhooks - * @typedef DeleteWebhookCallback + * Callback as used by {@link google.cloud.dialogflow.cx.v3.TransitionRouteGroups#deleteTransitionRouteGroup}. + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroups + * @typedef DeleteTransitionRouteGroupCallback * @type {function} * @param {Error|null} error Error, if any * @param {google.protobuf.Empty} [response] Empty */ /** - * Calls DeleteWebhook. - * @function deleteWebhook - * @memberof google.cloud.dialogflow.cx.v3.Webhooks + * Calls DeleteTransitionRouteGroup. + * @function deleteTransitionRouteGroup + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroups * @instance - * @param {google.cloud.dialogflow.cx.v3.IDeleteWebhookRequest} request DeleteWebhookRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Webhooks.DeleteWebhookCallback} callback Node-style callback called with the error, if any, and Empty + * @param {google.cloud.dialogflow.cx.v3.IDeleteTransitionRouteGroupRequest} request DeleteTransitionRouteGroupRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.TransitionRouteGroups.DeleteTransitionRouteGroupCallback} callback Node-style callback called with the error, if any, and Empty * @returns {undefined} * @variation 1 */ - Object.defineProperty(Webhooks.prototype.deleteWebhook = function deleteWebhook(request, callback) { - return this.rpcCall(deleteWebhook, $root.google.cloud.dialogflow.cx.v3.DeleteWebhookRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteWebhook" }); + Object.defineProperty(TransitionRouteGroups.prototype.deleteTransitionRouteGroup = function deleteTransitionRouteGroup(request, callback) { + return this.rpcCall(deleteTransitionRouteGroup, $root.google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteTransitionRouteGroup" }); /** - * Calls DeleteWebhook. - * @function deleteWebhook - * @memberof google.cloud.dialogflow.cx.v3.Webhooks + * Calls DeleteTransitionRouteGroup. + * @function deleteTransitionRouteGroup + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroups * @instance - * @param {google.cloud.dialogflow.cx.v3.IDeleteWebhookRequest} request DeleteWebhookRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.IDeleteTransitionRouteGroupRequest} request DeleteTransitionRouteGroupRequest message or plain object * @returns {Promise} Promise * @variation 2 */ - return Webhooks; + return TransitionRouteGroups; })(); - v3.Webhook = (function() { + v3.TransitionRouteGroup = (function() { /** - * Properties of a Webhook. + * Properties of a TransitionRouteGroup. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IWebhook - * @property {string|null} [name] Webhook name - * @property {string|null} [displayName] Webhook displayName - * @property {google.cloud.dialogflow.cx.v3.Webhook.IGenericWebService|null} [genericWebService] Webhook genericWebService - * @property {google.protobuf.IDuration|null} [timeout] Webhook timeout - * @property {boolean|null} [disabled] Webhook disabled + * @interface ITransitionRouteGroup + * @property {string|null} [name] TransitionRouteGroup name + * @property {string|null} [displayName] TransitionRouteGroup displayName + * @property {Array.|null} [transitionRoutes] TransitionRouteGroup transitionRoutes */ /** - * Constructs a new Webhook. + * Constructs a new TransitionRouteGroup. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a Webhook. - * @implements IWebhook + * @classdesc Represents a TransitionRouteGroup. + * @implements ITransitionRouteGroup * @constructor - * @param {google.cloud.dialogflow.cx.v3.IWebhook=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.ITransitionRouteGroup=} [properties] Properties to set */ - function Webhook(properties) { + function TransitionRouteGroup(properties) { + this.transitionRoutes = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -34949,124 +35325,91 @@ } /** - * Webhook name. + * TransitionRouteGroup name. * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.Webhook + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroup * @instance */ - Webhook.prototype.name = ""; + TransitionRouteGroup.prototype.name = ""; /** - * Webhook displayName. + * TransitionRouteGroup displayName. * @member {string} displayName - * @memberof google.cloud.dialogflow.cx.v3.Webhook - * @instance - */ - Webhook.prototype.displayName = ""; - - /** - * Webhook genericWebService. - * @member {google.cloud.dialogflow.cx.v3.Webhook.IGenericWebService|null|undefined} genericWebService - * @memberof google.cloud.dialogflow.cx.v3.Webhook - * @instance - */ - Webhook.prototype.genericWebService = null; - - /** - * Webhook timeout. - * @member {google.protobuf.IDuration|null|undefined} timeout - * @memberof google.cloud.dialogflow.cx.v3.Webhook - * @instance - */ - Webhook.prototype.timeout = null; - - /** - * Webhook disabled. - * @member {boolean} disabled - * @memberof google.cloud.dialogflow.cx.v3.Webhook + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroup * @instance */ - Webhook.prototype.disabled = false; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + TransitionRouteGroup.prototype.displayName = ""; /** - * Webhook webhook. - * @member {"genericWebService"|undefined} webhook - * @memberof google.cloud.dialogflow.cx.v3.Webhook + * TransitionRouteGroup transitionRoutes. + * @member {Array.} transitionRoutes + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroup * @instance */ - Object.defineProperty(Webhook.prototype, "webhook", { - get: $util.oneOfGetter($oneOfFields = ["genericWebService"]), - set: $util.oneOfSetter($oneOfFields) - }); + TransitionRouteGroup.prototype.transitionRoutes = $util.emptyArray; /** - * Creates a new Webhook instance using the specified properties. + * Creates a new TransitionRouteGroup instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.Webhook + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroup * @static - * @param {google.cloud.dialogflow.cx.v3.IWebhook=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.Webhook} Webhook instance + * @param {google.cloud.dialogflow.cx.v3.ITransitionRouteGroup=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.TransitionRouteGroup} TransitionRouteGroup instance */ - Webhook.create = function create(properties) { - return new Webhook(properties); + TransitionRouteGroup.create = function create(properties) { + return new TransitionRouteGroup(properties); }; /** - * Encodes the specified Webhook message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Webhook.verify|verify} messages. + * Encodes the specified TransitionRouteGroup message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TransitionRouteGroup.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.Webhook + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroup * @static - * @param {google.cloud.dialogflow.cx.v3.IWebhook} message Webhook message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ITransitionRouteGroup} message TransitionRouteGroup message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Webhook.encode = function encode(message, writer) { + TransitionRouteGroup.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.genericWebService != null && Object.hasOwnProperty.call(message, "genericWebService")) - $root.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.encode(message.genericWebService, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.disabled); - if (message.timeout != null && Object.hasOwnProperty.call(message, "timeout")) - $root.google.protobuf.Duration.encode(message.timeout, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.transitionRoutes != null && message.transitionRoutes.length) + for (var i = 0; i < message.transitionRoutes.length; ++i) + $root.google.cloud.dialogflow.cx.v3.TransitionRoute.encode(message.transitionRoutes[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; /** - * Encodes the specified Webhook message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Webhook.verify|verify} messages. + * Encodes the specified TransitionRouteGroup message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TransitionRouteGroup.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Webhook + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroup * @static - * @param {google.cloud.dialogflow.cx.v3.IWebhook} message Webhook message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ITransitionRouteGroup} message TransitionRouteGroup message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Webhook.encodeDelimited = function encodeDelimited(message, writer) { + TransitionRouteGroup.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Webhook message from the specified reader or buffer. + * Decodes a TransitionRouteGroup message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.Webhook + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroup * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.Webhook} Webhook + * @returns {google.cloud.dialogflow.cx.v3.TransitionRouteGroup} TransitionRouteGroup * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Webhook.decode = function decode(reader, length) { + TransitionRouteGroup.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.Webhook(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -35076,14 +35419,10 @@ case 2: message.displayName = reader.string(); break; - case 4: - message.genericWebService = $root.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.decode(reader, reader.uint32()); - break; - case 6: - message.timeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; case 5: - message.disabled = reader.bool(); + if (!(message.transitionRoutes && message.transitionRoutes.length)) + message.transitionRoutes = []; + message.transitionRoutes.push($root.google.cloud.dialogflow.cx.v3.TransitionRoute.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -35094,448 +35433,145 @@ }; /** - * Decodes a Webhook message from the specified reader or buffer, length delimited. + * Decodes a TransitionRouteGroup message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Webhook + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroup * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.Webhook} Webhook + * @returns {google.cloud.dialogflow.cx.v3.TransitionRouteGroup} TransitionRouteGroup * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Webhook.decodeDelimited = function decodeDelimited(reader) { + TransitionRouteGroup.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Webhook message. + * Verifies a TransitionRouteGroup message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.Webhook + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroup * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Webhook.verify = function verify(message) { + TransitionRouteGroup.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; if (message.displayName != null && message.hasOwnProperty("displayName")) if (!$util.isString(message.displayName)) return "displayName: string expected"; - if (message.genericWebService != null && message.hasOwnProperty("genericWebService")) { - properties.webhook = 1; - { - var error = $root.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.verify(message.genericWebService); + if (message.transitionRoutes != null && message.hasOwnProperty("transitionRoutes")) { + if (!Array.isArray(message.transitionRoutes)) + return "transitionRoutes: array expected"; + for (var i = 0; i < message.transitionRoutes.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.TransitionRoute.verify(message.transitionRoutes[i]); if (error) - return "genericWebService." + error; + return "transitionRoutes." + error; } } - if (message.timeout != null && message.hasOwnProperty("timeout")) { - var error = $root.google.protobuf.Duration.verify(message.timeout); - if (error) - return "timeout." + error; - } - if (message.disabled != null && message.hasOwnProperty("disabled")) - if (typeof message.disabled !== "boolean") - return "disabled: boolean expected"; return null; }; /** - * Creates a Webhook message from a plain object. Also converts values to their respective internal types. + * Creates a TransitionRouteGroup message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.Webhook + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroup * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.Webhook} Webhook + * @returns {google.cloud.dialogflow.cx.v3.TransitionRouteGroup} TransitionRouteGroup */ - Webhook.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.Webhook) + TransitionRouteGroup.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.Webhook(); + var message = new $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup(); if (object.name != null) message.name = String(object.name); if (object.displayName != null) message.displayName = String(object.displayName); - if (object.genericWebService != null) { - if (typeof object.genericWebService !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.Webhook.genericWebService: object expected"); - message.genericWebService = $root.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.fromObject(object.genericWebService); - } - if (object.timeout != null) { - if (typeof object.timeout !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.Webhook.timeout: object expected"); - message.timeout = $root.google.protobuf.Duration.fromObject(object.timeout); + if (object.transitionRoutes) { + if (!Array.isArray(object.transitionRoutes)) + throw TypeError(".google.cloud.dialogflow.cx.v3.TransitionRouteGroup.transitionRoutes: array expected"); + message.transitionRoutes = []; + for (var i = 0; i < object.transitionRoutes.length; ++i) { + if (typeof object.transitionRoutes[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.TransitionRouteGroup.transitionRoutes: object expected"); + message.transitionRoutes[i] = $root.google.cloud.dialogflow.cx.v3.TransitionRoute.fromObject(object.transitionRoutes[i]); + } } - if (object.disabled != null) - message.disabled = Boolean(object.disabled); return message; }; /** - * Creates a plain object from a Webhook message. Also converts values to other types if specified. + * Creates a plain object from a TransitionRouteGroup message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.Webhook + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroup * @static - * @param {google.cloud.dialogflow.cx.v3.Webhook} message Webhook + * @param {google.cloud.dialogflow.cx.v3.TransitionRouteGroup} message TransitionRouteGroup * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Webhook.toObject = function toObject(message, options) { + TransitionRouteGroup.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.transitionRoutes = []; if (options.defaults) { object.name = ""; object.displayName = ""; - object.disabled = false; - object.timeout = null; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; if (message.displayName != null && message.hasOwnProperty("displayName")) object.displayName = message.displayName; - if (message.genericWebService != null && message.hasOwnProperty("genericWebService")) { - object.genericWebService = $root.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.toObject(message.genericWebService, options); - if (options.oneofs) - object.webhook = "genericWebService"; + if (message.transitionRoutes && message.transitionRoutes.length) { + object.transitionRoutes = []; + for (var j = 0; j < message.transitionRoutes.length; ++j) + object.transitionRoutes[j] = $root.google.cloud.dialogflow.cx.v3.TransitionRoute.toObject(message.transitionRoutes[j], options); } - if (message.disabled != null && message.hasOwnProperty("disabled")) - object.disabled = message.disabled; - if (message.timeout != null && message.hasOwnProperty("timeout")) - object.timeout = $root.google.protobuf.Duration.toObject(message.timeout, options); return object; }; /** - * Converts this Webhook to JSON. + * Converts this TransitionRouteGroup to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.Webhook + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroup * @instance * @returns {Object.} JSON object */ - Webhook.prototype.toJSON = function toJSON() { + TransitionRouteGroup.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - Webhook.GenericWebService = (function() { - - /** - * Properties of a GenericWebService. - * @memberof google.cloud.dialogflow.cx.v3.Webhook - * @interface IGenericWebService - * @property {string|null} [uri] GenericWebService uri - * @property {string|null} [username] GenericWebService username - * @property {string|null} [password] GenericWebService password - * @property {Object.|null} [requestHeaders] GenericWebService requestHeaders - */ - - /** - * Constructs a new GenericWebService. - * @memberof google.cloud.dialogflow.cx.v3.Webhook - * @classdesc Represents a GenericWebService. - * @implements IGenericWebService - * @constructor - * @param {google.cloud.dialogflow.cx.v3.Webhook.IGenericWebService=} [properties] Properties to set - */ - function GenericWebService(properties) { - this.requestHeaders = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GenericWebService uri. - * @member {string} uri - * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService - * @instance - */ - GenericWebService.prototype.uri = ""; - - /** - * GenericWebService username. - * @member {string} username - * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService - * @instance - */ - GenericWebService.prototype.username = ""; - - /** - * GenericWebService password. - * @member {string} password - * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService - * @instance - */ - GenericWebService.prototype.password = ""; - - /** - * GenericWebService requestHeaders. - * @member {Object.} requestHeaders - * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService - * @instance - */ - GenericWebService.prototype.requestHeaders = $util.emptyObject; - - /** - * Creates a new GenericWebService instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService - * @static - * @param {google.cloud.dialogflow.cx.v3.Webhook.IGenericWebService=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.Webhook.GenericWebService} GenericWebService instance - */ - GenericWebService.create = function create(properties) { - return new GenericWebService(properties); - }; - - /** - * Encodes the specified GenericWebService message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService - * @static - * @param {google.cloud.dialogflow.cx.v3.Webhook.IGenericWebService} message GenericWebService message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenericWebService.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); - if (message.username != null && Object.hasOwnProperty.call(message, "username")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.username); - if (message.password != null && Object.hasOwnProperty.call(message, "password")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.password); - if (message.requestHeaders != null && Object.hasOwnProperty.call(message, "requestHeaders")) - for (var keys = Object.keys(message.requestHeaders), i = 0; i < keys.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.requestHeaders[keys[i]]).ldelim(); - return writer; - }; - - /** - * Encodes the specified GenericWebService message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService - * @static - * @param {google.cloud.dialogflow.cx.v3.Webhook.IGenericWebService} message GenericWebService message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenericWebService.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GenericWebService message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.Webhook.GenericWebService} GenericWebService - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenericWebService.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.uri = reader.string(); - break; - case 2: - message.username = reader.string(); - break; - case 3: - message.password = reader.string(); - break; - case 4: - if (message.requestHeaders === $util.emptyObject) - message.requestHeaders = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.requestHeaders[key] = value; - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GenericWebService message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.Webhook.GenericWebService} GenericWebService - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenericWebService.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GenericWebService message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GenericWebService.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - if (message.username != null && message.hasOwnProperty("username")) - if (!$util.isString(message.username)) - return "username: string expected"; - if (message.password != null && message.hasOwnProperty("password")) - if (!$util.isString(message.password)) - return "password: string expected"; - if (message.requestHeaders != null && message.hasOwnProperty("requestHeaders")) { - if (!$util.isObject(message.requestHeaders)) - return "requestHeaders: object expected"; - var key = Object.keys(message.requestHeaders); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.requestHeaders[key[i]])) - return "requestHeaders: string{k:string} expected"; - } - return null; - }; - - /** - * Creates a GenericWebService message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.Webhook.GenericWebService} GenericWebService - */ - GenericWebService.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService(); - if (object.uri != null) - message.uri = String(object.uri); - if (object.username != null) - message.username = String(object.username); - if (object.password != null) - message.password = String(object.password); - if (object.requestHeaders) { - if (typeof object.requestHeaders !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.requestHeaders: object expected"); - message.requestHeaders = {}; - for (var keys = Object.keys(object.requestHeaders), i = 0; i < keys.length; ++i) - message.requestHeaders[keys[i]] = String(object.requestHeaders[keys[i]]); - } - return message; - }; - - /** - * Creates a plain object from a GenericWebService message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService - * @static - * @param {google.cloud.dialogflow.cx.v3.Webhook.GenericWebService} message GenericWebService - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GenericWebService.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.requestHeaders = {}; - if (options.defaults) { - object.uri = ""; - object.username = ""; - object.password = ""; - } - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - if (message.username != null && message.hasOwnProperty("username")) - object.username = message.username; - if (message.password != null && message.hasOwnProperty("password")) - object.password = message.password; - var keys2; - if (message.requestHeaders && (keys2 = Object.keys(message.requestHeaders)).length) { - object.requestHeaders = {}; - for (var j = 0; j < keys2.length; ++j) - object.requestHeaders[keys2[j]] = message.requestHeaders[keys2[j]]; - } - return object; - }; - - /** - * Converts this GenericWebService to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService - * @instance - * @returns {Object.} JSON object - */ - GenericWebService.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GenericWebService; - })(); - - return Webhook; + return TransitionRouteGroup; })(); - v3.ListWebhooksRequest = (function() { + v3.ListTransitionRouteGroupsRequest = (function() { /** - * Properties of a ListWebhooksRequest. + * Properties of a ListTransitionRouteGroupsRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IListWebhooksRequest - * @property {string|null} [parent] ListWebhooksRequest parent - * @property {number|null} [pageSize] ListWebhooksRequest pageSize - * @property {string|null} [pageToken] ListWebhooksRequest pageToken + * @interface IListTransitionRouteGroupsRequest + * @property {string|null} [parent] ListTransitionRouteGroupsRequest parent + * @property {number|null} [pageSize] ListTransitionRouteGroupsRequest pageSize + * @property {string|null} [pageToken] ListTransitionRouteGroupsRequest pageToken + * @property {string|null} [languageCode] ListTransitionRouteGroupsRequest languageCode */ /** - * Constructs a new ListWebhooksRequest. + * Constructs a new ListTransitionRouteGroupsRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a ListWebhooksRequest. - * @implements IListWebhooksRequest + * @classdesc Represents a ListTransitionRouteGroupsRequest. + * @implements IListTransitionRouteGroupsRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IListWebhooksRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IListTransitionRouteGroupsRequest=} [properties] Properties to set */ - function ListWebhooksRequest(properties) { + function ListTransitionRouteGroupsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -35543,51 +35579,59 @@ } /** - * ListWebhooksRequest parent. + * ListTransitionRouteGroupsRequest parent. * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksRequest + * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest * @instance */ - ListWebhooksRequest.prototype.parent = ""; + ListTransitionRouteGroupsRequest.prototype.parent = ""; /** - * ListWebhooksRequest pageSize. + * ListTransitionRouteGroupsRequest pageSize. * @member {number} pageSize - * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksRequest + * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest * @instance */ - ListWebhooksRequest.prototype.pageSize = 0; + ListTransitionRouteGroupsRequest.prototype.pageSize = 0; /** - * ListWebhooksRequest pageToken. + * ListTransitionRouteGroupsRequest pageToken. * @member {string} pageToken - * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksRequest + * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest * @instance */ - ListWebhooksRequest.prototype.pageToken = ""; + ListTransitionRouteGroupsRequest.prototype.pageToken = ""; /** - * Creates a new ListWebhooksRequest instance using the specified properties. + * ListTransitionRouteGroupsRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest + * @instance + */ + ListTransitionRouteGroupsRequest.prototype.languageCode = ""; + + /** + * Creates a new ListTransitionRouteGroupsRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksRequest + * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IListWebhooksRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ListWebhooksRequest} ListWebhooksRequest instance + * @param {google.cloud.dialogflow.cx.v3.IListTransitionRouteGroupsRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest} ListTransitionRouteGroupsRequest instance */ - ListWebhooksRequest.create = function create(properties) { - return new ListWebhooksRequest(properties); + ListTransitionRouteGroupsRequest.create = function create(properties) { + return new ListTransitionRouteGroupsRequest(properties); }; /** - * Encodes the specified ListWebhooksRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListWebhooksRequest.verify|verify} messages. + * Encodes the specified ListTransitionRouteGroupsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksRequest + * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IListWebhooksRequest} message ListWebhooksRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListTransitionRouteGroupsRequest} message ListTransitionRouteGroupsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListWebhooksRequest.encode = function encode(message, writer) { + ListTransitionRouteGroupsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) @@ -35596,37 +35640,39 @@ writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.languageCode); return writer; }; /** - * Encodes the specified ListWebhooksRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListWebhooksRequest.verify|verify} messages. + * Encodes the specified ListTransitionRouteGroupsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksRequest + * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IListWebhooksRequest} message ListWebhooksRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListTransitionRouteGroupsRequest} message ListTransitionRouteGroupsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListWebhooksRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListTransitionRouteGroupsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListWebhooksRequest message from the specified reader or buffer. + * Decodes a ListTransitionRouteGroupsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksRequest + * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.ListWebhooksRequest} ListWebhooksRequest + * @returns {google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest} ListTransitionRouteGroupsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListWebhooksRequest.decode = function decode(reader, length) { + ListTransitionRouteGroupsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ListWebhooksRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -35639,6 +35685,9 @@ case 3: message.pageToken = reader.string(); break; + case 4: + message.languageCode = reader.string(); + break; default: reader.skipType(tag & 7); break; @@ -35648,30 +35697,30 @@ }; /** - * Decodes a ListWebhooksRequest message from the specified reader or buffer, length delimited. + * Decodes a ListTransitionRouteGroupsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksRequest + * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ListWebhooksRequest} ListWebhooksRequest + * @returns {google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest} ListTransitionRouteGroupsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListWebhooksRequest.decodeDelimited = function decodeDelimited(reader) { + ListTransitionRouteGroupsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListWebhooksRequest message. + * Verifies a ListTransitionRouteGroupsRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksRequest + * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListWebhooksRequest.verify = function verify(message) { + ListTransitionRouteGroupsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.parent != null && message.hasOwnProperty("parent")) @@ -35683,40 +35732,45 @@ if (message.pageToken != null && message.hasOwnProperty("pageToken")) if (!$util.isString(message.pageToken)) return "pageToken: string expected"; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; return null; }; /** - * Creates a ListWebhooksRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListTransitionRouteGroupsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksRequest + * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ListWebhooksRequest} ListWebhooksRequest + * @returns {google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest} ListTransitionRouteGroupsRequest */ - ListWebhooksRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListWebhooksRequest) + ListTransitionRouteGroupsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.ListWebhooksRequest(); + var message = new $root.google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest(); if (object.parent != null) message.parent = String(object.parent); if (object.pageSize != null) message.pageSize = object.pageSize | 0; if (object.pageToken != null) message.pageToken = String(object.pageToken); + if (object.languageCode != null) + message.languageCode = String(object.languageCode); return message; }; /** - * Creates a plain object from a ListWebhooksRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListTransitionRouteGroupsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksRequest + * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.ListWebhooksRequest} message ListWebhooksRequest + * @param {google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest} message ListTransitionRouteGroupsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListWebhooksRequest.toObject = function toObject(message, options) { + ListTransitionRouteGroupsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -35724,6 +35778,7 @@ object.parent = ""; object.pageSize = 0; object.pageToken = ""; + object.languageCode = ""; } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; @@ -35731,43 +35786,45 @@ object.pageSize = message.pageSize; if (message.pageToken != null && message.hasOwnProperty("pageToken")) object.pageToken = message.pageToken; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; return object; }; /** - * Converts this ListWebhooksRequest to JSON. + * Converts this ListTransitionRouteGroupsRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksRequest + * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest * @instance * @returns {Object.} JSON object */ - ListWebhooksRequest.prototype.toJSON = function toJSON() { + ListTransitionRouteGroupsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListWebhooksRequest; + return ListTransitionRouteGroupsRequest; })(); - v3.ListWebhooksResponse = (function() { + v3.ListTransitionRouteGroupsResponse = (function() { /** - * Properties of a ListWebhooksResponse. + * Properties of a ListTransitionRouteGroupsResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IListWebhooksResponse - * @property {Array.|null} [webhooks] ListWebhooksResponse webhooks - * @property {string|null} [nextPageToken] ListWebhooksResponse nextPageToken + * @interface IListTransitionRouteGroupsResponse + * @property {Array.|null} [transitionRouteGroups] ListTransitionRouteGroupsResponse transitionRouteGroups + * @property {string|null} [nextPageToken] ListTransitionRouteGroupsResponse nextPageToken */ /** - * Constructs a new ListWebhooksResponse. + * Constructs a new ListTransitionRouteGroupsResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a ListWebhooksResponse. - * @implements IListWebhooksResponse + * @classdesc Represents a ListTransitionRouteGroupsResponse. + * @implements IListTransitionRouteGroupsResponse * @constructor - * @param {google.cloud.dialogflow.cx.v3.IListWebhooksResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IListTransitionRouteGroupsResponse=} [properties] Properties to set */ - function ListWebhooksResponse(properties) { - this.webhooks = []; + function ListTransitionRouteGroupsResponse(properties) { + this.transitionRouteGroups = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -35775,88 +35832,88 @@ } /** - * ListWebhooksResponse webhooks. - * @member {Array.} webhooks - * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksResponse + * ListTransitionRouteGroupsResponse transitionRouteGroups. + * @member {Array.} transitionRouteGroups + * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse * @instance */ - ListWebhooksResponse.prototype.webhooks = $util.emptyArray; + ListTransitionRouteGroupsResponse.prototype.transitionRouteGroups = $util.emptyArray; /** - * ListWebhooksResponse nextPageToken. + * ListTransitionRouteGroupsResponse nextPageToken. * @member {string} nextPageToken - * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksResponse + * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse * @instance */ - ListWebhooksResponse.prototype.nextPageToken = ""; + ListTransitionRouteGroupsResponse.prototype.nextPageToken = ""; /** - * Creates a new ListWebhooksResponse instance using the specified properties. + * Creates a new ListTransitionRouteGroupsResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksResponse + * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IListWebhooksResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ListWebhooksResponse} ListWebhooksResponse instance + * @param {google.cloud.dialogflow.cx.v3.IListTransitionRouteGroupsResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse} ListTransitionRouteGroupsResponse instance */ - ListWebhooksResponse.create = function create(properties) { - return new ListWebhooksResponse(properties); + ListTransitionRouteGroupsResponse.create = function create(properties) { + return new ListTransitionRouteGroupsResponse(properties); }; /** - * Encodes the specified ListWebhooksResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListWebhooksResponse.verify|verify} messages. + * Encodes the specified ListTransitionRouteGroupsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksResponse + * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IListWebhooksResponse} message ListWebhooksResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListTransitionRouteGroupsResponse} message ListTransitionRouteGroupsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListWebhooksResponse.encode = function encode(message, writer) { + ListTransitionRouteGroupsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.webhooks != null && message.webhooks.length) - for (var i = 0; i < message.webhooks.length; ++i) - $root.google.cloud.dialogflow.cx.v3.Webhook.encode(message.webhooks[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.transitionRouteGroups != null && message.transitionRouteGroups.length) + for (var i = 0; i < message.transitionRouteGroups.length; ++i) + $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup.encode(message.transitionRouteGroups[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified ListWebhooksResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListWebhooksResponse.verify|verify} messages. + * Encodes the specified ListTransitionRouteGroupsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksResponse + * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IListWebhooksResponse} message ListWebhooksResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListTransitionRouteGroupsResponse} message ListTransitionRouteGroupsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListWebhooksResponse.encodeDelimited = function encodeDelimited(message, writer) { + ListTransitionRouteGroupsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListWebhooksResponse message from the specified reader or buffer. + * Decodes a ListTransitionRouteGroupsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksResponse + * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.ListWebhooksResponse} ListWebhooksResponse + * @returns {google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse} ListTransitionRouteGroupsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListWebhooksResponse.decode = function decode(reader, length) { + ListTransitionRouteGroupsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ListWebhooksResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.webhooks && message.webhooks.length)) - message.webhooks = []; - message.webhooks.push($root.google.cloud.dialogflow.cx.v3.Webhook.decode(reader, reader.uint32())); + if (!(message.transitionRouteGroups && message.transitionRouteGroups.length)) + message.transitionRouteGroups = []; + message.transitionRouteGroups.push($root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup.decode(reader, reader.uint32())); break; case 2: message.nextPageToken = reader.string(); @@ -35870,39 +35927,39 @@ }; /** - * Decodes a ListWebhooksResponse message from the specified reader or buffer, length delimited. + * Decodes a ListTransitionRouteGroupsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksResponse + * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ListWebhooksResponse} ListWebhooksResponse + * @returns {google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse} ListTransitionRouteGroupsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListWebhooksResponse.decodeDelimited = function decodeDelimited(reader) { + ListTransitionRouteGroupsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListWebhooksResponse message. + * Verifies a ListTransitionRouteGroupsResponse message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksResponse + * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListWebhooksResponse.verify = function verify(message) { + ListTransitionRouteGroupsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.webhooks != null && message.hasOwnProperty("webhooks")) { - if (!Array.isArray(message.webhooks)) - return "webhooks: array expected"; - for (var i = 0; i < message.webhooks.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.Webhook.verify(message.webhooks[i]); + if (message.transitionRouteGroups != null && message.hasOwnProperty("transitionRouteGroups")) { + if (!Array.isArray(message.transitionRouteGroups)) + return "transitionRouteGroups: array expected"; + for (var i = 0; i < message.transitionRouteGroups.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup.verify(message.transitionRouteGroups[i]); if (error) - return "webhooks." + error; + return "transitionRouteGroups." + error; } } if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) @@ -35912,25 +35969,25 @@ }; /** - * Creates a ListWebhooksResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListTransitionRouteGroupsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksResponse + * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ListWebhooksResponse} ListWebhooksResponse + * @returns {google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse} ListTransitionRouteGroupsResponse */ - ListWebhooksResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListWebhooksResponse) + ListTransitionRouteGroupsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.ListWebhooksResponse(); - if (object.webhooks) { - if (!Array.isArray(object.webhooks)) - throw TypeError(".google.cloud.dialogflow.cx.v3.ListWebhooksResponse.webhooks: array expected"); - message.webhooks = []; - for (var i = 0; i < object.webhooks.length; ++i) { - if (typeof object.webhooks[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.ListWebhooksResponse.webhooks: object expected"); - message.webhooks[i] = $root.google.cloud.dialogflow.cx.v3.Webhook.fromObject(object.webhooks[i]); + var message = new $root.google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse(); + if (object.transitionRouteGroups) { + if (!Array.isArray(object.transitionRouteGroups)) + throw TypeError(".google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse.transitionRouteGroups: array expected"); + message.transitionRouteGroups = []; + for (var i = 0; i < object.transitionRouteGroups.length; ++i) { + if (typeof object.transitionRouteGroups[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse.transitionRouteGroups: object expected"); + message.transitionRouteGroups[i] = $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup.fromObject(object.transitionRouteGroups[i]); } } if (object.nextPageToken != null) @@ -35939,26 +35996,26 @@ }; /** - * Creates a plain object from a ListWebhooksResponse message. Also converts values to other types if specified. + * Creates a plain object from a ListTransitionRouteGroupsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksResponse + * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse * @static - * @param {google.cloud.dialogflow.cx.v3.ListWebhooksResponse} message ListWebhooksResponse + * @param {google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse} message ListTransitionRouteGroupsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListWebhooksResponse.toObject = function toObject(message, options) { + ListTransitionRouteGroupsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.webhooks = []; + object.transitionRouteGroups = []; if (options.defaults) object.nextPageToken = ""; - if (message.webhooks && message.webhooks.length) { - object.webhooks = []; - for (var j = 0; j < message.webhooks.length; ++j) - object.webhooks[j] = $root.google.cloud.dialogflow.cx.v3.Webhook.toObject(message.webhooks[j], options); + if (message.transitionRouteGroups && message.transitionRouteGroups.length) { + object.transitionRouteGroups = []; + for (var j = 0; j < message.transitionRouteGroups.length; ++j) + object.transitionRouteGroups[j] = $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup.toObject(message.transitionRouteGroups[j], options); } if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) object.nextPageToken = message.nextPageToken; @@ -35966,37 +36023,38 @@ }; /** - * Converts this ListWebhooksResponse to JSON. + * Converts this ListTransitionRouteGroupsResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksResponse + * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse * @instance * @returns {Object.} JSON object */ - ListWebhooksResponse.prototype.toJSON = function toJSON() { + ListTransitionRouteGroupsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListWebhooksResponse; + return ListTransitionRouteGroupsResponse; })(); - v3.GetWebhookRequest = (function() { + v3.GetTransitionRouteGroupRequest = (function() { /** - * Properties of a GetWebhookRequest. + * Properties of a GetTransitionRouteGroupRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IGetWebhookRequest - * @property {string|null} [name] GetWebhookRequest name + * @interface IGetTransitionRouteGroupRequest + * @property {string|null} [name] GetTransitionRouteGroupRequest name + * @property {string|null} [languageCode] GetTransitionRouteGroupRequest languageCode */ /** - * Constructs a new GetWebhookRequest. + * Constructs a new GetTransitionRouteGroupRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a GetWebhookRequest. - * @implements IGetWebhookRequest + * @classdesc Represents a GetTransitionRouteGroupRequest. + * @implements IGetTransitionRouteGroupRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IGetWebhookRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IGetTransitionRouteGroupRequest=} [properties] Properties to set */ - function GetWebhookRequest(properties) { + function GetTransitionRouteGroupRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -36004,76 +36062,89 @@ } /** - * GetWebhookRequest name. + * GetTransitionRouteGroupRequest name. * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.GetWebhookRequest + * @memberof google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest * @instance */ - GetWebhookRequest.prototype.name = ""; + GetTransitionRouteGroupRequest.prototype.name = ""; /** - * Creates a new GetWebhookRequest instance using the specified properties. + * GetTransitionRouteGroupRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest + * @instance + */ + GetTransitionRouteGroupRequest.prototype.languageCode = ""; + + /** + * Creates a new GetTransitionRouteGroupRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.GetWebhookRequest + * @memberof google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IGetWebhookRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.GetWebhookRequest} GetWebhookRequest instance + * @param {google.cloud.dialogflow.cx.v3.IGetTransitionRouteGroupRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest} GetTransitionRouteGroupRequest instance */ - GetWebhookRequest.create = function create(properties) { - return new GetWebhookRequest(properties); + GetTransitionRouteGroupRequest.create = function create(properties) { + return new GetTransitionRouteGroupRequest(properties); }; /** - * Encodes the specified GetWebhookRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetWebhookRequest.verify|verify} messages. + * Encodes the specified GetTransitionRouteGroupRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.GetWebhookRequest + * @memberof google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IGetWebhookRequest} message GetWebhookRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IGetTransitionRouteGroupRequest} message GetTransitionRouteGroupRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetWebhookRequest.encode = function encode(message, writer) { + GetTransitionRouteGroupRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); return writer; }; /** - * Encodes the specified GetWebhookRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetWebhookRequest.verify|verify} messages. + * Encodes the specified GetTransitionRouteGroupRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.GetWebhookRequest + * @memberof google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IGetWebhookRequest} message GetWebhookRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IGetTransitionRouteGroupRequest} message GetTransitionRouteGroupRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetWebhookRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetTransitionRouteGroupRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetWebhookRequest message from the specified reader or buffer. + * Decodes a GetTransitionRouteGroupRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.GetWebhookRequest + * @memberof google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.GetWebhookRequest} GetWebhookRequest + * @returns {google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest} GetTransitionRouteGroupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetWebhookRequest.decode = function decode(reader, length) { + GetTransitionRouteGroupRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.GetWebhookRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: message.name = reader.string(); break; + case 2: + message.languageCode = reader.string(); + break; default: reader.skipType(tag & 7); break; @@ -36083,108 +36154,118 @@ }; /** - * Decodes a GetWebhookRequest message from the specified reader or buffer, length delimited. + * Decodes a GetTransitionRouteGroupRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.GetWebhookRequest + * @memberof google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.GetWebhookRequest} GetWebhookRequest + * @returns {google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest} GetTransitionRouteGroupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetWebhookRequest.decodeDelimited = function decodeDelimited(reader) { + GetTransitionRouteGroupRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetWebhookRequest message. + * Verifies a GetTransitionRouteGroupRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.GetWebhookRequest + * @memberof google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetWebhookRequest.verify = function verify(message) { + GetTransitionRouteGroupRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; return null; }; /** - * Creates a GetWebhookRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetTransitionRouteGroupRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.GetWebhookRequest + * @memberof google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.GetWebhookRequest} GetWebhookRequest + * @returns {google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest} GetTransitionRouteGroupRequest */ - GetWebhookRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.GetWebhookRequest) + GetTransitionRouteGroupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.GetWebhookRequest(); + var message = new $root.google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest(); if (object.name != null) message.name = String(object.name); + if (object.languageCode != null) + message.languageCode = String(object.languageCode); return message; }; /** - * Creates a plain object from a GetWebhookRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetTransitionRouteGroupRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.GetWebhookRequest + * @memberof google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest * @static - * @param {google.cloud.dialogflow.cx.v3.GetWebhookRequest} message GetWebhookRequest + * @param {google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest} message GetTransitionRouteGroupRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetWebhookRequest.toObject = function toObject(message, options) { + GetTransitionRouteGroupRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.name = ""; + object.languageCode = ""; + } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; return object; }; /** - * Converts this GetWebhookRequest to JSON. + * Converts this GetTransitionRouteGroupRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.GetWebhookRequest + * @memberof google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest * @instance * @returns {Object.} JSON object */ - GetWebhookRequest.prototype.toJSON = function toJSON() { + GetTransitionRouteGroupRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetWebhookRequest; + return GetTransitionRouteGroupRequest; })(); - v3.CreateWebhookRequest = (function() { + v3.CreateTransitionRouteGroupRequest = (function() { /** - * Properties of a CreateWebhookRequest. + * Properties of a CreateTransitionRouteGroupRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface ICreateWebhookRequest - * @property {string|null} [parent] CreateWebhookRequest parent - * @property {google.cloud.dialogflow.cx.v3.IWebhook|null} [webhook] CreateWebhookRequest webhook + * @interface ICreateTransitionRouteGroupRequest + * @property {string|null} [parent] CreateTransitionRouteGroupRequest parent + * @property {google.cloud.dialogflow.cx.v3.ITransitionRouteGroup|null} [transitionRouteGroup] CreateTransitionRouteGroupRequest transitionRouteGroup + * @property {string|null} [languageCode] CreateTransitionRouteGroupRequest languageCode */ /** - * Constructs a new CreateWebhookRequest. + * Constructs a new CreateTransitionRouteGroupRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a CreateWebhookRequest. - * @implements ICreateWebhookRequest + * @classdesc Represents a CreateTransitionRouteGroupRequest. + * @implements ICreateTransitionRouteGroupRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.ICreateWebhookRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.ICreateTransitionRouteGroupRequest=} [properties] Properties to set */ - function CreateWebhookRequest(properties) { + function CreateTransitionRouteGroupRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -36192,80 +36273,90 @@ } /** - * CreateWebhookRequest parent. + * CreateTransitionRouteGroupRequest parent. * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3.CreateWebhookRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest * @instance */ - CreateWebhookRequest.prototype.parent = ""; + CreateTransitionRouteGroupRequest.prototype.parent = ""; /** - * CreateWebhookRequest webhook. - * @member {google.cloud.dialogflow.cx.v3.IWebhook|null|undefined} webhook - * @memberof google.cloud.dialogflow.cx.v3.CreateWebhookRequest + * CreateTransitionRouteGroupRequest transitionRouteGroup. + * @member {google.cloud.dialogflow.cx.v3.ITransitionRouteGroup|null|undefined} transitionRouteGroup + * @memberof google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest * @instance */ - CreateWebhookRequest.prototype.webhook = null; + CreateTransitionRouteGroupRequest.prototype.transitionRouteGroup = null; /** - * Creates a new CreateWebhookRequest instance using the specified properties. + * CreateTransitionRouteGroupRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest + * @instance + */ + CreateTransitionRouteGroupRequest.prototype.languageCode = ""; + + /** + * Creates a new CreateTransitionRouteGroupRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.CreateWebhookRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest * @static - * @param {google.cloud.dialogflow.cx.v3.ICreateWebhookRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.CreateWebhookRequest} CreateWebhookRequest instance + * @param {google.cloud.dialogflow.cx.v3.ICreateTransitionRouteGroupRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest} CreateTransitionRouteGroupRequest instance */ - CreateWebhookRequest.create = function create(properties) { - return new CreateWebhookRequest(properties); + CreateTransitionRouteGroupRequest.create = function create(properties) { + return new CreateTransitionRouteGroupRequest(properties); }; /** - * Encodes the specified CreateWebhookRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateWebhookRequest.verify|verify} messages. + * Encodes the specified CreateTransitionRouteGroupRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.CreateWebhookRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest * @static - * @param {google.cloud.dialogflow.cx.v3.ICreateWebhookRequest} message CreateWebhookRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ICreateTransitionRouteGroupRequest} message CreateTransitionRouteGroupRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateWebhookRequest.encode = function encode(message, writer) { + CreateTransitionRouteGroupRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.webhook != null && Object.hasOwnProperty.call(message, "webhook")) - $root.google.cloud.dialogflow.cx.v3.Webhook.encode(message.webhook, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.transitionRouteGroup != null && Object.hasOwnProperty.call(message, "transitionRouteGroup")) + $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup.encode(message.transitionRouteGroup, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.languageCode); return writer; }; /** - * Encodes the specified CreateWebhookRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateWebhookRequest.verify|verify} messages. + * Encodes the specified CreateTransitionRouteGroupRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.CreateWebhookRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest * @static - * @param {google.cloud.dialogflow.cx.v3.ICreateWebhookRequest} message CreateWebhookRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ICreateTransitionRouteGroupRequest} message CreateTransitionRouteGroupRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateWebhookRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreateTransitionRouteGroupRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateWebhookRequest message from the specified reader or buffer. + * Decodes a CreateTransitionRouteGroupRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.CreateWebhookRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.CreateWebhookRequest} CreateWebhookRequest + * @returns {google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest} CreateTransitionRouteGroupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateWebhookRequest.decode = function decode(reader, length) { + CreateTransitionRouteGroupRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.CreateWebhookRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -36273,7 +36364,10 @@ message.parent = reader.string(); break; case 2: - message.webhook = $root.google.cloud.dialogflow.cx.v3.Webhook.decode(reader, reader.uint32()); + message.transitionRouteGroup = $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup.decode(reader, reader.uint32()); + break; + case 3: + message.languageCode = reader.string(); break; default: reader.skipType(tag & 7); @@ -36284,122 +36378,131 @@ }; /** - * Decodes a CreateWebhookRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateTransitionRouteGroupRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.CreateWebhookRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.CreateWebhookRequest} CreateWebhookRequest + * @returns {google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest} CreateTransitionRouteGroupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateWebhookRequest.decodeDelimited = function decodeDelimited(reader) { + CreateTransitionRouteGroupRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateWebhookRequest message. + * Verifies a CreateTransitionRouteGroupRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.CreateWebhookRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateWebhookRequest.verify = function verify(message) { + CreateTransitionRouteGroupRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.parent != null && message.hasOwnProperty("parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.webhook != null && message.hasOwnProperty("webhook")) { - var error = $root.google.cloud.dialogflow.cx.v3.Webhook.verify(message.webhook); + if (message.transitionRouteGroup != null && message.hasOwnProperty("transitionRouteGroup")) { + var error = $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup.verify(message.transitionRouteGroup); if (error) - return "webhook." + error; + return "transitionRouteGroup." + error; } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; return null; }; /** - * Creates a CreateWebhookRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateTransitionRouteGroupRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.CreateWebhookRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.CreateWebhookRequest} CreateWebhookRequest + * @returns {google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest} CreateTransitionRouteGroupRequest */ - CreateWebhookRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.CreateWebhookRequest) + CreateTransitionRouteGroupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.CreateWebhookRequest(); + var message = new $root.google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest(); if (object.parent != null) message.parent = String(object.parent); - if (object.webhook != null) { - if (typeof object.webhook !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.CreateWebhookRequest.webhook: object expected"); - message.webhook = $root.google.cloud.dialogflow.cx.v3.Webhook.fromObject(object.webhook); + if (object.transitionRouteGroup != null) { + if (typeof object.transitionRouteGroup !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest.transitionRouteGroup: object expected"); + message.transitionRouteGroup = $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup.fromObject(object.transitionRouteGroup); } + if (object.languageCode != null) + message.languageCode = String(object.languageCode); return message; }; /** - * Creates a plain object from a CreateWebhookRequest message. Also converts values to other types if specified. + * Creates a plain object from a CreateTransitionRouteGroupRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.CreateWebhookRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest * @static - * @param {google.cloud.dialogflow.cx.v3.CreateWebhookRequest} message CreateWebhookRequest + * @param {google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest} message CreateTransitionRouteGroupRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateWebhookRequest.toObject = function toObject(message, options) { + CreateTransitionRouteGroupRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.parent = ""; - object.webhook = null; + object.transitionRouteGroup = null; + object.languageCode = ""; } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; - if (message.webhook != null && message.hasOwnProperty("webhook")) - object.webhook = $root.google.cloud.dialogflow.cx.v3.Webhook.toObject(message.webhook, options); + if (message.transitionRouteGroup != null && message.hasOwnProperty("transitionRouteGroup")) + object.transitionRouteGroup = $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup.toObject(message.transitionRouteGroup, options); + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; return object; }; /** - * Converts this CreateWebhookRequest to JSON. + * Converts this CreateTransitionRouteGroupRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.CreateWebhookRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest * @instance * @returns {Object.} JSON object */ - CreateWebhookRequest.prototype.toJSON = function toJSON() { + CreateTransitionRouteGroupRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CreateWebhookRequest; + return CreateTransitionRouteGroupRequest; })(); - v3.UpdateWebhookRequest = (function() { + v3.UpdateTransitionRouteGroupRequest = (function() { /** - * Properties of an UpdateWebhookRequest. + * Properties of an UpdateTransitionRouteGroupRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IUpdateWebhookRequest - * @property {google.cloud.dialogflow.cx.v3.IWebhook|null} [webhook] UpdateWebhookRequest webhook - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateWebhookRequest updateMask + * @interface IUpdateTransitionRouteGroupRequest + * @property {google.cloud.dialogflow.cx.v3.ITransitionRouteGroup|null} [transitionRouteGroup] UpdateTransitionRouteGroupRequest transitionRouteGroup + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateTransitionRouteGroupRequest updateMask + * @property {string|null} [languageCode] UpdateTransitionRouteGroupRequest languageCode */ /** - * Constructs a new UpdateWebhookRequest. + * Constructs a new UpdateTransitionRouteGroupRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents an UpdateWebhookRequest. - * @implements IUpdateWebhookRequest + * @classdesc Represents an UpdateTransitionRouteGroupRequest. + * @implements IUpdateTransitionRouteGroupRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IUpdateWebhookRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IUpdateTransitionRouteGroupRequest=} [properties] Properties to set */ - function UpdateWebhookRequest(properties) { + function UpdateTransitionRouteGroupRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -36407,89 +36510,102 @@ } /** - * UpdateWebhookRequest webhook. - * @member {google.cloud.dialogflow.cx.v3.IWebhook|null|undefined} webhook - * @memberof google.cloud.dialogflow.cx.v3.UpdateWebhookRequest + * UpdateTransitionRouteGroupRequest transitionRouteGroup. + * @member {google.cloud.dialogflow.cx.v3.ITransitionRouteGroup|null|undefined} transitionRouteGroup + * @memberof google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest * @instance */ - UpdateWebhookRequest.prototype.webhook = null; + UpdateTransitionRouteGroupRequest.prototype.transitionRouteGroup = null; /** - * UpdateWebhookRequest updateMask. + * UpdateTransitionRouteGroupRequest updateMask. * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.dialogflow.cx.v3.UpdateWebhookRequest + * @memberof google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest * @instance */ - UpdateWebhookRequest.prototype.updateMask = null; + UpdateTransitionRouteGroupRequest.prototype.updateMask = null; /** - * Creates a new UpdateWebhookRequest instance using the specified properties. + * UpdateTransitionRouteGroupRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest + * @instance + */ + UpdateTransitionRouteGroupRequest.prototype.languageCode = ""; + + /** + * Creates a new UpdateTransitionRouteGroupRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.UpdateWebhookRequest + * @memberof google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IUpdateWebhookRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.UpdateWebhookRequest} UpdateWebhookRequest instance + * @param {google.cloud.dialogflow.cx.v3.IUpdateTransitionRouteGroupRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest} UpdateTransitionRouteGroupRequest instance */ - UpdateWebhookRequest.create = function create(properties) { - return new UpdateWebhookRequest(properties); + UpdateTransitionRouteGroupRequest.create = function create(properties) { + return new UpdateTransitionRouteGroupRequest(properties); }; /** - * Encodes the specified UpdateWebhookRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateWebhookRequest.verify|verify} messages. + * Encodes the specified UpdateTransitionRouteGroupRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.UpdateWebhookRequest + * @memberof google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IUpdateWebhookRequest} message UpdateWebhookRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IUpdateTransitionRouteGroupRequest} message UpdateTransitionRouteGroupRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateWebhookRequest.encode = function encode(message, writer) { + UpdateTransitionRouteGroupRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.webhook != null && Object.hasOwnProperty.call(message, "webhook")) - $root.google.cloud.dialogflow.cx.v3.Webhook.encode(message.webhook, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + if (message.transitionRouteGroup != null && Object.hasOwnProperty.call(message, "transitionRouteGroup")) + $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup.encode(message.transitionRouteGroup, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.languageCode); return writer; }; /** - * Encodes the specified UpdateWebhookRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateWebhookRequest.verify|verify} messages. + * Encodes the specified UpdateTransitionRouteGroupRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.UpdateWebhookRequest + * @memberof google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IUpdateWebhookRequest} message UpdateWebhookRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IUpdateTransitionRouteGroupRequest} message UpdateTransitionRouteGroupRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateWebhookRequest.encodeDelimited = function encodeDelimited(message, writer) { + UpdateTransitionRouteGroupRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateWebhookRequest message from the specified reader or buffer. + * Decodes an UpdateTransitionRouteGroupRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.UpdateWebhookRequest + * @memberof google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.UpdateWebhookRequest} UpdateWebhookRequest + * @returns {google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest} UpdateTransitionRouteGroupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateWebhookRequest.decode = function decode(reader, length) { + UpdateTransitionRouteGroupRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.UpdateWebhookRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.webhook = $root.google.cloud.dialogflow.cx.v3.Webhook.decode(reader, reader.uint32()); + message.transitionRouteGroup = $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup.decode(reader, reader.uint32()); break; case 2: message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; + case 3: + message.languageCode = reader.string(); + break; default: reader.skipType(tag & 7); break; @@ -36499,127 +36615,135 @@ }; /** - * Decodes an UpdateWebhookRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateTransitionRouteGroupRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.UpdateWebhookRequest + * @memberof google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.UpdateWebhookRequest} UpdateWebhookRequest + * @returns {google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest} UpdateTransitionRouteGroupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateWebhookRequest.decodeDelimited = function decodeDelimited(reader) { + UpdateTransitionRouteGroupRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateWebhookRequest message. + * Verifies an UpdateTransitionRouteGroupRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.UpdateWebhookRequest + * @memberof google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateWebhookRequest.verify = function verify(message) { + UpdateTransitionRouteGroupRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.webhook != null && message.hasOwnProperty("webhook")) { - var error = $root.google.cloud.dialogflow.cx.v3.Webhook.verify(message.webhook); + if (message.transitionRouteGroup != null && message.hasOwnProperty("transitionRouteGroup")) { + var error = $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup.verify(message.transitionRouteGroup); if (error) - return "webhook." + error; + return "transitionRouteGroup." + error; } if (message.updateMask != null && message.hasOwnProperty("updateMask")) { var error = $root.google.protobuf.FieldMask.verify(message.updateMask); if (error) return "updateMask." + error; } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; return null; }; /** - * Creates an UpdateWebhookRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateTransitionRouteGroupRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.UpdateWebhookRequest + * @memberof google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.UpdateWebhookRequest} UpdateWebhookRequest + * @returns {google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest} UpdateTransitionRouteGroupRequest */ - UpdateWebhookRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.UpdateWebhookRequest) + UpdateTransitionRouteGroupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.UpdateWebhookRequest(); - if (object.webhook != null) { - if (typeof object.webhook !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.UpdateWebhookRequest.webhook: object expected"); - message.webhook = $root.google.cloud.dialogflow.cx.v3.Webhook.fromObject(object.webhook); + var message = new $root.google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest(); + if (object.transitionRouteGroup != null) { + if (typeof object.transitionRouteGroup !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest.transitionRouteGroup: object expected"); + message.transitionRouteGroup = $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup.fromObject(object.transitionRouteGroup); } if (object.updateMask != null) { if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.UpdateWebhookRequest.updateMask: object expected"); + throw TypeError(".google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest.updateMask: object expected"); message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } + if (object.languageCode != null) + message.languageCode = String(object.languageCode); return message; }; /** - * Creates a plain object from an UpdateWebhookRequest message. Also converts values to other types if specified. + * Creates a plain object from an UpdateTransitionRouteGroupRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.UpdateWebhookRequest + * @memberof google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest * @static - * @param {google.cloud.dialogflow.cx.v3.UpdateWebhookRequest} message UpdateWebhookRequest + * @param {google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest} message UpdateTransitionRouteGroupRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateWebhookRequest.toObject = function toObject(message, options) { + UpdateTransitionRouteGroupRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.webhook = null; + object.transitionRouteGroup = null; object.updateMask = null; + object.languageCode = ""; } - if (message.webhook != null && message.hasOwnProperty("webhook")) - object.webhook = $root.google.cloud.dialogflow.cx.v3.Webhook.toObject(message.webhook, options); + if (message.transitionRouteGroup != null && message.hasOwnProperty("transitionRouteGroup")) + object.transitionRouteGroup = $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup.toObject(message.transitionRouteGroup, options); if (message.updateMask != null && message.hasOwnProperty("updateMask")) object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; return object; }; /** - * Converts this UpdateWebhookRequest to JSON. + * Converts this UpdateTransitionRouteGroupRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.UpdateWebhookRequest + * @memberof google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest * @instance * @returns {Object.} JSON object */ - UpdateWebhookRequest.prototype.toJSON = function toJSON() { + UpdateTransitionRouteGroupRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UpdateWebhookRequest; + return UpdateTransitionRouteGroupRequest; })(); - v3.DeleteWebhookRequest = (function() { + v3.DeleteTransitionRouteGroupRequest = (function() { /** - * Properties of a DeleteWebhookRequest. + * Properties of a DeleteTransitionRouteGroupRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IDeleteWebhookRequest - * @property {string|null} [name] DeleteWebhookRequest name - * @property {boolean|null} [force] DeleteWebhookRequest force + * @interface IDeleteTransitionRouteGroupRequest + * @property {string|null} [name] DeleteTransitionRouteGroupRequest name + * @property {boolean|null} [force] DeleteTransitionRouteGroupRequest force */ /** - * Constructs a new DeleteWebhookRequest. + * Constructs a new DeleteTransitionRouteGroupRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a DeleteWebhookRequest. - * @implements IDeleteWebhookRequest + * @classdesc Represents a DeleteTransitionRouteGroupRequest. + * @implements IDeleteTransitionRouteGroupRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IDeleteWebhookRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IDeleteTransitionRouteGroupRequest=} [properties] Properties to set */ - function DeleteWebhookRequest(properties) { + function DeleteTransitionRouteGroupRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -36627,43 +36751,43 @@ } /** - * DeleteWebhookRequest name. + * DeleteTransitionRouteGroupRequest name. * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.DeleteWebhookRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest * @instance */ - DeleteWebhookRequest.prototype.name = ""; + DeleteTransitionRouteGroupRequest.prototype.name = ""; /** - * DeleteWebhookRequest force. + * DeleteTransitionRouteGroupRequest force. * @member {boolean} force - * @memberof google.cloud.dialogflow.cx.v3.DeleteWebhookRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest * @instance */ - DeleteWebhookRequest.prototype.force = false; + DeleteTransitionRouteGroupRequest.prototype.force = false; /** - * Creates a new DeleteWebhookRequest instance using the specified properties. + * Creates a new DeleteTransitionRouteGroupRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.DeleteWebhookRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IDeleteWebhookRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.DeleteWebhookRequest} DeleteWebhookRequest instance + * @param {google.cloud.dialogflow.cx.v3.IDeleteTransitionRouteGroupRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest} DeleteTransitionRouteGroupRequest instance */ - DeleteWebhookRequest.create = function create(properties) { - return new DeleteWebhookRequest(properties); + DeleteTransitionRouteGroupRequest.create = function create(properties) { + return new DeleteTransitionRouteGroupRequest(properties); }; /** - * Encodes the specified DeleteWebhookRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteWebhookRequest.verify|verify} messages. + * Encodes the specified DeleteTransitionRouteGroupRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.DeleteWebhookRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IDeleteWebhookRequest} message DeleteWebhookRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IDeleteTransitionRouteGroupRequest} message DeleteTransitionRouteGroupRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteWebhookRequest.encode = function encode(message, writer) { + DeleteTransitionRouteGroupRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) @@ -36674,33 +36798,33 @@ }; /** - * Encodes the specified DeleteWebhookRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteWebhookRequest.verify|verify} messages. + * Encodes the specified DeleteTransitionRouteGroupRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.DeleteWebhookRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IDeleteWebhookRequest} message DeleteWebhookRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IDeleteTransitionRouteGroupRequest} message DeleteTransitionRouteGroupRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteWebhookRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeleteTransitionRouteGroupRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteWebhookRequest message from the specified reader or buffer. + * Decodes a DeleteTransitionRouteGroupRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.DeleteWebhookRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.DeleteWebhookRequest} DeleteWebhookRequest + * @returns {google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest} DeleteTransitionRouteGroupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteWebhookRequest.decode = function decode(reader, length) { + DeleteTransitionRouteGroupRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.DeleteWebhookRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -36719,30 +36843,30 @@ }; /** - * Decodes a DeleteWebhookRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteTransitionRouteGroupRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.DeleteWebhookRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.DeleteWebhookRequest} DeleteWebhookRequest + * @returns {google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest} DeleteTransitionRouteGroupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteWebhookRequest.decodeDelimited = function decodeDelimited(reader) { + DeleteTransitionRouteGroupRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteWebhookRequest message. + * Verifies a DeleteTransitionRouteGroupRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.DeleteWebhookRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteWebhookRequest.verify = function verify(message) { + DeleteTransitionRouteGroupRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) @@ -36755,17 +36879,17 @@ }; /** - * Creates a DeleteWebhookRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteTransitionRouteGroupRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.DeleteWebhookRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.DeleteWebhookRequest} DeleteWebhookRequest + * @returns {google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest} DeleteTransitionRouteGroupRequest */ - DeleteWebhookRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.DeleteWebhookRequest) + DeleteTransitionRouteGroupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.DeleteWebhookRequest(); + var message = new $root.google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest(); if (object.name != null) message.name = String(object.name); if (object.force != null) @@ -36774,15 +36898,15 @@ }; /** - * Creates a plain object from a DeleteWebhookRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeleteTransitionRouteGroupRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.DeleteWebhookRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest * @static - * @param {google.cloud.dialogflow.cx.v3.DeleteWebhookRequest} message DeleteWebhookRequest + * @param {google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest} message DeleteTransitionRouteGroupRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteWebhookRequest.toObject = function toObject(message, options) { + DeleteTransitionRouteGroupRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -36798,1218 +36922,910 @@ }; /** - * Converts this DeleteWebhookRequest to JSON. + * Converts this DeleteTransitionRouteGroupRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.DeleteWebhookRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest * @instance * @returns {Object.} JSON object */ - DeleteWebhookRequest.prototype.toJSON = function toJSON() { + DeleteTransitionRouteGroupRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeleteWebhookRequest; + return DeleteTransitionRouteGroupRequest; })(); - v3.WebhookRequest = (function() { + v3.Versions = (function() { /** - * Properties of a WebhookRequest. + * Constructs a new Versions service. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IWebhookRequest - * @property {string|null} [detectIntentResponseId] WebhookRequest detectIntentResponseId - * @property {google.cloud.dialogflow.cx.v3.WebhookRequest.IFulfillmentInfo|null} [fulfillmentInfo] WebhookRequest fulfillmentInfo - * @property {google.cloud.dialogflow.cx.v3.WebhookRequest.IIntentInfo|null} [intentInfo] WebhookRequest intentInfo - * @property {google.cloud.dialogflow.cx.v3.IPageInfo|null} [pageInfo] WebhookRequest pageInfo - * @property {google.cloud.dialogflow.cx.v3.ISessionInfo|null} [sessionInfo] WebhookRequest sessionInfo - * @property {Array.|null} [messages] WebhookRequest messages - * @property {google.protobuf.IStruct|null} [payload] WebhookRequest payload + * @classdesc Represents a Versions + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited */ + function Versions(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Versions.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Versions; /** - * Constructs a new WebhookRequest. - * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a WebhookRequest. - * @implements IWebhookRequest - * @constructor - * @param {google.cloud.dialogflow.cx.v3.IWebhookRequest=} [properties] Properties to set + * Creates new Versions service using the specified rpc implementation. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.Versions + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Versions} RPC service. Useful where requests and/or responses are streamed. */ - function WebhookRequest(properties) { - this.messages = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + Versions.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; /** - * WebhookRequest detectIntentResponseId. - * @member {string} detectIntentResponseId - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest - * @instance + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Versions#listVersions}. + * @memberof google.cloud.dialogflow.cx.v3.Versions + * @typedef ListVersionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.ListVersionsResponse} [response] ListVersionsResponse */ - WebhookRequest.prototype.detectIntentResponseId = ""; /** - * WebhookRequest fulfillmentInfo. - * @member {google.cloud.dialogflow.cx.v3.WebhookRequest.IFulfillmentInfo|null|undefined} fulfillmentInfo - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest + * Calls ListVersions. + * @function listVersions + * @memberof google.cloud.dialogflow.cx.v3.Versions * @instance + * @param {google.cloud.dialogflow.cx.v3.IListVersionsRequest} request ListVersionsRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Versions.ListVersionsCallback} callback Node-style callback called with the error, if any, and ListVersionsResponse + * @returns {undefined} + * @variation 1 */ - WebhookRequest.prototype.fulfillmentInfo = null; + Object.defineProperty(Versions.prototype.listVersions = function listVersions(request, callback) { + return this.rpcCall(listVersions, $root.google.cloud.dialogflow.cx.v3.ListVersionsRequest, $root.google.cloud.dialogflow.cx.v3.ListVersionsResponse, request, callback); + }, "name", { value: "ListVersions" }); /** - * WebhookRequest intentInfo. - * @member {google.cloud.dialogflow.cx.v3.WebhookRequest.IIntentInfo|null|undefined} intentInfo - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest + * Calls ListVersions. + * @function listVersions + * @memberof google.cloud.dialogflow.cx.v3.Versions * @instance + * @param {google.cloud.dialogflow.cx.v3.IListVersionsRequest} request ListVersionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - WebhookRequest.prototype.intentInfo = null; /** - * WebhookRequest pageInfo. - * @member {google.cloud.dialogflow.cx.v3.IPageInfo|null|undefined} pageInfo - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest - * @instance + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Versions#getVersion}. + * @memberof google.cloud.dialogflow.cx.v3.Versions + * @typedef GetVersionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.Version} [response] Version */ - WebhookRequest.prototype.pageInfo = null; /** - * WebhookRequest sessionInfo. - * @member {google.cloud.dialogflow.cx.v3.ISessionInfo|null|undefined} sessionInfo - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest + * Calls GetVersion. + * @function getVersion + * @memberof google.cloud.dialogflow.cx.v3.Versions * @instance + * @param {google.cloud.dialogflow.cx.v3.IGetVersionRequest} request GetVersionRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Versions.GetVersionCallback} callback Node-style callback called with the error, if any, and Version + * @returns {undefined} + * @variation 1 */ - WebhookRequest.prototype.sessionInfo = null; + Object.defineProperty(Versions.prototype.getVersion = function getVersion(request, callback) { + return this.rpcCall(getVersion, $root.google.cloud.dialogflow.cx.v3.GetVersionRequest, $root.google.cloud.dialogflow.cx.v3.Version, request, callback); + }, "name", { value: "GetVersion" }); /** - * WebhookRequest messages. - * @member {Array.} messages - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest + * Calls GetVersion. + * @function getVersion + * @memberof google.cloud.dialogflow.cx.v3.Versions * @instance + * @param {google.cloud.dialogflow.cx.v3.IGetVersionRequest} request GetVersionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - WebhookRequest.prototype.messages = $util.emptyArray; /** - * WebhookRequest payload. - * @member {google.protobuf.IStruct|null|undefined} payload - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Versions#createVersion}. + * @memberof google.cloud.dialogflow.cx.v3.Versions + * @typedef CreateVersionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateVersion. + * @function createVersion + * @memberof google.cloud.dialogflow.cx.v3.Versions * @instance + * @param {google.cloud.dialogflow.cx.v3.ICreateVersionRequest} request CreateVersionRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Versions.CreateVersionCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - WebhookRequest.prototype.payload = null; + Object.defineProperty(Versions.prototype.createVersion = function createVersion(request, callback) { + return this.rpcCall(createVersion, $root.google.cloud.dialogflow.cx.v3.CreateVersionRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateVersion" }); /** - * Creates a new WebhookRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.IWebhookRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.WebhookRequest} WebhookRequest instance + * Calls CreateVersion. + * @function createVersion + * @memberof google.cloud.dialogflow.cx.v3.Versions + * @instance + * @param {google.cloud.dialogflow.cx.v3.ICreateVersionRequest} request CreateVersionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - WebhookRequest.create = function create(properties) { - return new WebhookRequest(properties); - }; /** - * Encodes the specified WebhookRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.WebhookRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.IWebhookRequest} message WebhookRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Versions#updateVersion}. + * @memberof google.cloud.dialogflow.cx.v3.Versions + * @typedef UpdateVersionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.Version} [response] Version */ - WebhookRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.detectIntentResponseId != null && Object.hasOwnProperty.call(message, "detectIntentResponseId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.detectIntentResponseId); - if (message.intentInfo != null && Object.hasOwnProperty.call(message, "intentInfo")) - $root.google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.encode(message.intentInfo, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.pageInfo != null && Object.hasOwnProperty.call(message, "pageInfo")) - $root.google.cloud.dialogflow.cx.v3.PageInfo.encode(message.pageInfo, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.sessionInfo != null && Object.hasOwnProperty.call(message, "sessionInfo")) - $root.google.cloud.dialogflow.cx.v3.SessionInfo.encode(message.sessionInfo, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.fulfillmentInfo != null && Object.hasOwnProperty.call(message, "fulfillmentInfo")) - $root.google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo.encode(message.fulfillmentInfo, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.messages != null && message.messages.length) - for (var i = 0; i < message.messages.length; ++i) - $root.google.cloud.dialogflow.cx.v3.ResponseMessage.encode(message.messages[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.payload != null && Object.hasOwnProperty.call(message, "payload")) - $root.google.protobuf.Struct.encode(message.payload, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - return writer; - }; /** - * Encodes the specified WebhookRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.WebhookRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.IWebhookRequest} message WebhookRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls UpdateVersion. + * @function updateVersion + * @memberof google.cloud.dialogflow.cx.v3.Versions + * @instance + * @param {google.cloud.dialogflow.cx.v3.IUpdateVersionRequest} request UpdateVersionRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Versions.UpdateVersionCallback} callback Node-style callback called with the error, if any, and Version + * @returns {undefined} + * @variation 1 */ - WebhookRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + Object.defineProperty(Versions.prototype.updateVersion = function updateVersion(request, callback) { + return this.rpcCall(updateVersion, $root.google.cloud.dialogflow.cx.v3.UpdateVersionRequest, $root.google.cloud.dialogflow.cx.v3.Version, request, callback); + }, "name", { value: "UpdateVersion" }); /** - * Decodes a WebhookRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.WebhookRequest} WebhookRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls UpdateVersion. + * @function updateVersion + * @memberof google.cloud.dialogflow.cx.v3.Versions + * @instance + * @param {google.cloud.dialogflow.cx.v3.IUpdateVersionRequest} request UpdateVersionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - WebhookRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.WebhookRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.detectIntentResponseId = reader.string(); - break; - case 6: - message.fulfillmentInfo = $root.google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo.decode(reader, reader.uint32()); - break; - case 3: - message.intentInfo = $root.google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.decode(reader, reader.uint32()); - break; - case 4: - message.pageInfo = $root.google.cloud.dialogflow.cx.v3.PageInfo.decode(reader, reader.uint32()); - break; - case 5: - message.sessionInfo = $root.google.cloud.dialogflow.cx.v3.SessionInfo.decode(reader, reader.uint32()); - break; - case 7: - if (!(message.messages && message.messages.length)) - message.messages = []; - message.messages.push($root.google.cloud.dialogflow.cx.v3.ResponseMessage.decode(reader, reader.uint32())); - break; - case 8: - message.payload = $root.google.protobuf.Struct.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes a WebhookRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.WebhookRequest} WebhookRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Versions#deleteVersion}. + * @memberof google.cloud.dialogflow.cx.v3.Versions + * @typedef DeleteVersionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty */ - WebhookRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; /** - * Verifies a WebhookRequest message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls DeleteVersion. + * @function deleteVersion + * @memberof google.cloud.dialogflow.cx.v3.Versions + * @instance + * @param {google.cloud.dialogflow.cx.v3.IDeleteVersionRequest} request DeleteVersionRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Versions.DeleteVersionCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 */ - WebhookRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.detectIntentResponseId != null && message.hasOwnProperty("detectIntentResponseId")) - if (!$util.isString(message.detectIntentResponseId)) - return "detectIntentResponseId: string expected"; - if (message.fulfillmentInfo != null && message.hasOwnProperty("fulfillmentInfo")) { - var error = $root.google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo.verify(message.fulfillmentInfo); - if (error) - return "fulfillmentInfo." + error; - } - if (message.intentInfo != null && message.hasOwnProperty("intentInfo")) { - var error = $root.google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.verify(message.intentInfo); - if (error) - return "intentInfo." + error; - } - if (message.pageInfo != null && message.hasOwnProperty("pageInfo")) { - var error = $root.google.cloud.dialogflow.cx.v3.PageInfo.verify(message.pageInfo); - if (error) - return "pageInfo." + error; - } - if (message.sessionInfo != null && message.hasOwnProperty("sessionInfo")) { - var error = $root.google.cloud.dialogflow.cx.v3.SessionInfo.verify(message.sessionInfo); - if (error) - return "sessionInfo." + error; - } - if (message.messages != null && message.hasOwnProperty("messages")) { - if (!Array.isArray(message.messages)) - return "messages: array expected"; - for (var i = 0; i < message.messages.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.verify(message.messages[i]); - if (error) - return "messages." + error; + Object.defineProperty(Versions.prototype.deleteVersion = function deleteVersion(request, callback) { + return this.rpcCall(deleteVersion, $root.google.cloud.dialogflow.cx.v3.DeleteVersionRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteVersion" }); + + /** + * Calls DeleteVersion. + * @function deleteVersion + * @memberof google.cloud.dialogflow.cx.v3.Versions + * @instance + * @param {google.cloud.dialogflow.cx.v3.IDeleteVersionRequest} request DeleteVersionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Versions#loadVersion}. + * @memberof google.cloud.dialogflow.cx.v3.Versions + * @typedef LoadVersionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls LoadVersion. + * @function loadVersion + * @memberof google.cloud.dialogflow.cx.v3.Versions + * @instance + * @param {google.cloud.dialogflow.cx.v3.ILoadVersionRequest} request LoadVersionRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Versions.LoadVersionCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Versions.prototype.loadVersion = function loadVersion(request, callback) { + return this.rpcCall(loadVersion, $root.google.cloud.dialogflow.cx.v3.LoadVersionRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "LoadVersion" }); + + /** + * Calls LoadVersion. + * @function loadVersion + * @memberof google.cloud.dialogflow.cx.v3.Versions + * @instance + * @param {google.cloud.dialogflow.cx.v3.ILoadVersionRequest} request LoadVersionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Versions; + })(); + + v3.CreateVersionOperationMetadata = (function() { + + /** + * Properties of a CreateVersionOperationMetadata. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface ICreateVersionOperationMetadata + * @property {string|null} [version] CreateVersionOperationMetadata version + */ + + /** + * Constructs a new CreateVersionOperationMetadata. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a CreateVersionOperationMetadata. + * @implements ICreateVersionOperationMetadata + * @constructor + * @param {google.cloud.dialogflow.cx.v3.ICreateVersionOperationMetadata=} [properties] Properties to set + */ + function CreateVersionOperationMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateVersionOperationMetadata version. + * @member {string} version + * @memberof google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata + * @instance + */ + CreateVersionOperationMetadata.prototype.version = ""; + + /** + * Creates a new CreateVersionOperationMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata + * @static + * @param {google.cloud.dialogflow.cx.v3.ICreateVersionOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata} CreateVersionOperationMetadata instance + */ + CreateVersionOperationMetadata.create = function create(properties) { + return new CreateVersionOperationMetadata(properties); + }; + + /** + * Encodes the specified CreateVersionOperationMetadata message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata + * @static + * @param {google.cloud.dialogflow.cx.v3.ICreateVersionOperationMetadata} message CreateVersionOperationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateVersionOperationMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); + return writer; + }; + + /** + * Encodes the specified CreateVersionOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata + * @static + * @param {google.cloud.dialogflow.cx.v3.ICreateVersionOperationMetadata} message CreateVersionOperationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateVersionOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateVersionOperationMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata} CreateVersionOperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateVersionOperationMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.version = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } - if (message.payload != null && message.hasOwnProperty("payload")) { - var error = $root.google.protobuf.Struct.verify(message.payload); - if (error) - return "payload." + error; - } + return message; + }; + + /** + * Decodes a CreateVersionOperationMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata} CreateVersionOperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateVersionOperationMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateVersionOperationMetadata message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateVersionOperationMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; return null; }; /** - * Creates a WebhookRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateVersionOperationMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.WebhookRequest} WebhookRequest + * @returns {google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata} CreateVersionOperationMetadata */ - WebhookRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.WebhookRequest) + CreateVersionOperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.WebhookRequest(); - if (object.detectIntentResponseId != null) - message.detectIntentResponseId = String(object.detectIntentResponseId); - if (object.fulfillmentInfo != null) { - if (typeof object.fulfillmentInfo !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.WebhookRequest.fulfillmentInfo: object expected"); - message.fulfillmentInfo = $root.google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo.fromObject(object.fulfillmentInfo); - } - if (object.intentInfo != null) { - if (typeof object.intentInfo !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.WebhookRequest.intentInfo: object expected"); - message.intentInfo = $root.google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.fromObject(object.intentInfo); - } - if (object.pageInfo != null) { - if (typeof object.pageInfo !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.WebhookRequest.pageInfo: object expected"); - message.pageInfo = $root.google.cloud.dialogflow.cx.v3.PageInfo.fromObject(object.pageInfo); - } - if (object.sessionInfo != null) { - if (typeof object.sessionInfo !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.WebhookRequest.sessionInfo: object expected"); - message.sessionInfo = $root.google.cloud.dialogflow.cx.v3.SessionInfo.fromObject(object.sessionInfo); - } - if (object.messages) { - if (!Array.isArray(object.messages)) - throw TypeError(".google.cloud.dialogflow.cx.v3.WebhookRequest.messages: array expected"); - message.messages = []; - for (var i = 0; i < object.messages.length; ++i) { - if (typeof object.messages[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.WebhookRequest.messages: object expected"); - message.messages[i] = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.fromObject(object.messages[i]); - } - } - if (object.payload != null) { - if (typeof object.payload !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.WebhookRequest.payload: object expected"); - message.payload = $root.google.protobuf.Struct.fromObject(object.payload); - } + var message = new $root.google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata(); + if (object.version != null) + message.version = String(object.version); return message; }; /** - * Creates a plain object from a WebhookRequest message. Also converts values to other types if specified. + * Creates a plain object from a CreateVersionOperationMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata * @static - * @param {google.cloud.dialogflow.cx.v3.WebhookRequest} message WebhookRequest + * @param {google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata} message CreateVersionOperationMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - WebhookRequest.toObject = function toObject(message, options) { + CreateVersionOperationMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.messages = []; - if (options.defaults) { - object.detectIntentResponseId = ""; - object.intentInfo = null; - object.pageInfo = null; - object.sessionInfo = null; - object.fulfillmentInfo = null; - object.payload = null; - } - if (message.detectIntentResponseId != null && message.hasOwnProperty("detectIntentResponseId")) - object.detectIntentResponseId = message.detectIntentResponseId; - if (message.intentInfo != null && message.hasOwnProperty("intentInfo")) - object.intentInfo = $root.google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.toObject(message.intentInfo, options); - if (message.pageInfo != null && message.hasOwnProperty("pageInfo")) - object.pageInfo = $root.google.cloud.dialogflow.cx.v3.PageInfo.toObject(message.pageInfo, options); - if (message.sessionInfo != null && message.hasOwnProperty("sessionInfo")) - object.sessionInfo = $root.google.cloud.dialogflow.cx.v3.SessionInfo.toObject(message.sessionInfo, options); - if (message.fulfillmentInfo != null && message.hasOwnProperty("fulfillmentInfo")) - object.fulfillmentInfo = $root.google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo.toObject(message.fulfillmentInfo, options); - if (message.messages && message.messages.length) { - object.messages = []; - for (var j = 0; j < message.messages.length; ++j) - object.messages[j] = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.toObject(message.messages[j], options); - } - if (message.payload != null && message.hasOwnProperty("payload")) - object.payload = $root.google.protobuf.Struct.toObject(message.payload, options); + if (options.defaults) + object.version = ""; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; return object; }; /** - * Converts this WebhookRequest to JSON. + * Converts this CreateVersionOperationMetadata to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata * @instance * @returns {Object.} JSON object */ - WebhookRequest.prototype.toJSON = function toJSON() { + CreateVersionOperationMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - WebhookRequest.FulfillmentInfo = (function() { + return CreateVersionOperationMetadata; + })(); - /** - * Properties of a FulfillmentInfo. - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest - * @interface IFulfillmentInfo - * @property {string|null} [tag] FulfillmentInfo tag - */ + v3.Version = (function() { - /** - * Constructs a new FulfillmentInfo. - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest - * @classdesc Represents a FulfillmentInfo. - * @implements IFulfillmentInfo - * @constructor - * @param {google.cloud.dialogflow.cx.v3.WebhookRequest.IFulfillmentInfo=} [properties] Properties to set - */ - function FulfillmentInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of a Version. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IVersion + * @property {string|null} [name] Version name + * @property {string|null} [displayName] Version displayName + * @property {string|null} [description] Version description + * @property {google.cloud.dialogflow.cx.v3.INluSettings|null} [nluSettings] Version nluSettings + * @property {google.protobuf.ITimestamp|null} [createTime] Version createTime + * @property {google.cloud.dialogflow.cx.v3.Version.State|null} [state] Version state + */ - /** - * FulfillmentInfo tag. - * @member {string} tag - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo - * @instance - */ - FulfillmentInfo.prototype.tag = ""; + /** + * Constructs a new Version. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a Version. + * @implements IVersion + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IVersion=} [properties] Properties to set + */ + function Version(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Creates a new FulfillmentInfo instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo - * @static - * @param {google.cloud.dialogflow.cx.v3.WebhookRequest.IFulfillmentInfo=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo} FulfillmentInfo instance - */ - FulfillmentInfo.create = function create(properties) { - return new FulfillmentInfo(properties); - }; + /** + * Version name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.Version + * @instance + */ + Version.prototype.name = ""; - /** - * Encodes the specified FulfillmentInfo message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo - * @static - * @param {google.cloud.dialogflow.cx.v3.WebhookRequest.IFulfillmentInfo} message FulfillmentInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FulfillmentInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.tag != null && Object.hasOwnProperty.call(message, "tag")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.tag); - return writer; - }; + /** + * Version displayName. + * @member {string} displayName + * @memberof google.cloud.dialogflow.cx.v3.Version + * @instance + */ + Version.prototype.displayName = ""; - /** - * Encodes the specified FulfillmentInfo message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo - * @static - * @param {google.cloud.dialogflow.cx.v3.WebhookRequest.IFulfillmentInfo} message FulfillmentInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FulfillmentInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Version description. + * @member {string} description + * @memberof google.cloud.dialogflow.cx.v3.Version + * @instance + */ + Version.prototype.description = ""; - /** - * Decodes a FulfillmentInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo} FulfillmentInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FulfillmentInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.tag = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Version nluSettings. + * @member {google.cloud.dialogflow.cx.v3.INluSettings|null|undefined} nluSettings + * @memberof google.cloud.dialogflow.cx.v3.Version + * @instance + */ + Version.prototype.nluSettings = null; - /** - * Decodes a FulfillmentInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo} FulfillmentInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FulfillmentInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Version createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.dialogflow.cx.v3.Version + * @instance + */ + Version.prototype.createTime = null; - /** - * Verifies a FulfillmentInfo message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FulfillmentInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.tag != null && message.hasOwnProperty("tag")) - if (!$util.isString(message.tag)) - return "tag: string expected"; - return null; - }; + /** + * Version state. + * @member {google.cloud.dialogflow.cx.v3.Version.State} state + * @memberof google.cloud.dialogflow.cx.v3.Version + * @instance + */ + Version.prototype.state = 0; - /** - * Creates a FulfillmentInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo} FulfillmentInfo - */ - FulfillmentInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo(); - if (object.tag != null) - message.tag = String(object.tag); - return message; - }; + /** + * Creates a new Version instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.Version + * @static + * @param {google.cloud.dialogflow.cx.v3.IVersion=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Version} Version instance + */ + Version.create = function create(properties) { + return new Version(properties); + }; - /** - * Creates a plain object from a FulfillmentInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo - * @static - * @param {google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo} message FulfillmentInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FulfillmentInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.tag = ""; - if (message.tag != null && message.hasOwnProperty("tag")) - object.tag = message.tag; - return object; - }; + /** + * Encodes the specified Version message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Version.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.Version + * @static + * @param {google.cloud.dialogflow.cx.v3.IVersion} message Version message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Version.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.nluSettings != null && Object.hasOwnProperty.call(message, "nluSettings")) + $root.google.cloud.dialogflow.cx.v3.NluSettings.encode(message.nluSettings, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.state); + return writer; + }; - /** - * Converts this FulfillmentInfo to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo - * @instance - * @returns {Object.} JSON object - */ - FulfillmentInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Encodes the specified Version message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Version.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Version + * @static + * @param {google.cloud.dialogflow.cx.v3.IVersion} message Version message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Version.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - return FulfillmentInfo; - })(); + /** + * Decodes a Version message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.Version + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3.Version} Version + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Version.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.Version(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.displayName = reader.string(); + break; + case 3: + message.description = reader.string(); + break; + case 4: + message.nluSettings = $root.google.cloud.dialogflow.cx.v3.NluSettings.decode(reader, reader.uint32()); + break; + case 5: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 6: + message.state = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - WebhookRequest.IntentInfo = (function() { + /** + * Decodes a Version message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Version + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.Version} Version + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Version.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Properties of an IntentInfo. - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest - * @interface IIntentInfo - * @property {string|null} [lastMatchedIntent] IntentInfo lastMatchedIntent - * @property {Object.|null} [parameters] IntentInfo parameters - */ + /** + * Verifies a Version message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.Version + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Version.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.nluSettings != null && message.hasOwnProperty("nluSettings")) { + var error = $root.google.cloud.dialogflow.cx.v3.NluSettings.verify(message.nluSettings); + if (error) + return "nluSettings." + error; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; - /** - * Constructs a new IntentInfo. - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest - * @classdesc Represents an IntentInfo. - * @implements IIntentInfo - * @constructor - * @param {google.cloud.dialogflow.cx.v3.WebhookRequest.IIntentInfo=} [properties] Properties to set - */ - function IntentInfo(properties) { - this.parameters = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Creates a Version message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.Version + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.Version} Version + */ + Version.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.Version) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.Version(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.description != null) + message.description = String(object.description); + if (object.nluSettings != null) { + if (typeof object.nluSettings !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Version.nluSettings: object expected"); + message.nluSettings = $root.google.cloud.dialogflow.cx.v3.NluSettings.fromObject(object.nluSettings); + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Version.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + switch (object.state) { + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "RUNNING": + case 1: + message.state = 1; + break; + case "SUCCEEDED": + case 2: + message.state = 2; + break; + case "FAILED": + case 3: + message.state = 3; + break; } + return message; + }; - /** - * IntentInfo lastMatchedIntent. - * @member {string} lastMatchedIntent - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo - * @instance - */ - IntentInfo.prototype.lastMatchedIntent = ""; + /** + * Creates a plain object from a Version message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.Version + * @static + * @param {google.cloud.dialogflow.cx.v3.Version} message Version + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Version.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.displayName = ""; + object.description = ""; + object.nluSettings = null; + object.createTime = null; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.nluSettings != null && message.hasOwnProperty("nluSettings")) + object.nluSettings = $root.google.cloud.dialogflow.cx.v3.NluSettings.toObject(message.nluSettings, options); + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.Version.State[message.state] : message.state; + return object; + }; - /** - * IntentInfo parameters. - * @member {Object.} parameters - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo - * @instance - */ - IntentInfo.prototype.parameters = $util.emptyObject; + /** + * Converts this Version to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.Version + * @instance + * @returns {Object.} JSON object + */ + Version.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates a new IntentInfo instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo - * @static - * @param {google.cloud.dialogflow.cx.v3.WebhookRequest.IIntentInfo=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo} IntentInfo instance - */ - IntentInfo.create = function create(properties) { - return new IntentInfo(properties); - }; + /** + * State enum. + * @name google.cloud.dialogflow.cx.v3.Version.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} RUNNING=1 RUNNING value + * @property {number} SUCCEEDED=2 SUCCEEDED value + * @property {number} FAILED=3 FAILED value + */ + Version.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "RUNNING"] = 1; + values[valuesById[2] = "SUCCEEDED"] = 2; + values[valuesById[3] = "FAILED"] = 3; + return values; + })(); - /** - * Encodes the specified IntentInfo message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo - * @static - * @param {google.cloud.dialogflow.cx.v3.WebhookRequest.IIntentInfo} message IntentInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IntentInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.lastMatchedIntent != null && Object.hasOwnProperty.call(message, "lastMatchedIntent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.lastMatchedIntent); - if (message.parameters != null && Object.hasOwnProperty.call(message, "parameters")) - for (var keys = Object.keys(message.parameters), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue.encode(message.parameters[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - return writer; - }; + return Version; + })(); - /** - * Encodes the specified IntentInfo message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo - * @static - * @param {google.cloud.dialogflow.cx.v3.WebhookRequest.IIntentInfo} message IntentInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IntentInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + v3.ListVersionsRequest = (function() { - /** - * Decodes an IntentInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo} IntentInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IntentInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.lastMatchedIntent = reader.string(); - break; - case 2: - if (message.parameters === $util.emptyObject) - message.parameters = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.parameters[key] = value; - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Properties of a ListVersionsRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IListVersionsRequest + * @property {string|null} [parent] ListVersionsRequest parent + * @property {number|null} [pageSize] ListVersionsRequest pageSize + * @property {string|null} [pageToken] ListVersionsRequest pageToken + */ - /** - * Decodes an IntentInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo} IntentInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IntentInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Constructs a new ListVersionsRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a ListVersionsRequest. + * @implements IListVersionsRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IListVersionsRequest=} [properties] Properties to set + */ + function ListVersionsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Verifies an IntentInfo message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - IntentInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.lastMatchedIntent != null && message.hasOwnProperty("lastMatchedIntent")) - if (!$util.isString(message.lastMatchedIntent)) - return "lastMatchedIntent: string expected"; - if (message.parameters != null && message.hasOwnProperty("parameters")) { - if (!$util.isObject(message.parameters)) - return "parameters: object expected"; - var key = Object.keys(message.parameters); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue.verify(message.parameters[key[i]]); - if (error) - return "parameters." + error; - } - } - return null; - }; - - /** - * Creates an IntentInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo} IntentInfo - */ - IntentInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo(); - if (object.lastMatchedIntent != null) - message.lastMatchedIntent = String(object.lastMatchedIntent); - if (object.parameters) { - if (typeof object.parameters !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.parameters: object expected"); - message.parameters = {}; - for (var keys = Object.keys(object.parameters), i = 0; i < keys.length; ++i) { - if (typeof object.parameters[keys[i]] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.parameters: object expected"); - message.parameters[keys[i]] = $root.google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue.fromObject(object.parameters[keys[i]]); - } - } - return message; - }; - - /** - * Creates a plain object from an IntentInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo - * @static - * @param {google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo} message IntentInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - IntentInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.parameters = {}; - if (options.defaults) - object.lastMatchedIntent = ""; - if (message.lastMatchedIntent != null && message.hasOwnProperty("lastMatchedIntent")) - object.lastMatchedIntent = message.lastMatchedIntent; - var keys2; - if (message.parameters && (keys2 = Object.keys(message.parameters)).length) { - object.parameters = {}; - for (var j = 0; j < keys2.length; ++j) - object.parameters[keys2[j]] = $root.google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue.toObject(message.parameters[keys2[j]], options); - } - return object; - }; - - /** - * Converts this IntentInfo to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo - * @instance - * @returns {Object.} JSON object - */ - IntentInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - IntentInfo.IntentParameterValue = (function() { - - /** - * Properties of an IntentParameterValue. - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo - * @interface IIntentParameterValue - * @property {string|null} [originalValue] IntentParameterValue originalValue - * @property {google.protobuf.IValue|null} [resolvedValue] IntentParameterValue resolvedValue - */ - - /** - * Constructs a new IntentParameterValue. - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo - * @classdesc Represents an IntentParameterValue. - * @implements IIntentParameterValue - * @constructor - * @param {google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IIntentParameterValue=} [properties] Properties to set - */ - function IntentParameterValue(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * IntentParameterValue originalValue. - * @member {string} originalValue - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue - * @instance - */ - IntentParameterValue.prototype.originalValue = ""; - - /** - * IntentParameterValue resolvedValue. - * @member {google.protobuf.IValue|null|undefined} resolvedValue - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue - * @instance - */ - IntentParameterValue.prototype.resolvedValue = null; - - /** - * Creates a new IntentParameterValue instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue - * @static - * @param {google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IIntentParameterValue=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue} IntentParameterValue instance - */ - IntentParameterValue.create = function create(properties) { - return new IntentParameterValue(properties); - }; - - /** - * Encodes the specified IntentParameterValue message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue - * @static - * @param {google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IIntentParameterValue} message IntentParameterValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IntentParameterValue.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.originalValue != null && Object.hasOwnProperty.call(message, "originalValue")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.originalValue); - if (message.resolvedValue != null && Object.hasOwnProperty.call(message, "resolvedValue")) - $root.google.protobuf.Value.encode(message.resolvedValue, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified IntentParameterValue message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue - * @static - * @param {google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IIntentParameterValue} message IntentParameterValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IntentParameterValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an IntentParameterValue message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue} IntentParameterValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IntentParameterValue.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.originalValue = reader.string(); - break; - case 2: - message.resolvedValue = $root.google.protobuf.Value.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an IntentParameterValue message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue} IntentParameterValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IntentParameterValue.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an IntentParameterValue message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - IntentParameterValue.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.originalValue != null && message.hasOwnProperty("originalValue")) - if (!$util.isString(message.originalValue)) - return "originalValue: string expected"; - if (message.resolvedValue != null && message.hasOwnProperty("resolvedValue")) { - var error = $root.google.protobuf.Value.verify(message.resolvedValue); - if (error) - return "resolvedValue." + error; - } - return null; - }; - - /** - * Creates an IntentParameterValue message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue} IntentParameterValue - */ - IntentParameterValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue(); - if (object.originalValue != null) - message.originalValue = String(object.originalValue); - if (object.resolvedValue != null) { - if (typeof object.resolvedValue !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue.resolvedValue: object expected"); - message.resolvedValue = $root.google.protobuf.Value.fromObject(object.resolvedValue); - } - return message; - }; - - /** - * Creates a plain object from an IntentParameterValue message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue - * @static - * @param {google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue} message IntentParameterValue - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - IntentParameterValue.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.originalValue = ""; - object.resolvedValue = null; - } - if (message.originalValue != null && message.hasOwnProperty("originalValue")) - object.originalValue = message.originalValue; - if (message.resolvedValue != null && message.hasOwnProperty("resolvedValue")) - object.resolvedValue = $root.google.protobuf.Value.toObject(message.resolvedValue, options); - return object; - }; - - /** - * Converts this IntentParameterValue to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue - * @instance - * @returns {Object.} JSON object - */ - IntentParameterValue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return IntentParameterValue; - })(); - - return IntentInfo; - })(); - - return WebhookRequest; - })(); - - v3.WebhookResponse = (function() { - - /** - * Properties of a WebhookResponse. - * @memberof google.cloud.dialogflow.cx.v3 - * @interface IWebhookResponse - * @property {google.cloud.dialogflow.cx.v3.WebhookResponse.IFulfillmentResponse|null} [fulfillmentResponse] WebhookResponse fulfillmentResponse - * @property {google.cloud.dialogflow.cx.v3.IPageInfo|null} [pageInfo] WebhookResponse pageInfo - * @property {google.cloud.dialogflow.cx.v3.ISessionInfo|null} [sessionInfo] WebhookResponse sessionInfo - * @property {google.protobuf.IStruct|null} [payload] WebhookResponse payload - * @property {string|null} [targetPage] WebhookResponse targetPage - * @property {string|null} [targetFlow] WebhookResponse targetFlow - */ - - /** - * Constructs a new WebhookResponse. - * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a WebhookResponse. - * @implements IWebhookResponse - * @constructor - * @param {google.cloud.dialogflow.cx.v3.IWebhookResponse=} [properties] Properties to set - */ - function WebhookResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * WebhookResponse fulfillmentResponse. - * @member {google.cloud.dialogflow.cx.v3.WebhookResponse.IFulfillmentResponse|null|undefined} fulfillmentResponse - * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse - * @instance - */ - WebhookResponse.prototype.fulfillmentResponse = null; - - /** - * WebhookResponse pageInfo. - * @member {google.cloud.dialogflow.cx.v3.IPageInfo|null|undefined} pageInfo - * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse - * @instance - */ - WebhookResponse.prototype.pageInfo = null; - - /** - * WebhookResponse sessionInfo. - * @member {google.cloud.dialogflow.cx.v3.ISessionInfo|null|undefined} sessionInfo - * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse - * @instance - */ - WebhookResponse.prototype.sessionInfo = null; - - /** - * WebhookResponse payload. - * @member {google.protobuf.IStruct|null|undefined} payload - * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse - * @instance - */ - WebhookResponse.prototype.payload = null; - - /** - * WebhookResponse targetPage. - * @member {string} targetPage - * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse - * @instance - */ - WebhookResponse.prototype.targetPage = ""; + /** + * ListVersionsRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3.ListVersionsRequest + * @instance + */ + ListVersionsRequest.prototype.parent = ""; /** - * WebhookResponse targetFlow. - * @member {string} targetFlow - * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse + * ListVersionsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dialogflow.cx.v3.ListVersionsRequest * @instance */ - WebhookResponse.prototype.targetFlow = ""; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + ListVersionsRequest.prototype.pageSize = 0; /** - * WebhookResponse transition. - * @member {"targetPage"|"targetFlow"|undefined} transition - * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse + * ListVersionsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dialogflow.cx.v3.ListVersionsRequest * @instance */ - Object.defineProperty(WebhookResponse.prototype, "transition", { - get: $util.oneOfGetter($oneOfFields = ["targetPage", "targetFlow"]), - set: $util.oneOfSetter($oneOfFields) - }); + ListVersionsRequest.prototype.pageToken = ""; /** - * Creates a new WebhookResponse instance using the specified properties. + * Creates a new ListVersionsRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse + * @memberof google.cloud.dialogflow.cx.v3.ListVersionsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IWebhookResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.WebhookResponse} WebhookResponse instance + * @param {google.cloud.dialogflow.cx.v3.IListVersionsRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ListVersionsRequest} ListVersionsRequest instance */ - WebhookResponse.create = function create(properties) { - return new WebhookResponse(properties); + ListVersionsRequest.create = function create(properties) { + return new ListVersionsRequest(properties); }; /** - * Encodes the specified WebhookResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.WebhookResponse.verify|verify} messages. + * Encodes the specified ListVersionsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListVersionsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse + * @memberof google.cloud.dialogflow.cx.v3.ListVersionsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IWebhookResponse} message WebhookResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListVersionsRequest} message ListVersionsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - WebhookResponse.encode = function encode(message, writer) { + ListVersionsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.fulfillmentResponse != null && Object.hasOwnProperty.call(message, "fulfillmentResponse")) - $root.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.encode(message.fulfillmentResponse, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.pageInfo != null && Object.hasOwnProperty.call(message, "pageInfo")) - $root.google.cloud.dialogflow.cx.v3.PageInfo.encode(message.pageInfo, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.sessionInfo != null && Object.hasOwnProperty.call(message, "sessionInfo")) - $root.google.cloud.dialogflow.cx.v3.SessionInfo.encode(message.sessionInfo, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.payload != null && Object.hasOwnProperty.call(message, "payload")) - $root.google.protobuf.Struct.encode(message.payload, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.targetPage != null && Object.hasOwnProperty.call(message, "targetPage")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.targetPage); - if (message.targetFlow != null && Object.hasOwnProperty.call(message, "targetFlow")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.targetFlow); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); return writer; }; /** - * Encodes the specified WebhookResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.WebhookResponse.verify|verify} messages. + * Encodes the specified ListVersionsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListVersionsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse + * @memberof google.cloud.dialogflow.cx.v3.ListVersionsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IWebhookResponse} message WebhookResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListVersionsRequest} message ListVersionsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - WebhookResponse.encodeDelimited = function encodeDelimited(message, writer) { + ListVersionsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a WebhookResponse message from the specified reader or buffer. + * Decodes a ListVersionsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse + * @memberof google.cloud.dialogflow.cx.v3.ListVersionsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.WebhookResponse} WebhookResponse + * @returns {google.cloud.dialogflow.cx.v3.ListVersionsRequest} ListVersionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - WebhookResponse.decode = function decode(reader, length) { + ListVersionsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.WebhookResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ListVersionsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.fulfillmentResponse = $root.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.decode(reader, reader.uint32()); + message.parent = reader.string(); break; case 2: - message.pageInfo = $root.google.cloud.dialogflow.cx.v3.PageInfo.decode(reader, reader.uint32()); + message.pageSize = reader.int32(); break; case 3: - message.sessionInfo = $root.google.cloud.dialogflow.cx.v3.SessionInfo.decode(reader, reader.uint32()); - break; - case 4: - message.payload = $root.google.protobuf.Struct.decode(reader, reader.uint32()); - break; - case 5: - message.targetPage = reader.string(); - break; - case 6: - message.targetFlow = reader.string(); + message.pageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -38020,445 +37836,126 @@ }; /** - * Decodes a WebhookResponse message from the specified reader or buffer, length delimited. + * Decodes a ListVersionsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse + * @memberof google.cloud.dialogflow.cx.v3.ListVersionsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.WebhookResponse} WebhookResponse + * @returns {google.cloud.dialogflow.cx.v3.ListVersionsRequest} ListVersionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - WebhookResponse.decodeDelimited = function decodeDelimited(reader) { + ListVersionsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a WebhookResponse message. + * Verifies a ListVersionsRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse + * @memberof google.cloud.dialogflow.cx.v3.ListVersionsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - WebhookResponse.verify = function verify(message) { + ListVersionsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.fulfillmentResponse != null && message.hasOwnProperty("fulfillmentResponse")) { - var error = $root.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.verify(message.fulfillmentResponse); - if (error) - return "fulfillmentResponse." + error; - } - if (message.pageInfo != null && message.hasOwnProperty("pageInfo")) { - var error = $root.google.cloud.dialogflow.cx.v3.PageInfo.verify(message.pageInfo); - if (error) - return "pageInfo." + error; - } - if (message.sessionInfo != null && message.hasOwnProperty("sessionInfo")) { - var error = $root.google.cloud.dialogflow.cx.v3.SessionInfo.verify(message.sessionInfo); - if (error) - return "sessionInfo." + error; - } - if (message.payload != null && message.hasOwnProperty("payload")) { - var error = $root.google.protobuf.Struct.verify(message.payload); - if (error) - return "payload." + error; - } - if (message.targetPage != null && message.hasOwnProperty("targetPage")) { - properties.transition = 1; - if (!$util.isString(message.targetPage)) - return "targetPage: string expected"; - } - if (message.targetFlow != null && message.hasOwnProperty("targetFlow")) { - if (properties.transition === 1) - return "transition: multiple values"; - properties.transition = 1; - if (!$util.isString(message.targetFlow)) - return "targetFlow: string expected"; - } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; return null; }; /** - * Creates a WebhookResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListVersionsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse + * @memberof google.cloud.dialogflow.cx.v3.ListVersionsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.WebhookResponse} WebhookResponse + * @returns {google.cloud.dialogflow.cx.v3.ListVersionsRequest} ListVersionsRequest */ - WebhookResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.WebhookResponse) + ListVersionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListVersionsRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.WebhookResponse(); - if (object.fulfillmentResponse != null) { - if (typeof object.fulfillmentResponse !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.WebhookResponse.fulfillmentResponse: object expected"); - message.fulfillmentResponse = $root.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.fromObject(object.fulfillmentResponse); - } - if (object.pageInfo != null) { - if (typeof object.pageInfo !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.WebhookResponse.pageInfo: object expected"); - message.pageInfo = $root.google.cloud.dialogflow.cx.v3.PageInfo.fromObject(object.pageInfo); - } - if (object.sessionInfo != null) { - if (typeof object.sessionInfo !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.WebhookResponse.sessionInfo: object expected"); - message.sessionInfo = $root.google.cloud.dialogflow.cx.v3.SessionInfo.fromObject(object.sessionInfo); - } - if (object.payload != null) { - if (typeof object.payload !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.WebhookResponse.payload: object expected"); - message.payload = $root.google.protobuf.Struct.fromObject(object.payload); - } - if (object.targetPage != null) - message.targetPage = String(object.targetPage); - if (object.targetFlow != null) - message.targetFlow = String(object.targetFlow); + var message = new $root.google.cloud.dialogflow.cx.v3.ListVersionsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); return message; }; /** - * Creates a plain object from a WebhookResponse message. Also converts values to other types if specified. + * Creates a plain object from a ListVersionsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse + * @memberof google.cloud.dialogflow.cx.v3.ListVersionsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.WebhookResponse} message WebhookResponse + * @param {google.cloud.dialogflow.cx.v3.ListVersionsRequest} message ListVersionsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - WebhookResponse.toObject = function toObject(message, options) { + ListVersionsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.fulfillmentResponse = null; - object.pageInfo = null; - object.sessionInfo = null; - object.payload = null; - } - if (message.fulfillmentResponse != null && message.hasOwnProperty("fulfillmentResponse")) - object.fulfillmentResponse = $root.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.toObject(message.fulfillmentResponse, options); - if (message.pageInfo != null && message.hasOwnProperty("pageInfo")) - object.pageInfo = $root.google.cloud.dialogflow.cx.v3.PageInfo.toObject(message.pageInfo, options); - if (message.sessionInfo != null && message.hasOwnProperty("sessionInfo")) - object.sessionInfo = $root.google.cloud.dialogflow.cx.v3.SessionInfo.toObject(message.sessionInfo, options); - if (message.payload != null && message.hasOwnProperty("payload")) - object.payload = $root.google.protobuf.Struct.toObject(message.payload, options); - if (message.targetPage != null && message.hasOwnProperty("targetPage")) { - object.targetPage = message.targetPage; - if (options.oneofs) - object.transition = "targetPage"; - } - if (message.targetFlow != null && message.hasOwnProperty("targetFlow")) { - object.targetFlow = message.targetFlow; - if (options.oneofs) - object.transition = "targetFlow"; + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; return object; }; /** - * Converts this WebhookResponse to JSON. + * Converts this ListVersionsRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse + * @memberof google.cloud.dialogflow.cx.v3.ListVersionsRequest * @instance * @returns {Object.} JSON object */ - WebhookResponse.prototype.toJSON = function toJSON() { + ListVersionsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - WebhookResponse.FulfillmentResponse = (function() { - - /** - * Properties of a FulfillmentResponse. - * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse - * @interface IFulfillmentResponse - * @property {Array.|null} [messages] FulfillmentResponse messages - * @property {google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.MergeBehavior|null} [mergeBehavior] FulfillmentResponse mergeBehavior - */ - - /** - * Constructs a new FulfillmentResponse. - * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse - * @classdesc Represents a FulfillmentResponse. - * @implements IFulfillmentResponse - * @constructor - * @param {google.cloud.dialogflow.cx.v3.WebhookResponse.IFulfillmentResponse=} [properties] Properties to set - */ - function FulfillmentResponse(properties) { - this.messages = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FulfillmentResponse messages. - * @member {Array.} messages - * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse - * @instance - */ - FulfillmentResponse.prototype.messages = $util.emptyArray; - - /** - * FulfillmentResponse mergeBehavior. - * @member {google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.MergeBehavior} mergeBehavior - * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse - * @instance - */ - FulfillmentResponse.prototype.mergeBehavior = 0; - - /** - * Creates a new FulfillmentResponse instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse - * @static - * @param {google.cloud.dialogflow.cx.v3.WebhookResponse.IFulfillmentResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse} FulfillmentResponse instance - */ - FulfillmentResponse.create = function create(properties) { - return new FulfillmentResponse(properties); - }; - - /** - * Encodes the specified FulfillmentResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse - * @static - * @param {google.cloud.dialogflow.cx.v3.WebhookResponse.IFulfillmentResponse} message FulfillmentResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FulfillmentResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.messages != null && message.messages.length) - for (var i = 0; i < message.messages.length; ++i) - $root.google.cloud.dialogflow.cx.v3.ResponseMessage.encode(message.messages[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.mergeBehavior != null && Object.hasOwnProperty.call(message, "mergeBehavior")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.mergeBehavior); - return writer; - }; - - /** - * Encodes the specified FulfillmentResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse - * @static - * @param {google.cloud.dialogflow.cx.v3.WebhookResponse.IFulfillmentResponse} message FulfillmentResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FulfillmentResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FulfillmentResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse} FulfillmentResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FulfillmentResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.messages && message.messages.length)) - message.messages = []; - message.messages.push($root.google.cloud.dialogflow.cx.v3.ResponseMessage.decode(reader, reader.uint32())); - break; - case 2: - message.mergeBehavior = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FulfillmentResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse} FulfillmentResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FulfillmentResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FulfillmentResponse message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FulfillmentResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.messages != null && message.hasOwnProperty("messages")) { - if (!Array.isArray(message.messages)) - return "messages: array expected"; - for (var i = 0; i < message.messages.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.verify(message.messages[i]); - if (error) - return "messages." + error; - } - } - if (message.mergeBehavior != null && message.hasOwnProperty("mergeBehavior")) - switch (message.mergeBehavior) { - default: - return "mergeBehavior: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a FulfillmentResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse} FulfillmentResponse - */ - FulfillmentResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse(); - if (object.messages) { - if (!Array.isArray(object.messages)) - throw TypeError(".google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.messages: array expected"); - message.messages = []; - for (var i = 0; i < object.messages.length; ++i) { - if (typeof object.messages[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.messages: object expected"); - message.messages[i] = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.fromObject(object.messages[i]); - } - } - switch (object.mergeBehavior) { - case "MERGE_BEHAVIOR_UNSPECIFIED": - case 0: - message.mergeBehavior = 0; - break; - case "APPEND": - case 1: - message.mergeBehavior = 1; - break; - case "REPLACE": - case 2: - message.mergeBehavior = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a FulfillmentResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse - * @static - * @param {google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse} message FulfillmentResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FulfillmentResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.messages = []; - if (options.defaults) - object.mergeBehavior = options.enums === String ? "MERGE_BEHAVIOR_UNSPECIFIED" : 0; - if (message.messages && message.messages.length) { - object.messages = []; - for (var j = 0; j < message.messages.length; ++j) - object.messages[j] = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.toObject(message.messages[j], options); - } - if (message.mergeBehavior != null && message.hasOwnProperty("mergeBehavior")) - object.mergeBehavior = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.MergeBehavior[message.mergeBehavior] : message.mergeBehavior; - return object; - }; - - /** - * Converts this FulfillmentResponse to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse - * @instance - * @returns {Object.} JSON object - */ - FulfillmentResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * MergeBehavior enum. - * @name google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.MergeBehavior - * @enum {number} - * @property {number} MERGE_BEHAVIOR_UNSPECIFIED=0 MERGE_BEHAVIOR_UNSPECIFIED value - * @property {number} APPEND=1 APPEND value - * @property {number} REPLACE=2 REPLACE value - */ - FulfillmentResponse.MergeBehavior = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MERGE_BEHAVIOR_UNSPECIFIED"] = 0; - values[valuesById[1] = "APPEND"] = 1; - values[valuesById[2] = "REPLACE"] = 2; - return values; - })(); - - return FulfillmentResponse; - })(); - - return WebhookResponse; + return ListVersionsRequest; })(); - v3.PageInfo = (function() { + v3.ListVersionsResponse = (function() { /** - * Properties of a PageInfo. + * Properties of a ListVersionsResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IPageInfo - * @property {string|null} [currentPage] PageInfo currentPage - * @property {google.cloud.dialogflow.cx.v3.PageInfo.IFormInfo|null} [formInfo] PageInfo formInfo + * @interface IListVersionsResponse + * @property {Array.|null} [versions] ListVersionsResponse versions + * @property {string|null} [nextPageToken] ListVersionsResponse nextPageToken */ /** - * Constructs a new PageInfo. + * Constructs a new ListVersionsResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a PageInfo. - * @implements IPageInfo + * @classdesc Represents a ListVersionsResponse. + * @implements IListVersionsResponse * @constructor - * @param {google.cloud.dialogflow.cx.v3.IPageInfo=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IListVersionsResponse=} [properties] Properties to set */ - function PageInfo(properties) { + function ListVersionsResponse(properties) { + this.versions = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -38466,88 +37963,91 @@ } /** - * PageInfo currentPage. - * @member {string} currentPage - * @memberof google.cloud.dialogflow.cx.v3.PageInfo + * ListVersionsResponse versions. + * @member {Array.} versions + * @memberof google.cloud.dialogflow.cx.v3.ListVersionsResponse * @instance */ - PageInfo.prototype.currentPage = ""; + ListVersionsResponse.prototype.versions = $util.emptyArray; /** - * PageInfo formInfo. - * @member {google.cloud.dialogflow.cx.v3.PageInfo.IFormInfo|null|undefined} formInfo - * @memberof google.cloud.dialogflow.cx.v3.PageInfo + * ListVersionsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dialogflow.cx.v3.ListVersionsResponse * @instance */ - PageInfo.prototype.formInfo = null; + ListVersionsResponse.prototype.nextPageToken = ""; /** - * Creates a new PageInfo instance using the specified properties. + * Creates a new ListVersionsResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.PageInfo + * @memberof google.cloud.dialogflow.cx.v3.ListVersionsResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IPageInfo=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.PageInfo} PageInfo instance + * @param {google.cloud.dialogflow.cx.v3.IListVersionsResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ListVersionsResponse} ListVersionsResponse instance */ - PageInfo.create = function create(properties) { - return new PageInfo(properties); + ListVersionsResponse.create = function create(properties) { + return new ListVersionsResponse(properties); }; /** - * Encodes the specified PageInfo message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.PageInfo.verify|verify} messages. + * Encodes the specified ListVersionsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListVersionsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.PageInfo + * @memberof google.cloud.dialogflow.cx.v3.ListVersionsResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IPageInfo} message PageInfo message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListVersionsResponse} message ListVersionsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PageInfo.encode = function encode(message, writer) { + ListVersionsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.currentPage != null && Object.hasOwnProperty.call(message, "currentPage")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.currentPage); - if (message.formInfo != null && Object.hasOwnProperty.call(message, "formInfo")) - $root.google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.encode(message.formInfo, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.versions != null && message.versions.length) + for (var i = 0; i < message.versions.length; ++i) + $root.google.cloud.dialogflow.cx.v3.Version.encode(message.versions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified PageInfo message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.PageInfo.verify|verify} messages. + * Encodes the specified ListVersionsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListVersionsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.PageInfo + * @memberof google.cloud.dialogflow.cx.v3.ListVersionsResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IPageInfo} message PageInfo message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListVersionsResponse} message ListVersionsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PageInfo.encodeDelimited = function encodeDelimited(message, writer) { + ListVersionsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PageInfo message from the specified reader or buffer. + * Decodes a ListVersionsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.PageInfo + * @memberof google.cloud.dialogflow.cx.v3.ListVersionsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.PageInfo} PageInfo + * @returns {google.cloud.dialogflow.cx.v3.ListVersionsResponse} ListVersionsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PageInfo.decode = function decode(reader, length) { + ListVersionsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.PageInfo(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ListVersionsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.currentPage = reader.string(); + if (!(message.versions && message.versions.length)) + message.versions = []; + message.versions.push($root.google.cloud.dialogflow.cx.v3.Version.decode(reader, reader.uint32())); break; - case 3: - message.formInfo = $root.google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.decode(reader, reader.uint32()); + case 2: + message.nextPageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -38558,653 +38058,536 @@ }; /** - * Decodes a PageInfo message from the specified reader or buffer, length delimited. + * Decodes a ListVersionsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.PageInfo + * @memberof google.cloud.dialogflow.cx.v3.ListVersionsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.PageInfo} PageInfo + * @returns {google.cloud.dialogflow.cx.v3.ListVersionsResponse} ListVersionsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PageInfo.decodeDelimited = function decodeDelimited(reader) { + ListVersionsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PageInfo message. + * Verifies a ListVersionsResponse message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.PageInfo + * @memberof google.cloud.dialogflow.cx.v3.ListVersionsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PageInfo.verify = function verify(message) { + ListVersionsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.currentPage != null && message.hasOwnProperty("currentPage")) - if (!$util.isString(message.currentPage)) - return "currentPage: string expected"; - if (message.formInfo != null && message.hasOwnProperty("formInfo")) { - var error = $root.google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.verify(message.formInfo); - if (error) - return "formInfo." + error; + if (message.versions != null && message.hasOwnProperty("versions")) { + if (!Array.isArray(message.versions)) + return "versions: array expected"; + for (var i = 0; i < message.versions.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.Version.verify(message.versions[i]); + if (error) + return "versions." + error; + } } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a PageInfo message from a plain object. Also converts values to their respective internal types. + * Creates a ListVersionsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.PageInfo + * @memberof google.cloud.dialogflow.cx.v3.ListVersionsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.PageInfo} PageInfo + * @returns {google.cloud.dialogflow.cx.v3.ListVersionsResponse} ListVersionsResponse */ - PageInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.PageInfo) + ListVersionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListVersionsResponse) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.PageInfo(); - if (object.currentPage != null) - message.currentPage = String(object.currentPage); - if (object.formInfo != null) { - if (typeof object.formInfo !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.PageInfo.formInfo: object expected"); - message.formInfo = $root.google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.fromObject(object.formInfo); + var message = new $root.google.cloud.dialogflow.cx.v3.ListVersionsResponse(); + if (object.versions) { + if (!Array.isArray(object.versions)) + throw TypeError(".google.cloud.dialogflow.cx.v3.ListVersionsResponse.versions: array expected"); + message.versions = []; + for (var i = 0; i < object.versions.length; ++i) { + if (typeof object.versions[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.ListVersionsResponse.versions: object expected"); + message.versions[i] = $root.google.cloud.dialogflow.cx.v3.Version.fromObject(object.versions[i]); + } } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a PageInfo message. Also converts values to other types if specified. + * Creates a plain object from a ListVersionsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.PageInfo + * @memberof google.cloud.dialogflow.cx.v3.ListVersionsResponse * @static - * @param {google.cloud.dialogflow.cx.v3.PageInfo} message PageInfo + * @param {google.cloud.dialogflow.cx.v3.ListVersionsResponse} message ListVersionsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PageInfo.toObject = function toObject(message, options) { + ListVersionsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.currentPage = ""; - object.formInfo = null; + if (options.arrays || options.defaults) + object.versions = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.versions && message.versions.length) { + object.versions = []; + for (var j = 0; j < message.versions.length; ++j) + object.versions[j] = $root.google.cloud.dialogflow.cx.v3.Version.toObject(message.versions[j], options); } - if (message.currentPage != null && message.hasOwnProperty("currentPage")) - object.currentPage = message.currentPage; - if (message.formInfo != null && message.hasOwnProperty("formInfo")) - object.formInfo = $root.google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.toObject(message.formInfo, options); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this PageInfo to JSON. + * Converts this ListVersionsResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.PageInfo + * @memberof google.cloud.dialogflow.cx.v3.ListVersionsResponse * @instance * @returns {Object.} JSON object */ - PageInfo.prototype.toJSON = function toJSON() { + ListVersionsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - PageInfo.FormInfo = (function() { - - /** - * Properties of a FormInfo. - * @memberof google.cloud.dialogflow.cx.v3.PageInfo - * @interface IFormInfo - * @property {Array.|null} [parameterInfo] FormInfo parameterInfo - */ + return ListVersionsResponse; + })(); - /** - * Constructs a new FormInfo. - * @memberof google.cloud.dialogflow.cx.v3.PageInfo - * @classdesc Represents a FormInfo. - * @implements IFormInfo - * @constructor - * @param {google.cloud.dialogflow.cx.v3.PageInfo.IFormInfo=} [properties] Properties to set - */ - function FormInfo(properties) { - this.parameterInfo = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + v3.GetVersionRequest = (function() { - /** - * FormInfo parameterInfo. - * @member {Array.} parameterInfo - * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo - * @instance - */ - FormInfo.prototype.parameterInfo = $util.emptyArray; + /** + * Properties of a GetVersionRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IGetVersionRequest + * @property {string|null} [name] GetVersionRequest name + */ - /** - * Creates a new FormInfo instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo - * @static - * @param {google.cloud.dialogflow.cx.v3.PageInfo.IFormInfo=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.PageInfo.FormInfo} FormInfo instance - */ - FormInfo.create = function create(properties) { - return new FormInfo(properties); - }; + /** + * Constructs a new GetVersionRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a GetVersionRequest. + * @implements IGetVersionRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IGetVersionRequest=} [properties] Properties to set + */ + function GetVersionRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Encodes the specified FormInfo message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo - * @static - * @param {google.cloud.dialogflow.cx.v3.PageInfo.IFormInfo} message FormInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FormInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parameterInfo != null && message.parameterInfo.length) - for (var i = 0; i < message.parameterInfo.length; ++i) - $root.google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.encode(message.parameterInfo[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; + /** + * GetVersionRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.GetVersionRequest + * @instance + */ + GetVersionRequest.prototype.name = ""; - /** - * Encodes the specified FormInfo message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo - * @static - * @param {google.cloud.dialogflow.cx.v3.PageInfo.IFormInfo} message FormInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FormInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a new GetVersionRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.GetVersionRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IGetVersionRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.GetVersionRequest} GetVersionRequest instance + */ + GetVersionRequest.create = function create(properties) { + return new GetVersionRequest(properties); + }; - /** - * Decodes a FormInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.PageInfo.FormInfo} FormInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FormInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.PageInfo.FormInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - if (!(message.parameterInfo && message.parameterInfo.length)) - message.parameterInfo = []; - message.parameterInfo.push($root.google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Encodes the specified GetVersionRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetVersionRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.GetVersionRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IGetVersionRequest} message GetVersionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetVersionRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; - /** - * Decodes a FormInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.PageInfo.FormInfo} FormInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FormInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Encodes the specified GetVersionRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetVersionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.GetVersionRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IGetVersionRequest} message GetVersionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetVersionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Verifies a FormInfo message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FormInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parameterInfo != null && message.hasOwnProperty("parameterInfo")) { - if (!Array.isArray(message.parameterInfo)) - return "parameterInfo: array expected"; - for (var i = 0; i < message.parameterInfo.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.verify(message.parameterInfo[i]); - if (error) - return "parameterInfo." + error; - } + /** + * Decodes a GetVersionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.GetVersionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3.GetVersionRequest} GetVersionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetVersionRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.GetVersionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } - return null; - }; + } + return message; + }; - /** - * Creates a FormInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.PageInfo.FormInfo} FormInfo - */ - FormInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.PageInfo.FormInfo) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.PageInfo.FormInfo(); - if (object.parameterInfo) { - if (!Array.isArray(object.parameterInfo)) - throw TypeError(".google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.parameterInfo: array expected"); - message.parameterInfo = []; - for (var i = 0; i < object.parameterInfo.length; ++i) { - if (typeof object.parameterInfo[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.parameterInfo: object expected"); - message.parameterInfo[i] = $root.google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.fromObject(object.parameterInfo[i]); - } - } - return message; - }; + /** + * Decodes a GetVersionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.GetVersionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.GetVersionRequest} GetVersionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetVersionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a plain object from a FormInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo - * @static - * @param {google.cloud.dialogflow.cx.v3.PageInfo.FormInfo} message FormInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FormInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.parameterInfo = []; - if (message.parameterInfo && message.parameterInfo.length) { - object.parameterInfo = []; - for (var j = 0; j < message.parameterInfo.length; ++j) - object.parameterInfo[j] = $root.google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.toObject(message.parameterInfo[j], options); - } + /** + * Verifies a GetVersionRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.GetVersionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetVersionRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetVersionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.GetVersionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.GetVersionRequest} GetVersionRequest + */ + GetVersionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.GetVersionRequest) return object; - }; + var message = new $root.google.cloud.dialogflow.cx.v3.GetVersionRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; - /** - * Converts this FormInfo to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo - * @instance - * @returns {Object.} JSON object - */ - FormInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a GetVersionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.GetVersionRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.GetVersionRequest} message GetVersionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetVersionRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; - FormInfo.ParameterInfo = (function() { + /** + * Converts this GetVersionRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.GetVersionRequest + * @instance + * @returns {Object.} JSON object + */ + GetVersionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Properties of a ParameterInfo. - * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo - * @interface IParameterInfo - * @property {string|null} [displayName] ParameterInfo displayName - * @property {boolean|null} [required] ParameterInfo required - * @property {google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.ParameterState|null} [state] ParameterInfo state - * @property {google.protobuf.IValue|null} [value] ParameterInfo value - * @property {boolean|null} [justCollected] ParameterInfo justCollected - */ + return GetVersionRequest; + })(); - /** - * Constructs a new ParameterInfo. - * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo - * @classdesc Represents a ParameterInfo. - * @implements IParameterInfo - * @constructor - * @param {google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.IParameterInfo=} [properties] Properties to set - */ - function ParameterInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + v3.CreateVersionRequest = (function() { - /** - * ParameterInfo displayName. - * @member {string} displayName - * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo - * @instance - */ - ParameterInfo.prototype.displayName = ""; + /** + * Properties of a CreateVersionRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface ICreateVersionRequest + * @property {string|null} [parent] CreateVersionRequest parent + * @property {google.cloud.dialogflow.cx.v3.IVersion|null} [version] CreateVersionRequest version + */ - /** - * ParameterInfo required. - * @member {boolean} required - * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo - * @instance - */ - ParameterInfo.prototype.required = false; + /** + * Constructs a new CreateVersionRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a CreateVersionRequest. + * @implements ICreateVersionRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3.ICreateVersionRequest=} [properties] Properties to set + */ + function CreateVersionRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * ParameterInfo state. - * @member {google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.ParameterState} state - * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo - * @instance - */ - ParameterInfo.prototype.state = 0; + /** + * CreateVersionRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3.CreateVersionRequest + * @instance + */ + CreateVersionRequest.prototype.parent = ""; - /** - * ParameterInfo value. - * @member {google.protobuf.IValue|null|undefined} value - * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo - * @instance - */ - ParameterInfo.prototype.value = null; + /** + * CreateVersionRequest version. + * @member {google.cloud.dialogflow.cx.v3.IVersion|null|undefined} version + * @memberof google.cloud.dialogflow.cx.v3.CreateVersionRequest + * @instance + */ + CreateVersionRequest.prototype.version = null; - /** - * ParameterInfo justCollected. - * @member {boolean} justCollected - * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo - * @instance - */ - ParameterInfo.prototype.justCollected = false; + /** + * Creates a new CreateVersionRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.CreateVersionRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.ICreateVersionRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.CreateVersionRequest} CreateVersionRequest instance + */ + CreateVersionRequest.create = function create(properties) { + return new CreateVersionRequest(properties); + }; - /** - * Creates a new ParameterInfo instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo - * @static - * @param {google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.IParameterInfo=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo} ParameterInfo instance - */ - ParameterInfo.create = function create(properties) { - return new ParameterInfo(properties); - }; + /** + * Encodes the specified CreateVersionRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateVersionRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.CreateVersionRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.ICreateVersionRequest} message CreateVersionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateVersionRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + $root.google.cloud.dialogflow.cx.v3.Version.encode(message.version, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; - /** - * Encodes the specified ParameterInfo message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo - * @static - * @param {google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.IParameterInfo} message ParameterInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ParameterInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.required != null && Object.hasOwnProperty.call(message, "required")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.required); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - $root.google.protobuf.Value.encode(message.value, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.justCollected != null && Object.hasOwnProperty.call(message, "justCollected")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.justCollected); - return writer; - }; - - /** - * Encodes the specified ParameterInfo message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo - * @static - * @param {google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.IParameterInfo} message ParameterInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ParameterInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ParameterInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo} ParameterInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ParameterInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.displayName = reader.string(); - break; - case 2: - message.required = reader.bool(); - break; - case 3: - message.state = reader.int32(); - break; - case 4: - message.value = $root.google.protobuf.Value.decode(reader, reader.uint32()); - break; - case 5: - message.justCollected = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ParameterInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo} ParameterInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ParameterInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ParameterInfo message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ParameterInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.required != null && message.hasOwnProperty("required")) - if (typeof message.required !== "boolean") - return "required: boolean expected"; - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.value != null && message.hasOwnProperty("value")) { - var error = $root.google.protobuf.Value.verify(message.value); - if (error) - return "value." + error; - } - if (message.justCollected != null && message.hasOwnProperty("justCollected")) - if (typeof message.justCollected !== "boolean") - return "justCollected: boolean expected"; - return null; - }; + /** + * Encodes the specified CreateVersionRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateVersionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.CreateVersionRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.ICreateVersionRequest} message CreateVersionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateVersionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a ParameterInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo} ParameterInfo - */ - ParameterInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.required != null) - message.required = Boolean(object.required); - switch (object.state) { - case "PARAMETER_STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "EMPTY": - case 1: - message.state = 1; - break; - case "INVALID": - case 2: - message.state = 2; - break; - case "FILLED": - case 3: - message.state = 3; - break; - } - if (object.value != null) { - if (typeof object.value !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.value: object expected"); - message.value = $root.google.protobuf.Value.fromObject(object.value); - } - if (object.justCollected != null) - message.justCollected = Boolean(object.justCollected); - return message; - }; + /** + * Decodes a CreateVersionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.CreateVersionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3.CreateVersionRequest} CreateVersionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateVersionRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.CreateVersionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.version = $root.google.cloud.dialogflow.cx.v3.Version.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Creates a plain object from a ParameterInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo - * @static - * @param {google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo} message ParameterInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ParameterInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.displayName = ""; - object.required = false; - object.state = options.enums === String ? "PARAMETER_STATE_UNSPECIFIED" : 0; - object.value = null; - object.justCollected = false; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.required != null && message.hasOwnProperty("required")) - object.required = message.required; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.ParameterState[message.state] : message.state; - if (message.value != null && message.hasOwnProperty("value")) - object.value = $root.google.protobuf.Value.toObject(message.value, options); - if (message.justCollected != null && message.hasOwnProperty("justCollected")) - object.justCollected = message.justCollected; - return object; - }; + /** + * Decodes a CreateVersionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.CreateVersionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.CreateVersionRequest} CreateVersionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateVersionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Converts this ParameterInfo to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo - * @instance - * @returns {Object.} JSON object - */ - ParameterInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Verifies a CreateVersionRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.CreateVersionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateVersionRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.version != null && message.hasOwnProperty("version")) { + var error = $root.google.cloud.dialogflow.cx.v3.Version.verify(message.version); + if (error) + return "version." + error; + } + return null; + }; - /** - * ParameterState enum. - * @name google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.ParameterState - * @enum {number} - * @property {number} PARAMETER_STATE_UNSPECIFIED=0 PARAMETER_STATE_UNSPECIFIED value - * @property {number} EMPTY=1 EMPTY value - * @property {number} INVALID=2 INVALID value - * @property {number} FILLED=3 FILLED value - */ - ParameterInfo.ParameterState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PARAMETER_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "EMPTY"] = 1; - values[valuesById[2] = "INVALID"] = 2; - values[valuesById[3] = "FILLED"] = 3; - return values; - })(); + /** + * Creates a CreateVersionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.CreateVersionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.CreateVersionRequest} CreateVersionRequest + */ + CreateVersionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.CreateVersionRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.CreateVersionRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.version != null) { + if (typeof object.version !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.CreateVersionRequest.version: object expected"); + message.version = $root.google.cloud.dialogflow.cx.v3.Version.fromObject(object.version); + } + return message; + }; - return ParameterInfo; - })(); + /** + * Creates a plain object from a CreateVersionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.CreateVersionRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.CreateVersionRequest} message CreateVersionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateVersionRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.version = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.version != null && message.hasOwnProperty("version")) + object.version = $root.google.cloud.dialogflow.cx.v3.Version.toObject(message.version, options); + return object; + }; - return FormInfo; - })(); + /** + * Converts this CreateVersionRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.CreateVersionRequest + * @instance + * @returns {Object.} JSON object + */ + CreateVersionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return PageInfo; + return CreateVersionRequest; })(); - v3.SessionInfo = (function() { + v3.UpdateVersionRequest = (function() { /** - * Properties of a SessionInfo. + * Properties of an UpdateVersionRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface ISessionInfo - * @property {string|null} [session] SessionInfo session - * @property {Object.|null} [parameters] SessionInfo parameters + * @interface IUpdateVersionRequest + * @property {google.cloud.dialogflow.cx.v3.IVersion|null} [version] UpdateVersionRequest version + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateVersionRequest updateMask */ /** - * Constructs a new SessionInfo. + * Constructs a new UpdateVersionRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a SessionInfo. - * @implements ISessionInfo + * @classdesc Represents an UpdateVersionRequest. + * @implements IUpdateVersionRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.ISessionInfo=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IUpdateVersionRequest=} [properties] Properties to set */ - function SessionInfo(properties) { - this.parameters = {}; + function UpdateVersionRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -39212,110 +38595,88 @@ } /** - * SessionInfo session. - * @member {string} session - * @memberof google.cloud.dialogflow.cx.v3.SessionInfo + * UpdateVersionRequest version. + * @member {google.cloud.dialogflow.cx.v3.IVersion|null|undefined} version + * @memberof google.cloud.dialogflow.cx.v3.UpdateVersionRequest * @instance */ - SessionInfo.prototype.session = ""; + UpdateVersionRequest.prototype.version = null; /** - * SessionInfo parameters. - * @member {Object.} parameters - * @memberof google.cloud.dialogflow.cx.v3.SessionInfo + * UpdateVersionRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dialogflow.cx.v3.UpdateVersionRequest * @instance */ - SessionInfo.prototype.parameters = $util.emptyObject; + UpdateVersionRequest.prototype.updateMask = null; /** - * Creates a new SessionInfo instance using the specified properties. + * Creates a new UpdateVersionRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.SessionInfo + * @memberof google.cloud.dialogflow.cx.v3.UpdateVersionRequest * @static - * @param {google.cloud.dialogflow.cx.v3.ISessionInfo=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.SessionInfo} SessionInfo instance + * @param {google.cloud.dialogflow.cx.v3.IUpdateVersionRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.UpdateVersionRequest} UpdateVersionRequest instance */ - SessionInfo.create = function create(properties) { - return new SessionInfo(properties); + UpdateVersionRequest.create = function create(properties) { + return new UpdateVersionRequest(properties); }; /** - * Encodes the specified SessionInfo message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SessionInfo.verify|verify} messages. + * Encodes the specified UpdateVersionRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateVersionRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.SessionInfo + * @memberof google.cloud.dialogflow.cx.v3.UpdateVersionRequest * @static - * @param {google.cloud.dialogflow.cx.v3.ISessionInfo} message SessionInfo message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IUpdateVersionRequest} message UpdateVersionRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SessionInfo.encode = function encode(message, writer) { + UpdateVersionRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.session != null && Object.hasOwnProperty.call(message, "session")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.session); - if (message.parameters != null && Object.hasOwnProperty.call(message, "parameters")) - for (var keys = Object.keys(message.parameters), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.protobuf.Value.encode(message.parameters[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + $root.google.cloud.dialogflow.cx.v3.Version.encode(message.version, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified SessionInfo message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SessionInfo.verify|verify} messages. + * Encodes the specified UpdateVersionRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateVersionRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.SessionInfo + * @memberof google.cloud.dialogflow.cx.v3.UpdateVersionRequest * @static - * @param {google.cloud.dialogflow.cx.v3.ISessionInfo} message SessionInfo message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IUpdateVersionRequest} message UpdateVersionRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SessionInfo.encodeDelimited = function encodeDelimited(message, writer) { + UpdateVersionRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SessionInfo message from the specified reader or buffer. + * Decodes an UpdateVersionRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.SessionInfo + * @memberof google.cloud.dialogflow.cx.v3.UpdateVersionRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.SessionInfo} SessionInfo + * @returns {google.cloud.dialogflow.cx.v3.UpdateVersionRequest} UpdateVersionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SessionInfo.decode = function decode(reader, length) { + UpdateVersionRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.SessionInfo(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.UpdateVersionRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.session = reader.string(); + message.version = $root.google.cloud.dialogflow.cx.v3.Version.decode(reader, reader.uint32()); break; case 2: - if (message.parameters === $util.emptyObject) - message.parameters = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.google.protobuf.Value.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.parameters[key] = value; + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -39326,413 +38687,126 @@ }; /** - * Decodes a SessionInfo message from the specified reader or buffer, length delimited. + * Decodes an UpdateVersionRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.SessionInfo + * @memberof google.cloud.dialogflow.cx.v3.UpdateVersionRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.SessionInfo} SessionInfo + * @returns {google.cloud.dialogflow.cx.v3.UpdateVersionRequest} UpdateVersionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SessionInfo.decodeDelimited = function decodeDelimited(reader) { + UpdateVersionRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SessionInfo message. + * Verifies an UpdateVersionRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.SessionInfo + * @memberof google.cloud.dialogflow.cx.v3.UpdateVersionRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SessionInfo.verify = function verify(message) { + UpdateVersionRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.session != null && message.hasOwnProperty("session")) - if (!$util.isString(message.session)) - return "session: string expected"; - if (message.parameters != null && message.hasOwnProperty("parameters")) { - if (!$util.isObject(message.parameters)) - return "parameters: object expected"; - var key = Object.keys(message.parameters); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.protobuf.Value.verify(message.parameters[key[i]]); - if (error) - return "parameters." + error; - } + if (message.version != null && message.hasOwnProperty("version")) { + var error = $root.google.cloud.dialogflow.cx.v3.Version.verify(message.version); + if (error) + return "version." + error; } - return null; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + return null; }; /** - * Creates a SessionInfo message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateVersionRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.SessionInfo + * @memberof google.cloud.dialogflow.cx.v3.UpdateVersionRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.SessionInfo} SessionInfo + * @returns {google.cloud.dialogflow.cx.v3.UpdateVersionRequest} UpdateVersionRequest */ - SessionInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.SessionInfo) + UpdateVersionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.UpdateVersionRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.SessionInfo(); - if (object.session != null) - message.session = String(object.session); - if (object.parameters) { - if (typeof object.parameters !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.SessionInfo.parameters: object expected"); - message.parameters = {}; - for (var keys = Object.keys(object.parameters), i = 0; i < keys.length; ++i) { - if (typeof object.parameters[keys[i]] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.SessionInfo.parameters: object expected"); - message.parameters[keys[i]] = $root.google.protobuf.Value.fromObject(object.parameters[keys[i]]); - } + var message = new $root.google.cloud.dialogflow.cx.v3.UpdateVersionRequest(); + if (object.version != null) { + if (typeof object.version !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.UpdateVersionRequest.version: object expected"); + message.version = $root.google.cloud.dialogflow.cx.v3.Version.fromObject(object.version); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.UpdateVersionRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } return message; }; /** - * Creates a plain object from a SessionInfo message. Also converts values to other types if specified. + * Creates a plain object from an UpdateVersionRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.SessionInfo + * @memberof google.cloud.dialogflow.cx.v3.UpdateVersionRequest * @static - * @param {google.cloud.dialogflow.cx.v3.SessionInfo} message SessionInfo + * @param {google.cloud.dialogflow.cx.v3.UpdateVersionRequest} message UpdateVersionRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SessionInfo.toObject = function toObject(message, options) { + UpdateVersionRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.parameters = {}; - if (options.defaults) - object.session = ""; - if (message.session != null && message.hasOwnProperty("session")) - object.session = message.session; - var keys2; - if (message.parameters && (keys2 = Object.keys(message.parameters)).length) { - object.parameters = {}; - for (var j = 0; j < keys2.length; ++j) - object.parameters[keys2[j]] = $root.google.protobuf.Value.toObject(message.parameters[keys2[j]], options); + if (options.defaults) { + object.version = null; + object.updateMask = null; } + if (message.version != null && message.hasOwnProperty("version")) + object.version = $root.google.cloud.dialogflow.cx.v3.Version.toObject(message.version, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this SessionInfo to JSON. + * Converts this UpdateVersionRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.SessionInfo + * @memberof google.cloud.dialogflow.cx.v3.UpdateVersionRequest * @instance * @returns {Object.} JSON object */ - SessionInfo.prototype.toJSON = function toJSON() { + UpdateVersionRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return SessionInfo; - })(); - - return v3; - })(); - - cx.v3beta1 = (function() { - - /** - * Namespace v3beta1. - * @memberof google.cloud.dialogflow.cx - * @namespace - */ - var v3beta1 = {}; - - v3beta1.Agents = (function() { - - /** - * Constructs a new Agents service. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents an Agents - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function Agents(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (Agents.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Agents; - - /** - * Creates new Agents service using the specified rpc implementation. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.Agents - * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {Agents} RPC service. Useful where requests and/or responses are streamed. - */ - Agents.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Agents#listAgents}. - * @memberof google.cloud.dialogflow.cx.v3beta1.Agents - * @typedef ListAgentsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse} [response] ListAgentsResponse - */ - - /** - * Calls ListAgents. - * @function listAgents - * @memberof google.cloud.dialogflow.cx.v3beta1.Agents - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IListAgentsRequest} request ListAgentsRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.Agents.ListAgentsCallback} callback Node-style callback called with the error, if any, and ListAgentsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Agents.prototype.listAgents = function listAgents(request, callback) { - return this.rpcCall(listAgents, $root.google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest, $root.google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse, request, callback); - }, "name", { value: "ListAgents" }); - - /** - * Calls ListAgents. - * @function listAgents - * @memberof google.cloud.dialogflow.cx.v3beta1.Agents - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IListAgentsRequest} request ListAgentsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Agents#getAgent}. - * @memberof google.cloud.dialogflow.cx.v3beta1.Agents - * @typedef GetAgentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3beta1.Agent} [response] Agent - */ - - /** - * Calls GetAgent. - * @function getAgent - * @memberof google.cloud.dialogflow.cx.v3beta1.Agents - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IGetAgentRequest} request GetAgentRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.Agents.GetAgentCallback} callback Node-style callback called with the error, if any, and Agent - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Agents.prototype.getAgent = function getAgent(request, callback) { - return this.rpcCall(getAgent, $root.google.cloud.dialogflow.cx.v3beta1.GetAgentRequest, $root.google.cloud.dialogflow.cx.v3beta1.Agent, request, callback); - }, "name", { value: "GetAgent" }); - - /** - * Calls GetAgent. - * @function getAgent - * @memberof google.cloud.dialogflow.cx.v3beta1.Agents - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IGetAgentRequest} request GetAgentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Agents#createAgent}. - * @memberof google.cloud.dialogflow.cx.v3beta1.Agents - * @typedef CreateAgentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3beta1.Agent} [response] Agent - */ - - /** - * Calls CreateAgent. - * @function createAgent - * @memberof google.cloud.dialogflow.cx.v3beta1.Agents - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.ICreateAgentRequest} request CreateAgentRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.Agents.CreateAgentCallback} callback Node-style callback called with the error, if any, and Agent - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Agents.prototype.createAgent = function createAgent(request, callback) { - return this.rpcCall(createAgent, $root.google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest, $root.google.cloud.dialogflow.cx.v3beta1.Agent, request, callback); - }, "name", { value: "CreateAgent" }); - - /** - * Calls CreateAgent. - * @function createAgent - * @memberof google.cloud.dialogflow.cx.v3beta1.Agents - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.ICreateAgentRequest} request CreateAgentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Agents#updateAgent}. - * @memberof google.cloud.dialogflow.cx.v3beta1.Agents - * @typedef UpdateAgentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3beta1.Agent} [response] Agent - */ - - /** - * Calls UpdateAgent. - * @function updateAgent - * @memberof google.cloud.dialogflow.cx.v3beta1.Agents - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateAgentRequest} request UpdateAgentRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.Agents.UpdateAgentCallback} callback Node-style callback called with the error, if any, and Agent - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Agents.prototype.updateAgent = function updateAgent(request, callback) { - return this.rpcCall(updateAgent, $root.google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest, $root.google.cloud.dialogflow.cx.v3beta1.Agent, request, callback); - }, "name", { value: "UpdateAgent" }); - - /** - * Calls UpdateAgent. - * @function updateAgent - * @memberof google.cloud.dialogflow.cx.v3beta1.Agents - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateAgentRequest} request UpdateAgentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Agents#deleteAgent}. - * @memberof google.cloud.dialogflow.cx.v3beta1.Agents - * @typedef DeleteAgentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls DeleteAgent. - * @function deleteAgent - * @memberof google.cloud.dialogflow.cx.v3beta1.Agents - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteAgentRequest} request DeleteAgentRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.Agents.DeleteAgentCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Agents.prototype.deleteAgent = function deleteAgent(request, callback) { - return this.rpcCall(deleteAgent, $root.google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteAgent" }); - - /** - * Calls DeleteAgent. - * @function deleteAgent - * @memberof google.cloud.dialogflow.cx.v3beta1.Agents - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteAgentRequest} request DeleteAgentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Agents#exportAgent}. - * @memberof google.cloud.dialogflow.cx.v3beta1.Agents - * @typedef ExportAgentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls ExportAgent. - * @function exportAgent - * @memberof google.cloud.dialogflow.cx.v3beta1.Agents - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IExportAgentRequest} request ExportAgentRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.Agents.ExportAgentCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Agents.prototype.exportAgent = function exportAgent(request, callback) { - return this.rpcCall(exportAgent, $root.google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "ExportAgent" }); - - /** - * Calls ExportAgent. - * @function exportAgent - * @memberof google.cloud.dialogflow.cx.v3beta1.Agents - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IExportAgentRequest} request ExportAgentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Agents#restoreAgent}. - * @memberof google.cloud.dialogflow.cx.v3beta1.Agents - * @typedef RestoreAgentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls RestoreAgent. - * @function restoreAgent - * @memberof google.cloud.dialogflow.cx.v3beta1.Agents - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IRestoreAgentRequest} request RestoreAgentRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.Agents.RestoreAgentCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Agents.prototype.restoreAgent = function restoreAgent(request, callback) { - return this.rpcCall(restoreAgent, $root.google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "RestoreAgent" }); - - /** - * Calls RestoreAgent. - * @function restoreAgent - * @memberof google.cloud.dialogflow.cx.v3beta1.Agents - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IRestoreAgentRequest} request RestoreAgentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Agents; + return UpdateVersionRequest; })(); - v3beta1.SpeechToTextSettings = (function() { + v3.DeleteVersionRequest = (function() { /** - * Properties of a SpeechToTextSettings. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface ISpeechToTextSettings - * @property {boolean|null} [enableSpeechAdaptation] SpeechToTextSettings enableSpeechAdaptation + * Properties of a DeleteVersionRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IDeleteVersionRequest + * @property {string|null} [name] DeleteVersionRequest name */ /** - * Constructs a new SpeechToTextSettings. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a SpeechToTextSettings. - * @implements ISpeechToTextSettings + * Constructs a new DeleteVersionRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a DeleteVersionRequest. + * @implements IDeleteVersionRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.ISpeechToTextSettings=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IDeleteVersionRequest=} [properties] Properties to set */ - function SpeechToTextSettings(properties) { + function DeleteVersionRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -39740,75 +38814,75 @@ } /** - * SpeechToTextSettings enableSpeechAdaptation. - * @member {boolean} enableSpeechAdaptation - * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings + * DeleteVersionRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.DeleteVersionRequest * @instance */ - SpeechToTextSettings.prototype.enableSpeechAdaptation = false; + DeleteVersionRequest.prototype.name = ""; /** - * Creates a new SpeechToTextSettings instance using the specified properties. + * Creates a new DeleteVersionRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings + * @memberof google.cloud.dialogflow.cx.v3.DeleteVersionRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ISpeechToTextSettings=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings} SpeechToTextSettings instance + * @param {google.cloud.dialogflow.cx.v3.IDeleteVersionRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.DeleteVersionRequest} DeleteVersionRequest instance */ - SpeechToTextSettings.create = function create(properties) { - return new SpeechToTextSettings(properties); + DeleteVersionRequest.create = function create(properties) { + return new DeleteVersionRequest(properties); }; /** - * Encodes the specified SpeechToTextSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings.verify|verify} messages. + * Encodes the specified DeleteVersionRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteVersionRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings + * @memberof google.cloud.dialogflow.cx.v3.DeleteVersionRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ISpeechToTextSettings} message SpeechToTextSettings message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IDeleteVersionRequest} message DeleteVersionRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SpeechToTextSettings.encode = function encode(message, writer) { + DeleteVersionRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.enableSpeechAdaptation != null && Object.hasOwnProperty.call(message, "enableSpeechAdaptation")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enableSpeechAdaptation); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified SpeechToTextSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings.verify|verify} messages. + * Encodes the specified DeleteVersionRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteVersionRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings + * @memberof google.cloud.dialogflow.cx.v3.DeleteVersionRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ISpeechToTextSettings} message SpeechToTextSettings message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IDeleteVersionRequest} message DeleteVersionRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SpeechToTextSettings.encodeDelimited = function encodeDelimited(message, writer) { + DeleteVersionRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SpeechToTextSettings message from the specified reader or buffer. + * Decodes a DeleteVersionRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings + * @memberof google.cloud.dialogflow.cx.v3.DeleteVersionRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings} SpeechToTextSettings + * @returns {google.cloud.dialogflow.cx.v3.DeleteVersionRequest} DeleteVersionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SpeechToTextSettings.decode = function decode(reader, length) { + DeleteVersionRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.DeleteVersionRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.enableSpeechAdaptation = reader.bool(); + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -39819,116 +38893,108 @@ }; /** - * Decodes a SpeechToTextSettings message from the specified reader or buffer, length delimited. + * Decodes a DeleteVersionRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings + * @memberof google.cloud.dialogflow.cx.v3.DeleteVersionRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings} SpeechToTextSettings + * @returns {google.cloud.dialogflow.cx.v3.DeleteVersionRequest} DeleteVersionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SpeechToTextSettings.decodeDelimited = function decodeDelimited(reader) { + DeleteVersionRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SpeechToTextSettings message. + * Verifies a DeleteVersionRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings + * @memberof google.cloud.dialogflow.cx.v3.DeleteVersionRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SpeechToTextSettings.verify = function verify(message) { + DeleteVersionRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.enableSpeechAdaptation != null && message.hasOwnProperty("enableSpeechAdaptation")) - if (typeof message.enableSpeechAdaptation !== "boolean") - return "enableSpeechAdaptation: boolean expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a SpeechToTextSettings message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteVersionRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings + * @memberof google.cloud.dialogflow.cx.v3.DeleteVersionRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings} SpeechToTextSettings + * @returns {google.cloud.dialogflow.cx.v3.DeleteVersionRequest} DeleteVersionRequest */ - SpeechToTextSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings) + DeleteVersionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.DeleteVersionRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings(); - if (object.enableSpeechAdaptation != null) - message.enableSpeechAdaptation = Boolean(object.enableSpeechAdaptation); + var message = new $root.google.cloud.dialogflow.cx.v3.DeleteVersionRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a SpeechToTextSettings message. Also converts values to other types if specified. + * Creates a plain object from a DeleteVersionRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings + * @memberof google.cloud.dialogflow.cx.v3.DeleteVersionRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings} message SpeechToTextSettings + * @param {google.cloud.dialogflow.cx.v3.DeleteVersionRequest} message DeleteVersionRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SpeechToTextSettings.toObject = function toObject(message, options) { + DeleteVersionRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) - object.enableSpeechAdaptation = false; - if (message.enableSpeechAdaptation != null && message.hasOwnProperty("enableSpeechAdaptation")) - object.enableSpeechAdaptation = message.enableSpeechAdaptation; + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this SpeechToTextSettings to JSON. + * Converts this DeleteVersionRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings + * @memberof google.cloud.dialogflow.cx.v3.DeleteVersionRequest * @instance * @returns {Object.} JSON object */ - SpeechToTextSettings.prototype.toJSON = function toJSON() { + DeleteVersionRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return SpeechToTextSettings; + return DeleteVersionRequest; })(); - v3beta1.Agent = (function() { + v3.LoadVersionRequest = (function() { /** - * Properties of an Agent. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IAgent - * @property {string|null} [name] Agent name - * @property {string|null} [displayName] Agent displayName - * @property {string|null} [defaultLanguageCode] Agent defaultLanguageCode - * @property {string|null} [timeZone] Agent timeZone - * @property {string|null} [description] Agent description - * @property {string|null} [avatarUri] Agent avatarUri - * @property {google.cloud.dialogflow.cx.v3beta1.ISpeechToTextSettings|null} [speechToTextSettings] Agent speechToTextSettings - * @property {string|null} [startFlow] Agent startFlow - * @property {boolean|null} [enableStackdriverLogging] Agent enableStackdriverLogging - * @property {boolean|null} [enableSpellCorrection] Agent enableSpellCorrection + * Properties of a LoadVersionRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface ILoadVersionRequest + * @property {string|null} [name] LoadVersionRequest name + * @property {boolean|null} [allowOverrideAgentResources] LoadVersionRequest allowOverrideAgentResources */ /** - * Constructs a new Agent. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents an Agent. - * @implements IAgent + * Constructs a new LoadVersionRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a LoadVersionRequest. + * @implements ILoadVersionRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IAgent=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.ILoadVersionRequest=} [properties] Properties to set */ - function Agent(properties) { + function LoadVersionRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -39936,160 +39002,80 @@ } /** - * Agent name. + * LoadVersionRequest name. * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent - * @instance - */ - Agent.prototype.name = ""; - - /** - * Agent displayName. - * @member {string} displayName - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent - * @instance - */ - Agent.prototype.displayName = ""; - - /** - * Agent defaultLanguageCode. - * @member {string} defaultLanguageCode - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent - * @instance - */ - Agent.prototype.defaultLanguageCode = ""; - - /** - * Agent timeZone. - * @member {string} timeZone - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent - * @instance - */ - Agent.prototype.timeZone = ""; - - /** - * Agent description. - * @member {string} description - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent - * @instance - */ - Agent.prototype.description = ""; - - /** - * Agent avatarUri. - * @member {string} avatarUri - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent - * @instance - */ - Agent.prototype.avatarUri = ""; - - /** - * Agent speechToTextSettings. - * @member {google.cloud.dialogflow.cx.v3beta1.ISpeechToTextSettings|null|undefined} speechToTextSettings - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent - * @instance - */ - Agent.prototype.speechToTextSettings = null; - - /** - * Agent startFlow. - * @member {string} startFlow - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent - * @instance - */ - Agent.prototype.startFlow = ""; - - /** - * Agent enableStackdriverLogging. - * @member {boolean} enableStackdriverLogging - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent + * @memberof google.cloud.dialogflow.cx.v3.LoadVersionRequest * @instance */ - Agent.prototype.enableStackdriverLogging = false; + LoadVersionRequest.prototype.name = ""; /** - * Agent enableSpellCorrection. - * @member {boolean} enableSpellCorrection - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent + * LoadVersionRequest allowOverrideAgentResources. + * @member {boolean} allowOverrideAgentResources + * @memberof google.cloud.dialogflow.cx.v3.LoadVersionRequest * @instance */ - Agent.prototype.enableSpellCorrection = false; + LoadVersionRequest.prototype.allowOverrideAgentResources = false; /** - * Creates a new Agent instance using the specified properties. + * Creates a new LoadVersionRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent + * @memberof google.cloud.dialogflow.cx.v3.LoadVersionRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IAgent=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.Agent} Agent instance + * @param {google.cloud.dialogflow.cx.v3.ILoadVersionRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.LoadVersionRequest} LoadVersionRequest instance */ - Agent.create = function create(properties) { - return new Agent(properties); + LoadVersionRequest.create = function create(properties) { + return new LoadVersionRequest(properties); }; /** - * Encodes the specified Agent message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Agent.verify|verify} messages. + * Encodes the specified LoadVersionRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.LoadVersionRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent + * @memberof google.cloud.dialogflow.cx.v3.LoadVersionRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IAgent} message Agent message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ILoadVersionRequest} message LoadVersionRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Agent.encode = function encode(message, writer) { + LoadVersionRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.defaultLanguageCode != null && Object.hasOwnProperty.call(message, "defaultLanguageCode")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.defaultLanguageCode); - if (message.timeZone != null && Object.hasOwnProperty.call(message, "timeZone")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.timeZone); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.description); - if (message.avatarUri != null && Object.hasOwnProperty.call(message, "avatarUri")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.avatarUri); - if (message.speechToTextSettings != null && Object.hasOwnProperty.call(message, "speechToTextSettings")) - $root.google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings.encode(message.speechToTextSettings, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - if (message.startFlow != null && Object.hasOwnProperty.call(message, "startFlow")) - writer.uint32(/* id 16, wireType 2 =*/130).string(message.startFlow); - if (message.enableStackdriverLogging != null && Object.hasOwnProperty.call(message, "enableStackdriverLogging")) - writer.uint32(/* id 18, wireType 0 =*/144).bool(message.enableStackdriverLogging); - if (message.enableSpellCorrection != null && Object.hasOwnProperty.call(message, "enableSpellCorrection")) - writer.uint32(/* id 20, wireType 0 =*/160).bool(message.enableSpellCorrection); + if (message.allowOverrideAgentResources != null && Object.hasOwnProperty.call(message, "allowOverrideAgentResources")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowOverrideAgentResources); return writer; }; /** - * Encodes the specified Agent message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Agent.verify|verify} messages. + * Encodes the specified LoadVersionRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.LoadVersionRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent + * @memberof google.cloud.dialogflow.cx.v3.LoadVersionRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IAgent} message Agent message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ILoadVersionRequest} message LoadVersionRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Agent.encodeDelimited = function encodeDelimited(message, writer) { + LoadVersionRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Agent message from the specified reader or buffer. + * Decodes a LoadVersionRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent + * @memberof google.cloud.dialogflow.cx.v3.LoadVersionRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.Agent} Agent + * @returns {google.cloud.dialogflow.cx.v3.LoadVersionRequest} LoadVersionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Agent.decode = function decode(reader, length) { + LoadVersionRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Agent(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.LoadVersionRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -40097,31 +39083,7 @@ message.name = reader.string(); break; case 2: - message.displayName = reader.string(); - break; - case 3: - message.defaultLanguageCode = reader.string(); - break; - case 5: - message.timeZone = reader.string(); - break; - case 6: - message.description = reader.string(); - break; - case 7: - message.avatarUri = reader.string(); - break; - case 13: - message.speechToTextSettings = $root.google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings.decode(reader, reader.uint32()); - break; - case 16: - message.startFlow = reader.string(); - break; - case 18: - message.enableStackdriverLogging = reader.bool(); - break; - case 20: - message.enableSpellCorrection = reader.bool(); + message.allowOverrideAgentResources = reader.bool(); break; default: reader.skipType(tag & 7); @@ -40132,725 +39094,463 @@ }; /** - * Decodes an Agent message from the specified reader or buffer, length delimited. + * Decodes a LoadVersionRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent + * @memberof google.cloud.dialogflow.cx.v3.LoadVersionRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.Agent} Agent + * @returns {google.cloud.dialogflow.cx.v3.LoadVersionRequest} LoadVersionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Agent.decodeDelimited = function decodeDelimited(reader) { + LoadVersionRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Agent message. + * Verifies a LoadVersionRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent + * @memberof google.cloud.dialogflow.cx.v3.LoadVersionRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Agent.verify = function verify(message) { + LoadVersionRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.defaultLanguageCode != null && message.hasOwnProperty("defaultLanguageCode")) - if (!$util.isString(message.defaultLanguageCode)) - return "defaultLanguageCode: string expected"; - if (message.timeZone != null && message.hasOwnProperty("timeZone")) - if (!$util.isString(message.timeZone)) - return "timeZone: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.avatarUri != null && message.hasOwnProperty("avatarUri")) - if (!$util.isString(message.avatarUri)) - return "avatarUri: string expected"; - if (message.speechToTextSettings != null && message.hasOwnProperty("speechToTextSettings")) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings.verify(message.speechToTextSettings); - if (error) - return "speechToTextSettings." + error; - } - if (message.startFlow != null && message.hasOwnProperty("startFlow")) - if (!$util.isString(message.startFlow)) - return "startFlow: string expected"; - if (message.enableStackdriverLogging != null && message.hasOwnProperty("enableStackdriverLogging")) - if (typeof message.enableStackdriverLogging !== "boolean") - return "enableStackdriverLogging: boolean expected"; - if (message.enableSpellCorrection != null && message.hasOwnProperty("enableSpellCorrection")) - if (typeof message.enableSpellCorrection !== "boolean") - return "enableSpellCorrection: boolean expected"; + if (message.allowOverrideAgentResources != null && message.hasOwnProperty("allowOverrideAgentResources")) + if (typeof message.allowOverrideAgentResources !== "boolean") + return "allowOverrideAgentResources: boolean expected"; return null; }; /** - * Creates an Agent message from a plain object. Also converts values to their respective internal types. + * Creates a LoadVersionRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent + * @memberof google.cloud.dialogflow.cx.v3.LoadVersionRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.Agent} Agent + * @returns {google.cloud.dialogflow.cx.v3.LoadVersionRequest} LoadVersionRequest */ - Agent.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Agent) + LoadVersionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.LoadVersionRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.Agent(); + var message = new $root.google.cloud.dialogflow.cx.v3.LoadVersionRequest(); if (object.name != null) message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.defaultLanguageCode != null) - message.defaultLanguageCode = String(object.defaultLanguageCode); - if (object.timeZone != null) - message.timeZone = String(object.timeZone); - if (object.description != null) - message.description = String(object.description); - if (object.avatarUri != null) - message.avatarUri = String(object.avatarUri); - if (object.speechToTextSettings != null) { - if (typeof object.speechToTextSettings !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Agent.speechToTextSettings: object expected"); - message.speechToTextSettings = $root.google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings.fromObject(object.speechToTextSettings); - } - if (object.startFlow != null) - message.startFlow = String(object.startFlow); - if (object.enableStackdriverLogging != null) - message.enableStackdriverLogging = Boolean(object.enableStackdriverLogging); - if (object.enableSpellCorrection != null) - message.enableSpellCorrection = Boolean(object.enableSpellCorrection); + if (object.allowOverrideAgentResources != null) + message.allowOverrideAgentResources = Boolean(object.allowOverrideAgentResources); return message; }; /** - * Creates a plain object from an Agent message. Also converts values to other types if specified. + * Creates a plain object from a LoadVersionRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent + * @memberof google.cloud.dialogflow.cx.v3.LoadVersionRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Agent} message Agent + * @param {google.cloud.dialogflow.cx.v3.LoadVersionRequest} message LoadVersionRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Agent.toObject = function toObject(message, options) { + LoadVersionRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.name = ""; - object.displayName = ""; - object.defaultLanguageCode = ""; - object.timeZone = ""; - object.description = ""; - object.avatarUri = ""; - object.speechToTextSettings = null; - object.startFlow = ""; - object.enableStackdriverLogging = false; - object.enableSpellCorrection = false; + object.allowOverrideAgentResources = false; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.defaultLanguageCode != null && message.hasOwnProperty("defaultLanguageCode")) - object.defaultLanguageCode = message.defaultLanguageCode; - if (message.timeZone != null && message.hasOwnProperty("timeZone")) - object.timeZone = message.timeZone; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.avatarUri != null && message.hasOwnProperty("avatarUri")) - object.avatarUri = message.avatarUri; - if (message.speechToTextSettings != null && message.hasOwnProperty("speechToTextSettings")) - object.speechToTextSettings = $root.google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings.toObject(message.speechToTextSettings, options); - if (message.startFlow != null && message.hasOwnProperty("startFlow")) - object.startFlow = message.startFlow; - if (message.enableStackdriverLogging != null && message.hasOwnProperty("enableStackdriverLogging")) - object.enableStackdriverLogging = message.enableStackdriverLogging; - if (message.enableSpellCorrection != null && message.hasOwnProperty("enableSpellCorrection")) - object.enableSpellCorrection = message.enableSpellCorrection; + if (message.allowOverrideAgentResources != null && message.hasOwnProperty("allowOverrideAgentResources")) + object.allowOverrideAgentResources = message.allowOverrideAgentResources; return object; }; /** - * Converts this Agent to JSON. + * Converts this LoadVersionRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent + * @memberof google.cloud.dialogflow.cx.v3.LoadVersionRequest * @instance * @returns {Object.} JSON object */ - Agent.prototype.toJSON = function toJSON() { + LoadVersionRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Agent; + return LoadVersionRequest; })(); - v3beta1.ListAgentsRequest = (function() { + v3.Webhooks = (function() { /** - * Properties of a ListAgentsRequest. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IListAgentsRequest - * @property {string|null} [parent] ListAgentsRequest parent - * @property {number|null} [pageSize] ListAgentsRequest pageSize - * @property {string|null} [pageToken] ListAgentsRequest pageToken + * Constructs a new Webhooks service. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a Webhooks + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited */ + function Webhooks(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Webhooks.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Webhooks; /** - * Constructs a new ListAgentsRequest. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a ListAgentsRequest. - * @implements IListAgentsRequest - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IListAgentsRequest=} [properties] Properties to set + * Creates new Webhooks service using the specified rpc implementation. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.Webhooks + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Webhooks} RPC service. Useful where requests and/or responses are streamed. */ - function ListAgentsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + Webhooks.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; /** - * ListAgentsRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest - * @instance + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Webhooks#listWebhooks}. + * @memberof google.cloud.dialogflow.cx.v3.Webhooks + * @typedef ListWebhooksCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.ListWebhooksResponse} [response] ListWebhooksResponse */ - ListAgentsRequest.prototype.parent = ""; /** - * ListAgentsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest + * Calls ListWebhooks. + * @function listWebhooks + * @memberof google.cloud.dialogflow.cx.v3.Webhooks * @instance + * @param {google.cloud.dialogflow.cx.v3.IListWebhooksRequest} request ListWebhooksRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Webhooks.ListWebhooksCallback} callback Node-style callback called with the error, if any, and ListWebhooksResponse + * @returns {undefined} + * @variation 1 */ - ListAgentsRequest.prototype.pageSize = 0; + Object.defineProperty(Webhooks.prototype.listWebhooks = function listWebhooks(request, callback) { + return this.rpcCall(listWebhooks, $root.google.cloud.dialogflow.cx.v3.ListWebhooksRequest, $root.google.cloud.dialogflow.cx.v3.ListWebhooksResponse, request, callback); + }, "name", { value: "ListWebhooks" }); /** - * ListAgentsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest + * Calls ListWebhooks. + * @function listWebhooks + * @memberof google.cloud.dialogflow.cx.v3.Webhooks * @instance + * @param {google.cloud.dialogflow.cx.v3.IListWebhooksRequest} request ListWebhooksRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListAgentsRequest.prototype.pageToken = ""; /** - * Creates a new ListAgentsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListAgentsRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest} ListAgentsRequest instance + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Webhooks#getWebhook}. + * @memberof google.cloud.dialogflow.cx.v3.Webhooks + * @typedef GetWebhookCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.Webhook} [response] Webhook */ - ListAgentsRequest.create = function create(properties) { - return new ListAgentsRequest(properties); - }; /** - * Encodes the specified ListAgentsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListAgentsRequest} message ListAgentsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls GetWebhook. + * @function getWebhook + * @memberof google.cloud.dialogflow.cx.v3.Webhooks + * @instance + * @param {google.cloud.dialogflow.cx.v3.IGetWebhookRequest} request GetWebhookRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Webhooks.GetWebhookCallback} callback Node-style callback called with the error, if any, and Webhook + * @returns {undefined} + * @variation 1 */ - ListAgentsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - return writer; - }; + Object.defineProperty(Webhooks.prototype.getWebhook = function getWebhook(request, callback) { + return this.rpcCall(getWebhook, $root.google.cloud.dialogflow.cx.v3.GetWebhookRequest, $root.google.cloud.dialogflow.cx.v3.Webhook, request, callback); + }, "name", { value: "GetWebhook" }); /** - * Encodes the specified ListAgentsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListAgentsRequest} message ListAgentsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls GetWebhook. + * @function getWebhook + * @memberof google.cloud.dialogflow.cx.v3.Webhooks + * @instance + * @param {google.cloud.dialogflow.cx.v3.IGetWebhookRequest} request GetWebhookRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListAgentsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; /** - * Decodes a ListAgentsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest} ListAgentsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Webhooks#createWebhook}. + * @memberof google.cloud.dialogflow.cx.v3.Webhooks + * @typedef CreateWebhookCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.Webhook} [response] Webhook */ - ListAgentsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes a ListAgentsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest} ListAgentsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls CreateWebhook. + * @function createWebhook + * @memberof google.cloud.dialogflow.cx.v3.Webhooks + * @instance + * @param {google.cloud.dialogflow.cx.v3.ICreateWebhookRequest} request CreateWebhookRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Webhooks.CreateWebhookCallback} callback Node-style callback called with the error, if any, and Webhook + * @returns {undefined} + * @variation 1 */ - ListAgentsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + Object.defineProperty(Webhooks.prototype.createWebhook = function createWebhook(request, callback) { + return this.rpcCall(createWebhook, $root.google.cloud.dialogflow.cx.v3.CreateWebhookRequest, $root.google.cloud.dialogflow.cx.v3.Webhook, request, callback); + }, "name", { value: "CreateWebhook" }); /** - * Verifies a ListAgentsRequest message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls CreateWebhook. + * @function createWebhook + * @memberof google.cloud.dialogflow.cx.v3.Webhooks + * @instance + * @param {google.cloud.dialogflow.cx.v3.ICreateWebhookRequest} request CreateWebhookRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListAgentsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - return null; - }; - - /** - * Creates a ListAgentsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest} ListAgentsRequest - */ - ListAgentsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - return message; - }; /** - * Creates a plain object from a ListAgentsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest} message ListAgentsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Webhooks#updateWebhook}. + * @memberof google.cloud.dialogflow.cx.v3.Webhooks + * @typedef UpdateWebhookCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.Webhook} [response] Webhook */ - ListAgentsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - return object; - }; /** - * Converts this ListAgentsRequest to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest + * Calls UpdateWebhook. + * @function updateWebhook + * @memberof google.cloud.dialogflow.cx.v3.Webhooks * @instance - * @returns {Object.} JSON object + * @param {google.cloud.dialogflow.cx.v3.IUpdateWebhookRequest} request UpdateWebhookRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Webhooks.UpdateWebhookCallback} callback Node-style callback called with the error, if any, and Webhook + * @returns {undefined} + * @variation 1 */ - ListAgentsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ListAgentsRequest; - })(); - - v3beta1.ListAgentsResponse = (function() { + Object.defineProperty(Webhooks.prototype.updateWebhook = function updateWebhook(request, callback) { + return this.rpcCall(updateWebhook, $root.google.cloud.dialogflow.cx.v3.UpdateWebhookRequest, $root.google.cloud.dialogflow.cx.v3.Webhook, request, callback); + }, "name", { value: "UpdateWebhook" }); /** - * Properties of a ListAgentsResponse. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IListAgentsResponse - * @property {Array.|null} [agents] ListAgentsResponse agents - * @property {string|null} [nextPageToken] ListAgentsResponse nextPageToken + * Calls UpdateWebhook. + * @function updateWebhook + * @memberof google.cloud.dialogflow.cx.v3.Webhooks + * @instance + * @param {google.cloud.dialogflow.cx.v3.IUpdateWebhookRequest} request UpdateWebhookRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ /** - * Constructs a new ListAgentsResponse. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a ListAgentsResponse. - * @implements IListAgentsResponse - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IListAgentsResponse=} [properties] Properties to set + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Webhooks#deleteWebhook}. + * @memberof google.cloud.dialogflow.cx.v3.Webhooks + * @typedef DeleteWebhookCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty */ - function ListAgentsResponse(properties) { - this.agents = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } /** - * ListAgentsResponse agents. - * @member {Array.} agents - * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse + * Calls DeleteWebhook. + * @function deleteWebhook + * @memberof google.cloud.dialogflow.cx.v3.Webhooks * @instance + * @param {google.cloud.dialogflow.cx.v3.IDeleteWebhookRequest} request DeleteWebhookRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Webhooks.DeleteWebhookCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 */ - ListAgentsResponse.prototype.agents = $util.emptyArray; + Object.defineProperty(Webhooks.prototype.deleteWebhook = function deleteWebhook(request, callback) { + return this.rpcCall(deleteWebhook, $root.google.cloud.dialogflow.cx.v3.DeleteWebhookRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteWebhook" }); /** - * ListAgentsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse + * Calls DeleteWebhook. + * @function deleteWebhook + * @memberof google.cloud.dialogflow.cx.v3.Webhooks * @instance + * @param {google.cloud.dialogflow.cx.v3.IDeleteWebhookRequest} request DeleteWebhookRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListAgentsResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListAgentsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListAgentsResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse} ListAgentsResponse instance - */ - ListAgentsResponse.create = function create(properties) { - return new ListAgentsResponse(properties); - }; - /** - * Encodes the specified ListAgentsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListAgentsResponse} message ListAgentsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListAgentsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.agents != null && message.agents.length) - for (var i = 0; i < message.agents.length; ++i) - $root.google.cloud.dialogflow.cx.v3beta1.Agent.encode(message.agents[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - return writer; - }; + return Webhooks; + })(); - /** - * Encodes the specified ListAgentsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListAgentsResponse} message ListAgentsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListAgentsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + v3.Webhook = (function() { /** - * Decodes a ListAgentsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse} ListAgentsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Properties of a Webhook. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IWebhook + * @property {string|null} [name] Webhook name + * @property {string|null} [displayName] Webhook displayName + * @property {google.cloud.dialogflow.cx.v3.Webhook.IGenericWebService|null} [genericWebService] Webhook genericWebService + * @property {google.protobuf.IDuration|null} [timeout] Webhook timeout + * @property {boolean|null} [disabled] Webhook disabled */ - ListAgentsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.agents && message.agents.length)) - message.agents = []; - message.agents.push($root.google.cloud.dialogflow.cx.v3beta1.Agent.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes a ListAgentsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse} ListAgentsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Constructs a new Webhook. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a Webhook. + * @implements IWebhook + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IWebhook=} [properties] Properties to set */ - ListAgentsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + function Webhook(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Verifies a ListAgentsResponse message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Webhook name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.Webhook + * @instance */ - ListAgentsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.agents != null && message.hasOwnProperty("agents")) { - if (!Array.isArray(message.agents)) - return "agents: array expected"; - for (var i = 0; i < message.agents.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.Agent.verify(message.agents[i]); - if (error) - return "agents." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; + Webhook.prototype.name = ""; /** - * Creates a ListAgentsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse} ListAgentsResponse + * Webhook displayName. + * @member {string} displayName + * @memberof google.cloud.dialogflow.cx.v3.Webhook + * @instance */ - ListAgentsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse(); - if (object.agents) { - if (!Array.isArray(object.agents)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse.agents: array expected"); - message.agents = []; - for (var i = 0; i < object.agents.length; ++i) { - if (typeof object.agents[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse.agents: object expected"); - message.agents[i] = $root.google.cloud.dialogflow.cx.v3beta1.Agent.fromObject(object.agents[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; + Webhook.prototype.displayName = ""; /** - * Creates a plain object from a ListAgentsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse} message ListAgentsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Webhook genericWebService. + * @member {google.cloud.dialogflow.cx.v3.Webhook.IGenericWebService|null|undefined} genericWebService + * @memberof google.cloud.dialogflow.cx.v3.Webhook + * @instance */ - ListAgentsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.agents = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.agents && message.agents.length) { - object.agents = []; - for (var j = 0; j < message.agents.length; ++j) - object.agents[j] = $root.google.cloud.dialogflow.cx.v3beta1.Agent.toObject(message.agents[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; + Webhook.prototype.genericWebService = null; /** - * Converts this ListAgentsResponse to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse + * Webhook timeout. + * @member {google.protobuf.IDuration|null|undefined} timeout + * @memberof google.cloud.dialogflow.cx.v3.Webhook * @instance - * @returns {Object.} JSON object */ - ListAgentsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ListAgentsResponse; - })(); - - v3beta1.GetAgentRequest = (function() { + Webhook.prototype.timeout = null; /** - * Properties of a GetAgentRequest. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IGetAgentRequest - * @property {string|null} [name] GetAgentRequest name + * Webhook disabled. + * @member {boolean} disabled + * @memberof google.cloud.dialogflow.cx.v3.Webhook + * @instance */ + Webhook.prototype.disabled = false; - /** - * Constructs a new GetAgentRequest. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a GetAgentRequest. - * @implements IGetAgentRequest - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IGetAgentRequest=} [properties] Properties to set - */ - function GetAgentRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * GetAgentRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.GetAgentRequest + * Webhook webhook. + * @member {"genericWebService"|undefined} webhook + * @memberof google.cloud.dialogflow.cx.v3.Webhook * @instance */ - GetAgentRequest.prototype.name = ""; + Object.defineProperty(Webhook.prototype, "webhook", { + get: $util.oneOfGetter($oneOfFields = ["genericWebService"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new GetAgentRequest instance using the specified properties. + * Creates a new Webhook instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.GetAgentRequest + * @memberof google.cloud.dialogflow.cx.v3.Webhook * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IGetAgentRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.GetAgentRequest} GetAgentRequest instance + * @param {google.cloud.dialogflow.cx.v3.IWebhook=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Webhook} Webhook instance */ - GetAgentRequest.create = function create(properties) { - return new GetAgentRequest(properties); + Webhook.create = function create(properties) { + return new Webhook(properties); }; /** - * Encodes the specified GetAgentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetAgentRequest.verify|verify} messages. + * Encodes the specified Webhook message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Webhook.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.GetAgentRequest + * @memberof google.cloud.dialogflow.cx.v3.Webhook * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IGetAgentRequest} message GetAgentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IWebhook} message Webhook message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetAgentRequest.encode = function encode(message, writer) { + Webhook.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.genericWebService != null && Object.hasOwnProperty.call(message, "genericWebService")) + $root.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.encode(message.genericWebService, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.disabled); + if (message.timeout != null && Object.hasOwnProperty.call(message, "timeout")) + $root.google.protobuf.Duration.encode(message.timeout, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetAgentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetAgentRequest.verify|verify} messages. + * Encodes the specified Webhook message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Webhook.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.GetAgentRequest + * @memberof google.cloud.dialogflow.cx.v3.Webhook * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IGetAgentRequest} message GetAgentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IWebhook} message Webhook message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetAgentRequest.encodeDelimited = function encodeDelimited(message, writer) { + Webhook.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetAgentRequest message from the specified reader or buffer. + * Decodes a Webhook message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.GetAgentRequest + * @memberof google.cloud.dialogflow.cx.v3.Webhook * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.GetAgentRequest} GetAgentRequest + * @returns {google.cloud.dialogflow.cx.v3.Webhook} Webhook * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetAgentRequest.decode = function decode(reader, length) { + Webhook.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.GetAgentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.Webhook(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: message.name = reader.string(); break; + case 2: + message.displayName = reader.string(); + break; + case 4: + message.genericWebService = $root.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.decode(reader, reader.uint32()); + break; + case 6: + message.timeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 5: + message.disabled = reader.bool(); + break; default: reader.skipType(tag & 7); break; @@ -40860,108 +39560,448 @@ }; /** - * Decodes a GetAgentRequest message from the specified reader or buffer, length delimited. + * Decodes a Webhook message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.GetAgentRequest + * @memberof google.cloud.dialogflow.cx.v3.Webhook * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.GetAgentRequest} GetAgentRequest + * @returns {google.cloud.dialogflow.cx.v3.Webhook} Webhook * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetAgentRequest.decodeDelimited = function decodeDelimited(reader) { + Webhook.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetAgentRequest message. + * Verifies a Webhook message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.GetAgentRequest + * @memberof google.cloud.dialogflow.cx.v3.Webhook * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetAgentRequest.verify = function verify(message) { + Webhook.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.genericWebService != null && message.hasOwnProperty("genericWebService")) { + properties.webhook = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.verify(message.genericWebService); + if (error) + return "genericWebService." + error; + } + } + if (message.timeout != null && message.hasOwnProperty("timeout")) { + var error = $root.google.protobuf.Duration.verify(message.timeout); + if (error) + return "timeout." + error; + } + if (message.disabled != null && message.hasOwnProperty("disabled")) + if (typeof message.disabled !== "boolean") + return "disabled: boolean expected"; return null; }; /** - * Creates a GetAgentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Webhook message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.GetAgentRequest + * @memberof google.cloud.dialogflow.cx.v3.Webhook * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.GetAgentRequest} GetAgentRequest + * @returns {google.cloud.dialogflow.cx.v3.Webhook} Webhook */ - GetAgentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.GetAgentRequest) + Webhook.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.Webhook) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.GetAgentRequest(); + var message = new $root.google.cloud.dialogflow.cx.v3.Webhook(); if (object.name != null) message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.genericWebService != null) { + if (typeof object.genericWebService !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Webhook.genericWebService: object expected"); + message.genericWebService = $root.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.fromObject(object.genericWebService); + } + if (object.timeout != null) { + if (typeof object.timeout !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Webhook.timeout: object expected"); + message.timeout = $root.google.protobuf.Duration.fromObject(object.timeout); + } + if (object.disabled != null) + message.disabled = Boolean(object.disabled); return message; }; /** - * Creates a plain object from a GetAgentRequest message. Also converts values to other types if specified. + * Creates a plain object from a Webhook message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.GetAgentRequest + * @memberof google.cloud.dialogflow.cx.v3.Webhook * @static - * @param {google.cloud.dialogflow.cx.v3beta1.GetAgentRequest} message GetAgentRequest + * @param {google.cloud.dialogflow.cx.v3.Webhook} message Webhook * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetAgentRequest.toObject = function toObject(message, options) { + Webhook.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.name = ""; + object.displayName = ""; + object.disabled = false; + object.timeout = null; + } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.genericWebService != null && message.hasOwnProperty("genericWebService")) { + object.genericWebService = $root.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.toObject(message.genericWebService, options); + if (options.oneofs) + object.webhook = "genericWebService"; + } + if (message.disabled != null && message.hasOwnProperty("disabled")) + object.disabled = message.disabled; + if (message.timeout != null && message.hasOwnProperty("timeout")) + object.timeout = $root.google.protobuf.Duration.toObject(message.timeout, options); return object; }; /** - * Converts this GetAgentRequest to JSON. + * Converts this Webhook to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.GetAgentRequest + * @memberof google.cloud.dialogflow.cx.v3.Webhook * @instance * @returns {Object.} JSON object */ - GetAgentRequest.prototype.toJSON = function toJSON() { + Webhook.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetAgentRequest; + Webhook.GenericWebService = (function() { + + /** + * Properties of a GenericWebService. + * @memberof google.cloud.dialogflow.cx.v3.Webhook + * @interface IGenericWebService + * @property {string|null} [uri] GenericWebService uri + * @property {string|null} [username] GenericWebService username + * @property {string|null} [password] GenericWebService password + * @property {Object.|null} [requestHeaders] GenericWebService requestHeaders + */ + + /** + * Constructs a new GenericWebService. + * @memberof google.cloud.dialogflow.cx.v3.Webhook + * @classdesc Represents a GenericWebService. + * @implements IGenericWebService + * @constructor + * @param {google.cloud.dialogflow.cx.v3.Webhook.IGenericWebService=} [properties] Properties to set + */ + function GenericWebService(properties) { + this.requestHeaders = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GenericWebService uri. + * @member {string} uri + * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + * @instance + */ + GenericWebService.prototype.uri = ""; + + /** + * GenericWebService username. + * @member {string} username + * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + * @instance + */ + GenericWebService.prototype.username = ""; + + /** + * GenericWebService password. + * @member {string} password + * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + * @instance + */ + GenericWebService.prototype.password = ""; + + /** + * GenericWebService requestHeaders. + * @member {Object.} requestHeaders + * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + * @instance + */ + GenericWebService.prototype.requestHeaders = $util.emptyObject; + + /** + * Creates a new GenericWebService instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + * @static + * @param {google.cloud.dialogflow.cx.v3.Webhook.IGenericWebService=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Webhook.GenericWebService} GenericWebService instance + */ + GenericWebService.create = function create(properties) { + return new GenericWebService(properties); + }; + + /** + * Encodes the specified GenericWebService message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + * @static + * @param {google.cloud.dialogflow.cx.v3.Webhook.IGenericWebService} message GenericWebService message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenericWebService.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); + if (message.username != null && Object.hasOwnProperty.call(message, "username")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.username); + if (message.password != null && Object.hasOwnProperty.call(message, "password")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.password); + if (message.requestHeaders != null && Object.hasOwnProperty.call(message, "requestHeaders")) + for (var keys = Object.keys(message.requestHeaders), i = 0; i < keys.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.requestHeaders[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified GenericWebService message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + * @static + * @param {google.cloud.dialogflow.cx.v3.Webhook.IGenericWebService} message GenericWebService message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenericWebService.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GenericWebService message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3.Webhook.GenericWebService} GenericWebService + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenericWebService.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.uri = reader.string(); + break; + case 2: + message.username = reader.string(); + break; + case 3: + message.password = reader.string(); + break; + case 4: + if (message.requestHeaders === $util.emptyObject) + message.requestHeaders = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.requestHeaders[key] = value; + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GenericWebService message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.Webhook.GenericWebService} GenericWebService + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenericWebService.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GenericWebService message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GenericWebService.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.username != null && message.hasOwnProperty("username")) + if (!$util.isString(message.username)) + return "username: string expected"; + if (message.password != null && message.hasOwnProperty("password")) + if (!$util.isString(message.password)) + return "password: string expected"; + if (message.requestHeaders != null && message.hasOwnProperty("requestHeaders")) { + if (!$util.isObject(message.requestHeaders)) + return "requestHeaders: object expected"; + var key = Object.keys(message.requestHeaders); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.requestHeaders[key[i]])) + return "requestHeaders: string{k:string} expected"; + } + return null; + }; + + /** + * Creates a GenericWebService message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.Webhook.GenericWebService} GenericWebService + */ + GenericWebService.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService(); + if (object.uri != null) + message.uri = String(object.uri); + if (object.username != null) + message.username = String(object.username); + if (object.password != null) + message.password = String(object.password); + if (object.requestHeaders) { + if (typeof object.requestHeaders !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.requestHeaders: object expected"); + message.requestHeaders = {}; + for (var keys = Object.keys(object.requestHeaders), i = 0; i < keys.length; ++i) + message.requestHeaders[keys[i]] = String(object.requestHeaders[keys[i]]); + } + return message; + }; + + /** + * Creates a plain object from a GenericWebService message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + * @static + * @param {google.cloud.dialogflow.cx.v3.Webhook.GenericWebService} message GenericWebService + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GenericWebService.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.requestHeaders = {}; + if (options.defaults) { + object.uri = ""; + object.username = ""; + object.password = ""; + } + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.username != null && message.hasOwnProperty("username")) + object.username = message.username; + if (message.password != null && message.hasOwnProperty("password")) + object.password = message.password; + var keys2; + if (message.requestHeaders && (keys2 = Object.keys(message.requestHeaders)).length) { + object.requestHeaders = {}; + for (var j = 0; j < keys2.length; ++j) + object.requestHeaders[keys2[j]] = message.requestHeaders[keys2[j]]; + } + return object; + }; + + /** + * Converts this GenericWebService to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + * @instance + * @returns {Object.} JSON object + */ + GenericWebService.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GenericWebService; + })(); + + return Webhook; })(); - v3beta1.CreateAgentRequest = (function() { + v3.ListWebhooksRequest = (function() { /** - * Properties of a CreateAgentRequest. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface ICreateAgentRequest - * @property {string|null} [parent] CreateAgentRequest parent - * @property {google.cloud.dialogflow.cx.v3beta1.IAgent|null} [agent] CreateAgentRequest agent + * Properties of a ListWebhooksRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IListWebhooksRequest + * @property {string|null} [parent] ListWebhooksRequest parent + * @property {number|null} [pageSize] ListWebhooksRequest pageSize + * @property {string|null} [pageToken] ListWebhooksRequest pageToken */ /** - * Constructs a new CreateAgentRequest. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a CreateAgentRequest. - * @implements ICreateAgentRequest + * Constructs a new ListWebhooksRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a ListWebhooksRequest. + * @implements IListWebhooksRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.ICreateAgentRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IListWebhooksRequest=} [properties] Properties to set */ - function CreateAgentRequest(properties) { + function ListWebhooksRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -40969,80 +40009,90 @@ } /** - * CreateAgentRequest parent. + * ListWebhooksRequest parent. * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksRequest * @instance */ - CreateAgentRequest.prototype.parent = ""; + ListWebhooksRequest.prototype.parent = ""; /** - * CreateAgentRequest agent. - * @member {google.cloud.dialogflow.cx.v3beta1.IAgent|null|undefined} agent - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest + * ListWebhooksRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksRequest * @instance */ - CreateAgentRequest.prototype.agent = null; + ListWebhooksRequest.prototype.pageSize = 0; /** - * Creates a new CreateAgentRequest instance using the specified properties. + * ListWebhooksRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksRequest + * @instance + */ + ListWebhooksRequest.prototype.pageToken = ""; + + /** + * Creates a new ListWebhooksRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ICreateAgentRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest} CreateAgentRequest instance + * @param {google.cloud.dialogflow.cx.v3.IListWebhooksRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ListWebhooksRequest} ListWebhooksRequest instance */ - CreateAgentRequest.create = function create(properties) { - return new CreateAgentRequest(properties); + ListWebhooksRequest.create = function create(properties) { + return new ListWebhooksRequest(properties); }; /** - * Encodes the specified CreateAgentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest.verify|verify} messages. + * Encodes the specified ListWebhooksRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListWebhooksRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ICreateAgentRequest} message CreateAgentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListWebhooksRequest} message ListWebhooksRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateAgentRequest.encode = function encode(message, writer) { + ListWebhooksRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.agent != null && Object.hasOwnProperty.call(message, "agent")) - $root.google.cloud.dialogflow.cx.v3beta1.Agent.encode(message.agent, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); return writer; }; /** - * Encodes the specified CreateAgentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest.verify|verify} messages. + * Encodes the specified ListWebhooksRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListWebhooksRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ICreateAgentRequest} message CreateAgentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListWebhooksRequest} message ListWebhooksRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateAgentRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListWebhooksRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateAgentRequest message from the specified reader or buffer. + * Decodes a ListWebhooksRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest} CreateAgentRequest + * @returns {google.cloud.dialogflow.cx.v3.ListWebhooksRequest} ListWebhooksRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateAgentRequest.decode = function decode(reader, length) { + ListWebhooksRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ListWebhooksRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -41050,7 +40100,10 @@ message.parent = reader.string(); break; case 2: - message.agent = $root.google.cloud.dialogflow.cx.v3beta1.Agent.decode(reader, reader.uint32()); + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -41061,122 +40114,126 @@ }; /** - * Decodes a CreateAgentRequest message from the specified reader or buffer, length delimited. + * Decodes a ListWebhooksRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest} CreateAgentRequest + * @returns {google.cloud.dialogflow.cx.v3.ListWebhooksRequest} ListWebhooksRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateAgentRequest.decodeDelimited = function decodeDelimited(reader) { + ListWebhooksRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateAgentRequest message. + * Verifies a ListWebhooksRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateAgentRequest.verify = function verify(message) { + ListWebhooksRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.parent != null && message.hasOwnProperty("parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.agent != null && message.hasOwnProperty("agent")) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.Agent.verify(message.agent); - if (error) - return "agent." + error; - } + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; return null; }; /** - * Creates a CreateAgentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListWebhooksRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest} CreateAgentRequest + * @returns {google.cloud.dialogflow.cx.v3.ListWebhooksRequest} ListWebhooksRequest */ - CreateAgentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest) + ListWebhooksRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListWebhooksRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest(); + var message = new $root.google.cloud.dialogflow.cx.v3.ListWebhooksRequest(); if (object.parent != null) message.parent = String(object.parent); - if (object.agent != null) { - if (typeof object.agent !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest.agent: object expected"); - message.agent = $root.google.cloud.dialogflow.cx.v3beta1.Agent.fromObject(object.agent); - } + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); return message; }; /** - * Creates a plain object from a CreateAgentRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListWebhooksRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest} message CreateAgentRequest + * @param {google.cloud.dialogflow.cx.v3.ListWebhooksRequest} message ListWebhooksRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateAgentRequest.toObject = function toObject(message, options) { + ListWebhooksRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.parent = ""; - object.agent = null; + object.pageSize = 0; + object.pageToken = ""; } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; - if (message.agent != null && message.hasOwnProperty("agent")) - object.agent = $root.google.cloud.dialogflow.cx.v3beta1.Agent.toObject(message.agent, options); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; return object; }; /** - * Converts this CreateAgentRequest to JSON. + * Converts this ListWebhooksRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksRequest * @instance * @returns {Object.} JSON object */ - CreateAgentRequest.prototype.toJSON = function toJSON() { + ListWebhooksRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CreateAgentRequest; + return ListWebhooksRequest; })(); - v3beta1.UpdateAgentRequest = (function() { + v3.ListWebhooksResponse = (function() { /** - * Properties of an UpdateAgentRequest. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IUpdateAgentRequest - * @property {google.cloud.dialogflow.cx.v3beta1.IAgent|null} [agent] UpdateAgentRequest agent - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateAgentRequest updateMask + * Properties of a ListWebhooksResponse. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IListWebhooksResponse + * @property {Array.|null} [webhooks] ListWebhooksResponse webhooks + * @property {string|null} [nextPageToken] ListWebhooksResponse nextPageToken */ /** - * Constructs a new UpdateAgentRequest. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents an UpdateAgentRequest. - * @implements IUpdateAgentRequest + * Constructs a new ListWebhooksResponse. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a ListWebhooksResponse. + * @implements IListWebhooksResponse * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateAgentRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IListWebhooksResponse=} [properties] Properties to set */ - function UpdateAgentRequest(properties) { + function ListWebhooksResponse(properties) { + this.webhooks = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -41184,88 +40241,91 @@ } /** - * UpdateAgentRequest agent. - * @member {google.cloud.dialogflow.cx.v3beta1.IAgent|null|undefined} agent - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest + * ListWebhooksResponse webhooks. + * @member {Array.} webhooks + * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksResponse * @instance */ - UpdateAgentRequest.prototype.agent = null; + ListWebhooksResponse.prototype.webhooks = $util.emptyArray; /** - * UpdateAgentRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest + * ListWebhooksResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksResponse * @instance */ - UpdateAgentRequest.prototype.updateMask = null; + ListWebhooksResponse.prototype.nextPageToken = ""; /** - * Creates a new UpdateAgentRequest instance using the specified properties. + * Creates a new ListWebhooksResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateAgentRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest} UpdateAgentRequest instance + * @param {google.cloud.dialogflow.cx.v3.IListWebhooksResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ListWebhooksResponse} ListWebhooksResponse instance */ - UpdateAgentRequest.create = function create(properties) { - return new UpdateAgentRequest(properties); + ListWebhooksResponse.create = function create(properties) { + return new ListWebhooksResponse(properties); }; /** - * Encodes the specified UpdateAgentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest.verify|verify} messages. + * Encodes the specified ListWebhooksResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListWebhooksResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateAgentRequest} message UpdateAgentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListWebhooksResponse} message ListWebhooksResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateAgentRequest.encode = function encode(message, writer) { + ListWebhooksResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.agent != null && Object.hasOwnProperty.call(message, "agent")) - $root.google.cloud.dialogflow.cx.v3beta1.Agent.encode(message.agent, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.webhooks != null && message.webhooks.length) + for (var i = 0; i < message.webhooks.length; ++i) + $root.google.cloud.dialogflow.cx.v3.Webhook.encode(message.webhooks[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified UpdateAgentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest.verify|verify} messages. + * Encodes the specified ListWebhooksResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListWebhooksResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateAgentRequest} message UpdateAgentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListWebhooksResponse} message ListWebhooksResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateAgentRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListWebhooksResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateAgentRequest message from the specified reader or buffer. + * Decodes a ListWebhooksResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest} UpdateAgentRequest + * @returns {google.cloud.dialogflow.cx.v3.ListWebhooksResponse} ListWebhooksResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateAgentRequest.decode = function decode(reader, length) { + ListWebhooksResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ListWebhooksResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.agent = $root.google.cloud.dialogflow.cx.v3beta1.Agent.decode(reader, reader.uint32()); + if (!(message.webhooks && message.webhooks.length)) + message.webhooks = []; + message.webhooks.push($root.google.cloud.dialogflow.cx.v3.Webhook.decode(reader, reader.uint32())); break; case 2: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.nextPageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -41276,126 +40336,133 @@ }; /** - * Decodes an UpdateAgentRequest message from the specified reader or buffer, length delimited. + * Decodes a ListWebhooksResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest} UpdateAgentRequest + * @returns {google.cloud.dialogflow.cx.v3.ListWebhooksResponse} ListWebhooksResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateAgentRequest.decodeDelimited = function decodeDelimited(reader) { + ListWebhooksResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateAgentRequest message. + * Verifies a ListWebhooksResponse message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateAgentRequest.verify = function verify(message) { + ListWebhooksResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.agent != null && message.hasOwnProperty("agent")) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.Agent.verify(message.agent); - if (error) - return "agent." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; + if (message.webhooks != null && message.hasOwnProperty("webhooks")) { + if (!Array.isArray(message.webhooks)) + return "webhooks: array expected"; + for (var i = 0; i < message.webhooks.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.Webhook.verify(message.webhooks[i]); + if (error) + return "webhooks." + error; + } } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates an UpdateAgentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListWebhooksResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest} UpdateAgentRequest + * @returns {google.cloud.dialogflow.cx.v3.ListWebhooksResponse} ListWebhooksResponse */ - UpdateAgentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest) + ListWebhooksResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListWebhooksResponse) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest(); - if (object.agent != null) { - if (typeof object.agent !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest.agent: object expected"); - message.agent = $root.google.cloud.dialogflow.cx.v3beta1.Agent.fromObject(object.agent); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + var message = new $root.google.cloud.dialogflow.cx.v3.ListWebhooksResponse(); + if (object.webhooks) { + if (!Array.isArray(object.webhooks)) + throw TypeError(".google.cloud.dialogflow.cx.v3.ListWebhooksResponse.webhooks: array expected"); + message.webhooks = []; + for (var i = 0; i < object.webhooks.length; ++i) { + if (typeof object.webhooks[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.ListWebhooksResponse.webhooks: object expected"); + message.webhooks[i] = $root.google.cloud.dialogflow.cx.v3.Webhook.fromObject(object.webhooks[i]); + } } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from an UpdateAgentRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListWebhooksResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest} message UpdateAgentRequest + * @param {google.cloud.dialogflow.cx.v3.ListWebhooksResponse} message ListWebhooksResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateAgentRequest.toObject = function toObject(message, options) { + ListWebhooksResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.agent = null; - object.updateMask = null; + if (options.arrays || options.defaults) + object.webhooks = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.webhooks && message.webhooks.length) { + object.webhooks = []; + for (var j = 0; j < message.webhooks.length; ++j) + object.webhooks[j] = $root.google.cloud.dialogflow.cx.v3.Webhook.toObject(message.webhooks[j], options); } - if (message.agent != null && message.hasOwnProperty("agent")) - object.agent = $root.google.cloud.dialogflow.cx.v3beta1.Agent.toObject(message.agent, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this UpdateAgentRequest to JSON. + * Converts this ListWebhooksResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksResponse * @instance * @returns {Object.} JSON object */ - UpdateAgentRequest.prototype.toJSON = function toJSON() { + ListWebhooksResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UpdateAgentRequest; + return ListWebhooksResponse; })(); - v3beta1.DeleteAgentRequest = (function() { + v3.GetWebhookRequest = (function() { /** - * Properties of a DeleteAgentRequest. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IDeleteAgentRequest - * @property {string|null} [name] DeleteAgentRequest name + * Properties of a GetWebhookRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IGetWebhookRequest + * @property {string|null} [name] GetWebhookRequest name */ /** - * Constructs a new DeleteAgentRequest. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a DeleteAgentRequest. - * @implements IDeleteAgentRequest + * Constructs a new GetWebhookRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a GetWebhookRequest. + * @implements IGetWebhookRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteAgentRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IGetWebhookRequest=} [properties] Properties to set */ - function DeleteAgentRequest(properties) { + function GetWebhookRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -41403,35 +40470,35 @@ } /** - * DeleteAgentRequest name. + * GetWebhookRequest name. * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest + * @memberof google.cloud.dialogflow.cx.v3.GetWebhookRequest * @instance */ - DeleteAgentRequest.prototype.name = ""; + GetWebhookRequest.prototype.name = ""; /** - * Creates a new DeleteAgentRequest instance using the specified properties. + * Creates a new GetWebhookRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest + * @memberof google.cloud.dialogflow.cx.v3.GetWebhookRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteAgentRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest} DeleteAgentRequest instance + * @param {google.cloud.dialogflow.cx.v3.IGetWebhookRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.GetWebhookRequest} GetWebhookRequest instance */ - DeleteAgentRequest.create = function create(properties) { - return new DeleteAgentRequest(properties); + GetWebhookRequest.create = function create(properties) { + return new GetWebhookRequest(properties); }; /** - * Encodes the specified DeleteAgentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest.verify|verify} messages. + * Encodes the specified GetWebhookRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetWebhookRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest + * @memberof google.cloud.dialogflow.cx.v3.GetWebhookRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteAgentRequest} message DeleteAgentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IGetWebhookRequest} message GetWebhookRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteAgentRequest.encode = function encode(message, writer) { + GetWebhookRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) @@ -41440,33 +40507,33 @@ }; /** - * Encodes the specified DeleteAgentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest.verify|verify} messages. + * Encodes the specified GetWebhookRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetWebhookRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest + * @memberof google.cloud.dialogflow.cx.v3.GetWebhookRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteAgentRequest} message DeleteAgentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IGetWebhookRequest} message GetWebhookRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteAgentRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetWebhookRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteAgentRequest message from the specified reader or buffer. + * Decodes a GetWebhookRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest + * @memberof google.cloud.dialogflow.cx.v3.GetWebhookRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest} DeleteAgentRequest + * @returns {google.cloud.dialogflow.cx.v3.GetWebhookRequest} GetWebhookRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteAgentRequest.decode = function decode(reader, length) { + GetWebhookRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.GetWebhookRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -41482,30 +40549,30 @@ }; /** - * Decodes a DeleteAgentRequest message from the specified reader or buffer, length delimited. + * Decodes a GetWebhookRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest + * @memberof google.cloud.dialogflow.cx.v3.GetWebhookRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest} DeleteAgentRequest + * @returns {google.cloud.dialogflow.cx.v3.GetWebhookRequest} GetWebhookRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteAgentRequest.decodeDelimited = function decodeDelimited(reader) { + GetWebhookRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteAgentRequest message. + * Verifies a GetWebhookRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest + * @memberof google.cloud.dialogflow.cx.v3.GetWebhookRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteAgentRequest.verify = function verify(message) { + GetWebhookRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) @@ -41515,32 +40582,32 @@ }; /** - * Creates a DeleteAgentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetWebhookRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest + * @memberof google.cloud.dialogflow.cx.v3.GetWebhookRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest} DeleteAgentRequest + * @returns {google.cloud.dialogflow.cx.v3.GetWebhookRequest} GetWebhookRequest */ - DeleteAgentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest) + GetWebhookRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.GetWebhookRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest(); + var message = new $root.google.cloud.dialogflow.cx.v3.GetWebhookRequest(); if (object.name != null) message.name = String(object.name); return message; }; /** - * Creates a plain object from a DeleteAgentRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetWebhookRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest + * @memberof google.cloud.dialogflow.cx.v3.GetWebhookRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest} message DeleteAgentRequest + * @param {google.cloud.dialogflow.cx.v3.GetWebhookRequest} message GetWebhookRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteAgentRequest.toObject = function toObject(message, options) { + GetWebhookRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -41552,38 +40619,38 @@ }; /** - * Converts this DeleteAgentRequest to JSON. + * Converts this GetWebhookRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest + * @memberof google.cloud.dialogflow.cx.v3.GetWebhookRequest * @instance * @returns {Object.} JSON object */ - DeleteAgentRequest.prototype.toJSON = function toJSON() { + GetWebhookRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeleteAgentRequest; + return GetWebhookRequest; })(); - v3beta1.ExportAgentRequest = (function() { + v3.CreateWebhookRequest = (function() { /** - * Properties of an ExportAgentRequest. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IExportAgentRequest - * @property {string|null} [name] ExportAgentRequest name - * @property {string|null} [agentUri] ExportAgentRequest agentUri + * Properties of a CreateWebhookRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface ICreateWebhookRequest + * @property {string|null} [parent] CreateWebhookRequest parent + * @property {google.cloud.dialogflow.cx.v3.IWebhook|null} [webhook] CreateWebhookRequest webhook */ /** - * Constructs a new ExportAgentRequest. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents an ExportAgentRequest. - * @implements IExportAgentRequest + * Constructs a new CreateWebhookRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a CreateWebhookRequest. + * @implements ICreateWebhookRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IExportAgentRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.ICreateWebhookRequest=} [properties] Properties to set */ - function ExportAgentRequest(properties) { + function CreateWebhookRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -41591,88 +40658,88 @@ } /** - * ExportAgentRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest + * CreateWebhookRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3.CreateWebhookRequest * @instance */ - ExportAgentRequest.prototype.name = ""; + CreateWebhookRequest.prototype.parent = ""; /** - * ExportAgentRequest agentUri. - * @member {string} agentUri - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest + * CreateWebhookRequest webhook. + * @member {google.cloud.dialogflow.cx.v3.IWebhook|null|undefined} webhook + * @memberof google.cloud.dialogflow.cx.v3.CreateWebhookRequest * @instance */ - ExportAgentRequest.prototype.agentUri = ""; + CreateWebhookRequest.prototype.webhook = null; /** - * Creates a new ExportAgentRequest instance using the specified properties. + * Creates a new CreateWebhookRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateWebhookRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IExportAgentRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest} ExportAgentRequest instance + * @param {google.cloud.dialogflow.cx.v3.ICreateWebhookRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.CreateWebhookRequest} CreateWebhookRequest instance */ - ExportAgentRequest.create = function create(properties) { - return new ExportAgentRequest(properties); + CreateWebhookRequest.create = function create(properties) { + return new CreateWebhookRequest(properties); }; /** - * Encodes the specified ExportAgentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.verify|verify} messages. + * Encodes the specified CreateWebhookRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateWebhookRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateWebhookRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IExportAgentRequest} message ExportAgentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ICreateWebhookRequest} message CreateWebhookRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExportAgentRequest.encode = function encode(message, writer) { + CreateWebhookRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.agentUri != null && Object.hasOwnProperty.call(message, "agentUri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.agentUri); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.webhook != null && Object.hasOwnProperty.call(message, "webhook")) + $root.google.cloud.dialogflow.cx.v3.Webhook.encode(message.webhook, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified ExportAgentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.verify|verify} messages. + * Encodes the specified CreateWebhookRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateWebhookRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateWebhookRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IExportAgentRequest} message ExportAgentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ICreateWebhookRequest} message CreateWebhookRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExportAgentRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreateWebhookRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ExportAgentRequest message from the specified reader or buffer. + * Decodes a CreateWebhookRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateWebhookRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest} ExportAgentRequest + * @returns {google.cloud.dialogflow.cx.v3.CreateWebhookRequest} CreateWebhookRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExportAgentRequest.decode = function decode(reader, length) { + CreateWebhookRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.CreateWebhookRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.parent = reader.string(); break; case 2: - message.agentUri = reader.string(); + message.webhook = $root.google.cloud.dialogflow.cx.v3.Webhook.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -41683,117 +40750,122 @@ }; /** - * Decodes an ExportAgentRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateWebhookRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateWebhookRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest} ExportAgentRequest + * @returns {google.cloud.dialogflow.cx.v3.CreateWebhookRequest} CreateWebhookRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExportAgentRequest.decodeDelimited = function decodeDelimited(reader) { + CreateWebhookRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ExportAgentRequest message. + * Verifies a CreateWebhookRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateWebhookRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExportAgentRequest.verify = function verify(message) { + CreateWebhookRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.agentUri != null && message.hasOwnProperty("agentUri")) - if (!$util.isString(message.agentUri)) - return "agentUri: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.webhook != null && message.hasOwnProperty("webhook")) { + var error = $root.google.cloud.dialogflow.cx.v3.Webhook.verify(message.webhook); + if (error) + return "webhook." + error; + } return null; }; /** - * Creates an ExportAgentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateWebhookRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateWebhookRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest} ExportAgentRequest + * @returns {google.cloud.dialogflow.cx.v3.CreateWebhookRequest} CreateWebhookRequest */ - ExportAgentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest) + CreateWebhookRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.CreateWebhookRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.agentUri != null) - message.agentUri = String(object.agentUri); + var message = new $root.google.cloud.dialogflow.cx.v3.CreateWebhookRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.webhook != null) { + if (typeof object.webhook !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.CreateWebhookRequest.webhook: object expected"); + message.webhook = $root.google.cloud.dialogflow.cx.v3.Webhook.fromObject(object.webhook); + } return message; }; /** - * Creates a plain object from an ExportAgentRequest message. Also converts values to other types if specified. + * Creates a plain object from a CreateWebhookRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateWebhookRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest} message ExportAgentRequest + * @param {google.cloud.dialogflow.cx.v3.CreateWebhookRequest} message CreateWebhookRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExportAgentRequest.toObject = function toObject(message, options) { + CreateWebhookRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.agentUri = ""; + object.parent = ""; + object.webhook = null; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.agentUri != null && message.hasOwnProperty("agentUri")) - object.agentUri = message.agentUri; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.webhook != null && message.hasOwnProperty("webhook")) + object.webhook = $root.google.cloud.dialogflow.cx.v3.Webhook.toObject(message.webhook, options); return object; }; /** - * Converts this ExportAgentRequest to JSON. + * Converts this CreateWebhookRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateWebhookRequest * @instance * @returns {Object.} JSON object */ - ExportAgentRequest.prototype.toJSON = function toJSON() { + CreateWebhookRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ExportAgentRequest; + return CreateWebhookRequest; })(); - v3beta1.ExportAgentResponse = (function() { + v3.UpdateWebhookRequest = (function() { /** - * Properties of an ExportAgentResponse. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IExportAgentResponse - * @property {string|null} [agentUri] ExportAgentResponse agentUri - * @property {Uint8Array|null} [agentContent] ExportAgentResponse agentContent + * Properties of an UpdateWebhookRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IUpdateWebhookRequest + * @property {google.cloud.dialogflow.cx.v3.IWebhook|null} [webhook] UpdateWebhookRequest webhook + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateWebhookRequest updateMask */ /** - * Constructs a new ExportAgentResponse. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents an ExportAgentResponse. - * @implements IExportAgentResponse + * Constructs a new UpdateWebhookRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents an UpdateWebhookRequest. + * @implements IUpdateWebhookRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IExportAgentResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IUpdateWebhookRequest=} [properties] Properties to set */ - function ExportAgentResponse(properties) { + function UpdateWebhookRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -41801,102 +40873,88 @@ } /** - * ExportAgentResponse agentUri. - * @member {string} agentUri - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse - * @instance - */ - ExportAgentResponse.prototype.agentUri = ""; - - /** - * ExportAgentResponse agentContent. - * @member {Uint8Array} agentContent - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse + * UpdateWebhookRequest webhook. + * @member {google.cloud.dialogflow.cx.v3.IWebhook|null|undefined} webhook + * @memberof google.cloud.dialogflow.cx.v3.UpdateWebhookRequest * @instance */ - ExportAgentResponse.prototype.agentContent = $util.newBuffer([]); - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + UpdateWebhookRequest.prototype.webhook = null; /** - * ExportAgentResponse agent. - * @member {"agentUri"|"agentContent"|undefined} agent - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse + * UpdateWebhookRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dialogflow.cx.v3.UpdateWebhookRequest * @instance */ - Object.defineProperty(ExportAgentResponse.prototype, "agent", { - get: $util.oneOfGetter($oneOfFields = ["agentUri", "agentContent"]), - set: $util.oneOfSetter($oneOfFields) - }); + UpdateWebhookRequest.prototype.updateMask = null; /** - * Creates a new ExportAgentResponse instance using the specified properties. + * Creates a new UpdateWebhookRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse + * @memberof google.cloud.dialogflow.cx.v3.UpdateWebhookRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IExportAgentResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse} ExportAgentResponse instance + * @param {google.cloud.dialogflow.cx.v3.IUpdateWebhookRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.UpdateWebhookRequest} UpdateWebhookRequest instance */ - ExportAgentResponse.create = function create(properties) { - return new ExportAgentResponse(properties); + UpdateWebhookRequest.create = function create(properties) { + return new UpdateWebhookRequest(properties); }; /** - * Encodes the specified ExportAgentResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse.verify|verify} messages. + * Encodes the specified UpdateWebhookRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateWebhookRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse + * @memberof google.cloud.dialogflow.cx.v3.UpdateWebhookRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IExportAgentResponse} message ExportAgentResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IUpdateWebhookRequest} message UpdateWebhookRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExportAgentResponse.encode = function encode(message, writer) { + UpdateWebhookRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.agentUri != null && Object.hasOwnProperty.call(message, "agentUri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.agentUri); - if (message.agentContent != null && Object.hasOwnProperty.call(message, "agentContent")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.agentContent); + if (message.webhook != null && Object.hasOwnProperty.call(message, "webhook")) + $root.google.cloud.dialogflow.cx.v3.Webhook.encode(message.webhook, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified ExportAgentResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse.verify|verify} messages. + * Encodes the specified UpdateWebhookRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateWebhookRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse + * @memberof google.cloud.dialogflow.cx.v3.UpdateWebhookRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IExportAgentResponse} message ExportAgentResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IUpdateWebhookRequest} message UpdateWebhookRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExportAgentResponse.encodeDelimited = function encodeDelimited(message, writer) { + UpdateWebhookRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ExportAgentResponse message from the specified reader or buffer. + * Decodes an UpdateWebhookRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse + * @memberof google.cloud.dialogflow.cx.v3.UpdateWebhookRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse} ExportAgentResponse + * @returns {google.cloud.dialogflow.cx.v3.UpdateWebhookRequest} UpdateWebhookRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExportAgentResponse.decode = function decode(reader, length) { + UpdateWebhookRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.UpdateWebhookRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.agentUri = reader.string(); + message.webhook = $root.google.cloud.dialogflow.cx.v3.Webhook.decode(reader, reader.uint32()); break; case 2: - message.agentContent = reader.bytes(); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -41907,130 +40965,127 @@ }; /** - * Decodes an ExportAgentResponse message from the specified reader or buffer, length delimited. + * Decodes an UpdateWebhookRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse + * @memberof google.cloud.dialogflow.cx.v3.UpdateWebhookRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse} ExportAgentResponse + * @returns {google.cloud.dialogflow.cx.v3.UpdateWebhookRequest} UpdateWebhookRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExportAgentResponse.decodeDelimited = function decodeDelimited(reader) { + UpdateWebhookRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ExportAgentResponse message. + * Verifies an UpdateWebhookRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse + * @memberof google.cloud.dialogflow.cx.v3.UpdateWebhookRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExportAgentResponse.verify = function verify(message) { + UpdateWebhookRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.agentUri != null && message.hasOwnProperty("agentUri")) { - properties.agent = 1; - if (!$util.isString(message.agentUri)) - return "agentUri: string expected"; + if (message.webhook != null && message.hasOwnProperty("webhook")) { + var error = $root.google.cloud.dialogflow.cx.v3.Webhook.verify(message.webhook); + if (error) + return "webhook." + error; } - if (message.agentContent != null && message.hasOwnProperty("agentContent")) { - if (properties.agent === 1) - return "agent: multiple values"; - properties.agent = 1; - if (!(message.agentContent && typeof message.agentContent.length === "number" || $util.isString(message.agentContent))) - return "agentContent: buffer expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; } return null; }; /** - * Creates an ExportAgentResponse message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateWebhookRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse + * @memberof google.cloud.dialogflow.cx.v3.UpdateWebhookRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse} ExportAgentResponse + * @returns {google.cloud.dialogflow.cx.v3.UpdateWebhookRequest} UpdateWebhookRequest */ - ExportAgentResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse) + UpdateWebhookRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.UpdateWebhookRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse(); - if (object.agentUri != null) - message.agentUri = String(object.agentUri); - if (object.agentContent != null) - if (typeof object.agentContent === "string") - $util.base64.decode(object.agentContent, message.agentContent = $util.newBuffer($util.base64.length(object.agentContent)), 0); - else if (object.agentContent.length) - message.agentContent = object.agentContent; + var message = new $root.google.cloud.dialogflow.cx.v3.UpdateWebhookRequest(); + if (object.webhook != null) { + if (typeof object.webhook !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.UpdateWebhookRequest.webhook: object expected"); + message.webhook = $root.google.cloud.dialogflow.cx.v3.Webhook.fromObject(object.webhook); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.UpdateWebhookRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } return message; }; /** - * Creates a plain object from an ExportAgentResponse message. Also converts values to other types if specified. + * Creates a plain object from an UpdateWebhookRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse + * @memberof google.cloud.dialogflow.cx.v3.UpdateWebhookRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse} message ExportAgentResponse + * @param {google.cloud.dialogflow.cx.v3.UpdateWebhookRequest} message UpdateWebhookRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExportAgentResponse.toObject = function toObject(message, options) { + UpdateWebhookRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.agentUri != null && message.hasOwnProperty("agentUri")) { - object.agentUri = message.agentUri; - if (options.oneofs) - object.agent = "agentUri"; - } - if (message.agentContent != null && message.hasOwnProperty("agentContent")) { - object.agentContent = options.bytes === String ? $util.base64.encode(message.agentContent, 0, message.agentContent.length) : options.bytes === Array ? Array.prototype.slice.call(message.agentContent) : message.agentContent; - if (options.oneofs) - object.agent = "agentContent"; + if (options.defaults) { + object.webhook = null; + object.updateMask = null; } + if (message.webhook != null && message.hasOwnProperty("webhook")) + object.webhook = $root.google.cloud.dialogflow.cx.v3.Webhook.toObject(message.webhook, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this ExportAgentResponse to JSON. + * Converts this UpdateWebhookRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse + * @memberof google.cloud.dialogflow.cx.v3.UpdateWebhookRequest * @instance * @returns {Object.} JSON object */ - ExportAgentResponse.prototype.toJSON = function toJSON() { + UpdateWebhookRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ExportAgentResponse; + return UpdateWebhookRequest; })(); - v3beta1.RestoreAgentRequest = (function() { + v3.DeleteWebhookRequest = (function() { /** - * Properties of a RestoreAgentRequest. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IRestoreAgentRequest - * @property {string|null} [name] RestoreAgentRequest name - * @property {string|null} [agentUri] RestoreAgentRequest agentUri - * @property {Uint8Array|null} [agentContent] RestoreAgentRequest agentContent + * Properties of a DeleteWebhookRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IDeleteWebhookRequest + * @property {string|null} [name] DeleteWebhookRequest name + * @property {boolean|null} [force] DeleteWebhookRequest force */ /** - * Constructs a new RestoreAgentRequest. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a RestoreAgentRequest. - * @implements IRestoreAgentRequest + * Constructs a new DeleteWebhookRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a DeleteWebhookRequest. + * @implements IDeleteWebhookRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IRestoreAgentRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IDeleteWebhookRequest=} [properties] Properties to set */ - function RestoreAgentRequest(properties) { + function DeleteWebhookRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -42038,104 +41093,80 @@ } /** - * RestoreAgentRequest name. + * DeleteWebhookRequest name. * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest - * @instance - */ - RestoreAgentRequest.prototype.name = ""; - - /** - * RestoreAgentRequest agentUri. - * @member {string} agentUri - * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest - * @instance - */ - RestoreAgentRequest.prototype.agentUri = ""; - - /** - * RestoreAgentRequest agentContent. - * @member {Uint8Array} agentContent - * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteWebhookRequest * @instance */ - RestoreAgentRequest.prototype.agentContent = $util.newBuffer([]); - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + DeleteWebhookRequest.prototype.name = ""; /** - * RestoreAgentRequest agent. - * @member {"agentUri"|"agentContent"|undefined} agent - * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest + * DeleteWebhookRequest force. + * @member {boolean} force + * @memberof google.cloud.dialogflow.cx.v3.DeleteWebhookRequest * @instance */ - Object.defineProperty(RestoreAgentRequest.prototype, "agent", { - get: $util.oneOfGetter($oneOfFields = ["agentUri", "agentContent"]), - set: $util.oneOfSetter($oneOfFields) - }); + DeleteWebhookRequest.prototype.force = false; /** - * Creates a new RestoreAgentRequest instance using the specified properties. + * Creates a new DeleteWebhookRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteWebhookRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IRestoreAgentRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest} RestoreAgentRequest instance + * @param {google.cloud.dialogflow.cx.v3.IDeleteWebhookRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.DeleteWebhookRequest} DeleteWebhookRequest instance */ - RestoreAgentRequest.create = function create(properties) { - return new RestoreAgentRequest(properties); + DeleteWebhookRequest.create = function create(properties) { + return new DeleteWebhookRequest(properties); }; /** - * Encodes the specified RestoreAgentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.verify|verify} messages. + * Encodes the specified DeleteWebhookRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteWebhookRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteWebhookRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IRestoreAgentRequest} message RestoreAgentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IDeleteWebhookRequest} message DeleteWebhookRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RestoreAgentRequest.encode = function encode(message, writer) { + DeleteWebhookRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.agentUri != null && Object.hasOwnProperty.call(message, "agentUri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.agentUri); - if (message.agentContent != null && Object.hasOwnProperty.call(message, "agentContent")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.agentContent); + if (message.force != null && Object.hasOwnProperty.call(message, "force")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.force); return writer; }; /** - * Encodes the specified RestoreAgentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.verify|verify} messages. + * Encodes the specified DeleteWebhookRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteWebhookRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteWebhookRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IRestoreAgentRequest} message RestoreAgentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IDeleteWebhookRequest} message DeleteWebhookRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RestoreAgentRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeleteWebhookRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RestoreAgentRequest message from the specified reader or buffer. + * Decodes a DeleteWebhookRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteWebhookRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest} RestoreAgentRequest + * @returns {google.cloud.dialogflow.cx.v3.DeleteWebhookRequest} DeleteWebhookRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RestoreAgentRequest.decode = function decode(reader, length) { + DeleteWebhookRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.DeleteWebhookRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -42143,10 +41174,7 @@ message.name = reader.string(); break; case 2: - message.agentUri = reader.string(); - break; - case 3: - message.agentContent = reader.bytes(); + message.force = reader.bool(); break; default: reader.skipType(tag & 7); @@ -42157,474 +41185,280 @@ }; /** - * Decodes a RestoreAgentRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteWebhookRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteWebhookRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest} RestoreAgentRequest + * @returns {google.cloud.dialogflow.cx.v3.DeleteWebhookRequest} DeleteWebhookRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RestoreAgentRequest.decodeDelimited = function decodeDelimited(reader) { + DeleteWebhookRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RestoreAgentRequest message. + * Verifies a DeleteWebhookRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteWebhookRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RestoreAgentRequest.verify = function verify(message) { + DeleteWebhookRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.agentUri != null && message.hasOwnProperty("agentUri")) { - properties.agent = 1; - if (!$util.isString(message.agentUri)) - return "agentUri: string expected"; - } - if (message.agentContent != null && message.hasOwnProperty("agentContent")) { - if (properties.agent === 1) - return "agent: multiple values"; - properties.agent = 1; - if (!(message.agentContent && typeof message.agentContent.length === "number" || $util.isString(message.agentContent))) - return "agentContent: buffer expected"; - } + if (message.force != null && message.hasOwnProperty("force")) + if (typeof message.force !== "boolean") + return "force: boolean expected"; return null; }; /** - * Creates a RestoreAgentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteWebhookRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteWebhookRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest} RestoreAgentRequest + * @returns {google.cloud.dialogflow.cx.v3.DeleteWebhookRequest} DeleteWebhookRequest */ - RestoreAgentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest) + DeleteWebhookRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.DeleteWebhookRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest(); + var message = new $root.google.cloud.dialogflow.cx.v3.DeleteWebhookRequest(); if (object.name != null) message.name = String(object.name); - if (object.agentUri != null) - message.agentUri = String(object.agentUri); - if (object.agentContent != null) - if (typeof object.agentContent === "string") - $util.base64.decode(object.agentContent, message.agentContent = $util.newBuffer($util.base64.length(object.agentContent)), 0); - else if (object.agentContent.length) - message.agentContent = object.agentContent; + if (object.force != null) + message.force = Boolean(object.force); return message; }; /** - * Creates a plain object from a RestoreAgentRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeleteWebhookRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteWebhookRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest} message RestoreAgentRequest + * @param {google.cloud.dialogflow.cx.v3.DeleteWebhookRequest} message DeleteWebhookRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RestoreAgentRequest.toObject = function toObject(message, options) { + DeleteWebhookRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.name = ""; + object.force = false; + } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.agentUri != null && message.hasOwnProperty("agentUri")) { - object.agentUri = message.agentUri; - if (options.oneofs) - object.agent = "agentUri"; - } - if (message.agentContent != null && message.hasOwnProperty("agentContent")) { - object.agentContent = options.bytes === String ? $util.base64.encode(message.agentContent, 0, message.agentContent.length) : options.bytes === Array ? Array.prototype.slice.call(message.agentContent) : message.agentContent; - if (options.oneofs) - object.agent = "agentContent"; - } + if (message.force != null && message.hasOwnProperty("force")) + object.force = message.force; return object; }; /** - * Converts this RestoreAgentRequest to JSON. + * Converts this DeleteWebhookRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteWebhookRequest * @instance * @returns {Object.} JSON object */ - RestoreAgentRequest.prototype.toJSON = function toJSON() { + DeleteWebhookRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return RestoreAgentRequest; + return DeleteWebhookRequest; })(); - v3beta1.Flows = (function() { + v3.WebhookRequest = (function() { /** - * Constructs a new Flows service. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a Flows - * @extends $protobuf.rpc.Service + * Properties of a WebhookRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IWebhookRequest + * @property {string|null} [detectIntentResponseId] WebhookRequest detectIntentResponseId + * @property {google.cloud.dialogflow.cx.v3.WebhookRequest.IFulfillmentInfo|null} [fulfillmentInfo] WebhookRequest fulfillmentInfo + * @property {google.cloud.dialogflow.cx.v3.WebhookRequest.IIntentInfo|null} [intentInfo] WebhookRequest intentInfo + * @property {google.cloud.dialogflow.cx.v3.IPageInfo|null} [pageInfo] WebhookRequest pageInfo + * @property {google.cloud.dialogflow.cx.v3.ISessionInfo|null} [sessionInfo] WebhookRequest sessionInfo + * @property {Array.|null} [messages] WebhookRequest messages + * @property {google.protobuf.IStruct|null} [payload] WebhookRequest payload + */ + + /** + * Constructs a new WebhookRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a WebhookRequest. + * @implements IWebhookRequest * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @param {google.cloud.dialogflow.cx.v3.IWebhookRequest=} [properties] Properties to set */ - function Flows(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + function WebhookRequest(properties) { + this.messages = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - (Flows.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Flows; - /** - * Creates new Flows service using the specified rpc implementation. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.Flows - * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {Flows} RPC service. Useful where requests and/or responses are streamed. + * WebhookRequest detectIntentResponseId. + * @member {string} detectIntentResponseId + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest + * @instance */ - Flows.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; + WebhookRequest.prototype.detectIntentResponseId = ""; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows#createFlow}. - * @memberof google.cloud.dialogflow.cx.v3beta1.Flows - * @typedef CreateFlowCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3beta1.Flow} [response] Flow + * WebhookRequest fulfillmentInfo. + * @member {google.cloud.dialogflow.cx.v3.WebhookRequest.IFulfillmentInfo|null|undefined} fulfillmentInfo + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest + * @instance */ + WebhookRequest.prototype.fulfillmentInfo = null; /** - * Calls CreateFlow. - * @function createFlow - * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * WebhookRequest intentInfo. + * @member {google.cloud.dialogflow.cx.v3.WebhookRequest.IIntentInfo|null|undefined} intentInfo + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.ICreateFlowRequest} request CreateFlowRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.Flows.CreateFlowCallback} callback Node-style callback called with the error, if any, and Flow - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(Flows.prototype.createFlow = function createFlow(request, callback) { - return this.rpcCall(createFlow, $root.google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest, $root.google.cloud.dialogflow.cx.v3beta1.Flow, request, callback); - }, "name", { value: "CreateFlow" }); + WebhookRequest.prototype.intentInfo = null; /** - * Calls CreateFlow. - * @function createFlow - * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * WebhookRequest pageInfo. + * @member {google.cloud.dialogflow.cx.v3.IPageInfo|null|undefined} pageInfo + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.ICreateFlowRequest} request CreateFlowRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + WebhookRequest.prototype.pageInfo = null; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows#deleteFlow}. - * @memberof google.cloud.dialogflow.cx.v3beta1.Flows - * @typedef DeleteFlowCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty + * WebhookRequest sessionInfo. + * @member {google.cloud.dialogflow.cx.v3.ISessionInfo|null|undefined} sessionInfo + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest + * @instance */ + WebhookRequest.prototype.sessionInfo = null; /** - * Calls DeleteFlow. - * @function deleteFlow - * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * WebhookRequest messages. + * @member {Array.} messages + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteFlowRequest} request DeleteFlowRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.Flows.DeleteFlowCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(Flows.prototype.deleteFlow = function deleteFlow(request, callback) { - return this.rpcCall(deleteFlow, $root.google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteFlow" }); + WebhookRequest.prototype.messages = $util.emptyArray; /** - * Calls DeleteFlow. - * @function deleteFlow - * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * WebhookRequest payload. + * @member {google.protobuf.IStruct|null|undefined} payload + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteFlowRequest} request DeleteFlowRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + WebhookRequest.prototype.payload = null; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows#listFlows}. - * @memberof google.cloud.dialogflow.cx.v3beta1.Flows - * @typedef ListFlowsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse} [response] ListFlowsResponse + * Creates a new WebhookRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IWebhookRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.WebhookRequest} WebhookRequest instance */ + WebhookRequest.create = function create(properties) { + return new WebhookRequest(properties); + }; /** - * Calls ListFlows. - * @function listFlows - * @memberof google.cloud.dialogflow.cx.v3beta1.Flows - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IListFlowsRequest} request ListFlowsRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.Flows.ListFlowsCallback} callback Node-style callback called with the error, if any, and ListFlowsResponse - * @returns {undefined} - * @variation 1 + * Encodes the specified WebhookRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.WebhookRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IWebhookRequest} message WebhookRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(Flows.prototype.listFlows = function listFlows(request, callback) { - return this.rpcCall(listFlows, $root.google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest, $root.google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse, request, callback); - }, "name", { value: "ListFlows" }); + WebhookRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.detectIntentResponseId != null && Object.hasOwnProperty.call(message, "detectIntentResponseId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.detectIntentResponseId); + if (message.intentInfo != null && Object.hasOwnProperty.call(message, "intentInfo")) + $root.google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.encode(message.intentInfo, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.pageInfo != null && Object.hasOwnProperty.call(message, "pageInfo")) + $root.google.cloud.dialogflow.cx.v3.PageInfo.encode(message.pageInfo, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.sessionInfo != null && Object.hasOwnProperty.call(message, "sessionInfo")) + $root.google.cloud.dialogflow.cx.v3.SessionInfo.encode(message.sessionInfo, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.fulfillmentInfo != null && Object.hasOwnProperty.call(message, "fulfillmentInfo")) + $root.google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo.encode(message.fulfillmentInfo, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.messages != null && message.messages.length) + for (var i = 0; i < message.messages.length; ++i) + $root.google.cloud.dialogflow.cx.v3.ResponseMessage.encode(message.messages[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.payload != null && Object.hasOwnProperty.call(message, "payload")) + $root.google.protobuf.Struct.encode(message.payload, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + return writer; + }; /** - * Calls ListFlows. - * @function listFlows - * @memberof google.cloud.dialogflow.cx.v3beta1.Flows - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IListFlowsRequest} request ListFlowsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Encodes the specified WebhookRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.WebhookRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IWebhookRequest} message WebhookRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + WebhookRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows#getFlow}. - * @memberof google.cloud.dialogflow.cx.v3beta1.Flows - * @typedef GetFlowCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3beta1.Flow} [response] Flow - */ - - /** - * Calls GetFlow. - * @function getFlow - * @memberof google.cloud.dialogflow.cx.v3beta1.Flows - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IGetFlowRequest} request GetFlowRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.Flows.GetFlowCallback} callback Node-style callback called with the error, if any, and Flow - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Flows.prototype.getFlow = function getFlow(request, callback) { - return this.rpcCall(getFlow, $root.google.cloud.dialogflow.cx.v3beta1.GetFlowRequest, $root.google.cloud.dialogflow.cx.v3beta1.Flow, request, callback); - }, "name", { value: "GetFlow" }); - - /** - * Calls GetFlow. - * @function getFlow - * @memberof google.cloud.dialogflow.cx.v3beta1.Flows - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IGetFlowRequest} request GetFlowRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows#updateFlow}. - * @memberof google.cloud.dialogflow.cx.v3beta1.Flows - * @typedef UpdateFlowCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3beta1.Flow} [response] Flow - */ - - /** - * Calls UpdateFlow. - * @function updateFlow - * @memberof google.cloud.dialogflow.cx.v3beta1.Flows - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateFlowRequest} request UpdateFlowRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.Flows.UpdateFlowCallback} callback Node-style callback called with the error, if any, and Flow - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Flows.prototype.updateFlow = function updateFlow(request, callback) { - return this.rpcCall(updateFlow, $root.google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest, $root.google.cloud.dialogflow.cx.v3beta1.Flow, request, callback); - }, "name", { value: "UpdateFlow" }); - - /** - * Calls UpdateFlow. - * @function updateFlow - * @memberof google.cloud.dialogflow.cx.v3beta1.Flows - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateFlowRequest} request UpdateFlowRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows#trainFlow}. - * @memberof google.cloud.dialogflow.cx.v3beta1.Flows - * @typedef TrainFlowCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls TrainFlow. - * @function trainFlow - * @memberof google.cloud.dialogflow.cx.v3beta1.Flows - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.ITrainFlowRequest} request TrainFlowRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.Flows.TrainFlowCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Flows.prototype.trainFlow = function trainFlow(request, callback) { - return this.rpcCall(trainFlow, $root.google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "TrainFlow" }); - - /** - * Calls TrainFlow. - * @function trainFlow - * @memberof google.cloud.dialogflow.cx.v3beta1.Flows - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.ITrainFlowRequest} request TrainFlowRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Flows; - })(); - - v3beta1.NluSettings = (function() { - - /** - * Properties of a NluSettings. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface INluSettings - * @property {google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelType|null} [modelType] NluSettings modelType - * @property {number|null} [classificationThreshold] NluSettings classificationThreshold - * @property {google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelTrainingMode|null} [modelTrainingMode] NluSettings modelTrainingMode - */ - - /** - * Constructs a new NluSettings. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a NluSettings. - * @implements INluSettings - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.INluSettings=} [properties] Properties to set - */ - function NluSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NluSettings modelType. - * @member {google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelType} modelType - * @memberof google.cloud.dialogflow.cx.v3beta1.NluSettings - * @instance - */ - NluSettings.prototype.modelType = 0; - - /** - * NluSettings classificationThreshold. - * @member {number} classificationThreshold - * @memberof google.cloud.dialogflow.cx.v3beta1.NluSettings - * @instance - */ - NluSettings.prototype.classificationThreshold = 0; - - /** - * NluSettings modelTrainingMode. - * @member {google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelTrainingMode} modelTrainingMode - * @memberof google.cloud.dialogflow.cx.v3beta1.NluSettings - * @instance - */ - NluSettings.prototype.modelTrainingMode = 0; - - /** - * Creates a new NluSettings instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.NluSettings - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.INluSettings=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.NluSettings} NluSettings instance - */ - NluSettings.create = function create(properties) { - return new NluSettings(properties); - }; - - /** - * Encodes the specified NluSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.NluSettings.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.NluSettings - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.INluSettings} message NluSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NluSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.modelType != null && Object.hasOwnProperty.call(message, "modelType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.modelType); - if (message.classificationThreshold != null && Object.hasOwnProperty.call(message, "classificationThreshold")) - writer.uint32(/* id 3, wireType 5 =*/29).float(message.classificationThreshold); - if (message.modelTrainingMode != null && Object.hasOwnProperty.call(message, "modelTrainingMode")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.modelTrainingMode); - return writer; - }; - - /** - * Encodes the specified NluSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.NluSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.NluSettings - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.INluSettings} message NluSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NluSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NluSettings message from the specified reader or buffer. + * Decodes a WebhookRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.NluSettings + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.NluSettings} NluSettings + * @returns {google.cloud.dialogflow.cx.v3.WebhookRequest} WebhookRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NluSettings.decode = function decode(reader, length) { + WebhookRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.NluSettings(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.WebhookRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.modelType = reader.int32(); + message.detectIntentResponseId = reader.string(); + break; + case 6: + message.fulfillmentInfo = $root.google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo.decode(reader, reader.uint32()); break; case 3: - message.classificationThreshold = reader.float(); + message.intentInfo = $root.google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.decode(reader, reader.uint32()); break; case 4: - message.modelTrainingMode = reader.int32(); + message.pageInfo = $root.google.cloud.dialogflow.cx.v3.PageInfo.decode(reader, reader.uint32()); + break; + case 5: + message.sessionInfo = $root.google.cloud.dialogflow.cx.v3.SessionInfo.decode(reader, reader.uint32()); + break; + case 7: + if (!(message.messages && message.messages.length)) + message.messages = []; + message.messages.push($root.google.cloud.dialogflow.cx.v3.ResponseMessage.decode(reader, reader.uint32())); + break; + case 8: + message.payload = $root.google.protobuf.Struct.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -42635,541 +41469,858 @@ }; /** - * Decodes a NluSettings message from the specified reader or buffer, length delimited. + * Decodes a WebhookRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.NluSettings + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.NluSettings} NluSettings + * @returns {google.cloud.dialogflow.cx.v3.WebhookRequest} WebhookRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NluSettings.decodeDelimited = function decodeDelimited(reader) { + WebhookRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a NluSettings message. + * Verifies a WebhookRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.NluSettings + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - NluSettings.verify = function verify(message) { + WebhookRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.modelType != null && message.hasOwnProperty("modelType")) - switch (message.modelType) { - default: - return "modelType: enum value expected"; - case 0: - case 1: - case 3: - break; - } - if (message.classificationThreshold != null && message.hasOwnProperty("classificationThreshold")) - if (typeof message.classificationThreshold !== "number") - return "classificationThreshold: number expected"; - if (message.modelTrainingMode != null && message.hasOwnProperty("modelTrainingMode")) - switch (message.modelTrainingMode) { - default: - return "modelTrainingMode: enum value expected"; - case 0: - case 1: - case 2: - break; + if (message.detectIntentResponseId != null && message.hasOwnProperty("detectIntentResponseId")) + if (!$util.isString(message.detectIntentResponseId)) + return "detectIntentResponseId: string expected"; + if (message.fulfillmentInfo != null && message.hasOwnProperty("fulfillmentInfo")) { + var error = $root.google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo.verify(message.fulfillmentInfo); + if (error) + return "fulfillmentInfo." + error; + } + if (message.intentInfo != null && message.hasOwnProperty("intentInfo")) { + var error = $root.google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.verify(message.intentInfo); + if (error) + return "intentInfo." + error; + } + if (message.pageInfo != null && message.hasOwnProperty("pageInfo")) { + var error = $root.google.cloud.dialogflow.cx.v3.PageInfo.verify(message.pageInfo); + if (error) + return "pageInfo." + error; + } + if (message.sessionInfo != null && message.hasOwnProperty("sessionInfo")) { + var error = $root.google.cloud.dialogflow.cx.v3.SessionInfo.verify(message.sessionInfo); + if (error) + return "sessionInfo." + error; + } + if (message.messages != null && message.hasOwnProperty("messages")) { + if (!Array.isArray(message.messages)) + return "messages: array expected"; + for (var i = 0; i < message.messages.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.verify(message.messages[i]); + if (error) + return "messages." + error; } + } + if (message.payload != null && message.hasOwnProperty("payload")) { + var error = $root.google.protobuf.Struct.verify(message.payload); + if (error) + return "payload." + error; + } return null; }; /** - * Creates a NluSettings message from a plain object. Also converts values to their respective internal types. + * Creates a WebhookRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.NluSettings + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.NluSettings} NluSettings + * @returns {google.cloud.dialogflow.cx.v3.WebhookRequest} WebhookRequest */ - NluSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.NluSettings) + WebhookRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.WebhookRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.NluSettings(); - switch (object.modelType) { - case "MODEL_TYPE_UNSPECIFIED": - case 0: - message.modelType = 0; - break; - case "MODEL_TYPE_STANDARD": - case 1: - message.modelType = 1; - break; - case "MODEL_TYPE_ADVANCED": - case 3: - message.modelType = 3; - break; + var message = new $root.google.cloud.dialogflow.cx.v3.WebhookRequest(); + if (object.detectIntentResponseId != null) + message.detectIntentResponseId = String(object.detectIntentResponseId); + if (object.fulfillmentInfo != null) { + if (typeof object.fulfillmentInfo !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.WebhookRequest.fulfillmentInfo: object expected"); + message.fulfillmentInfo = $root.google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo.fromObject(object.fulfillmentInfo); } - if (object.classificationThreshold != null) - message.classificationThreshold = Number(object.classificationThreshold); - switch (object.modelTrainingMode) { - case "MODEL_TRAINING_MODE_UNSPECIFIED": - case 0: - message.modelTrainingMode = 0; - break; - case "MODEL_TRAINING_MODE_AUTOMATIC": - case 1: - message.modelTrainingMode = 1; - break; - case "MODEL_TRAINING_MODE_MANUAL": - case 2: - message.modelTrainingMode = 2; - break; + if (object.intentInfo != null) { + if (typeof object.intentInfo !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.WebhookRequest.intentInfo: object expected"); + message.intentInfo = $root.google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.fromObject(object.intentInfo); + } + if (object.pageInfo != null) { + if (typeof object.pageInfo !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.WebhookRequest.pageInfo: object expected"); + message.pageInfo = $root.google.cloud.dialogflow.cx.v3.PageInfo.fromObject(object.pageInfo); + } + if (object.sessionInfo != null) { + if (typeof object.sessionInfo !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.WebhookRequest.sessionInfo: object expected"); + message.sessionInfo = $root.google.cloud.dialogflow.cx.v3.SessionInfo.fromObject(object.sessionInfo); + } + if (object.messages) { + if (!Array.isArray(object.messages)) + throw TypeError(".google.cloud.dialogflow.cx.v3.WebhookRequest.messages: array expected"); + message.messages = []; + for (var i = 0; i < object.messages.length; ++i) { + if (typeof object.messages[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.WebhookRequest.messages: object expected"); + message.messages[i] = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.fromObject(object.messages[i]); + } + } + if (object.payload != null) { + if (typeof object.payload !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.WebhookRequest.payload: object expected"); + message.payload = $root.google.protobuf.Struct.fromObject(object.payload); } return message; }; /** - * Creates a plain object from a NluSettings message. Also converts values to other types if specified. + * Creates a plain object from a WebhookRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.NluSettings + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.NluSettings} message NluSettings + * @param {google.cloud.dialogflow.cx.v3.WebhookRequest} message WebhookRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - NluSettings.toObject = function toObject(message, options) { + WebhookRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.messages = []; if (options.defaults) { - object.modelType = options.enums === String ? "MODEL_TYPE_UNSPECIFIED" : 0; - object.classificationThreshold = 0; - object.modelTrainingMode = options.enums === String ? "MODEL_TRAINING_MODE_UNSPECIFIED" : 0; + object.detectIntentResponseId = ""; + object.intentInfo = null; + object.pageInfo = null; + object.sessionInfo = null; + object.fulfillmentInfo = null; + object.payload = null; } - if (message.modelType != null && message.hasOwnProperty("modelType")) - object.modelType = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelType[message.modelType] : message.modelType; - if (message.classificationThreshold != null && message.hasOwnProperty("classificationThreshold")) - object.classificationThreshold = options.json && !isFinite(message.classificationThreshold) ? String(message.classificationThreshold) : message.classificationThreshold; - if (message.modelTrainingMode != null && message.hasOwnProperty("modelTrainingMode")) - object.modelTrainingMode = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelTrainingMode[message.modelTrainingMode] : message.modelTrainingMode; + if (message.detectIntentResponseId != null && message.hasOwnProperty("detectIntentResponseId")) + object.detectIntentResponseId = message.detectIntentResponseId; + if (message.intentInfo != null && message.hasOwnProperty("intentInfo")) + object.intentInfo = $root.google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.toObject(message.intentInfo, options); + if (message.pageInfo != null && message.hasOwnProperty("pageInfo")) + object.pageInfo = $root.google.cloud.dialogflow.cx.v3.PageInfo.toObject(message.pageInfo, options); + if (message.sessionInfo != null && message.hasOwnProperty("sessionInfo")) + object.sessionInfo = $root.google.cloud.dialogflow.cx.v3.SessionInfo.toObject(message.sessionInfo, options); + if (message.fulfillmentInfo != null && message.hasOwnProperty("fulfillmentInfo")) + object.fulfillmentInfo = $root.google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo.toObject(message.fulfillmentInfo, options); + if (message.messages && message.messages.length) { + object.messages = []; + for (var j = 0; j < message.messages.length; ++j) + object.messages[j] = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.toObject(message.messages[j], options); + } + if (message.payload != null && message.hasOwnProperty("payload")) + object.payload = $root.google.protobuf.Struct.toObject(message.payload, options); return object; }; /** - * Converts this NluSettings to JSON. + * Converts this WebhookRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.NluSettings + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest * @instance * @returns {Object.} JSON object */ - NluSettings.prototype.toJSON = function toJSON() { + WebhookRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * ModelType enum. - * @name google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelType - * @enum {number} - * @property {number} MODEL_TYPE_UNSPECIFIED=0 MODEL_TYPE_UNSPECIFIED value - * @property {number} MODEL_TYPE_STANDARD=1 MODEL_TYPE_STANDARD value - * @property {number} MODEL_TYPE_ADVANCED=3 MODEL_TYPE_ADVANCED value - */ - NluSettings.ModelType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MODEL_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "MODEL_TYPE_STANDARD"] = 1; - values[valuesById[3] = "MODEL_TYPE_ADVANCED"] = 3; - return values; - })(); + WebhookRequest.FulfillmentInfo = (function() { - /** - * ModelTrainingMode enum. - * @name google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelTrainingMode - * @enum {number} - * @property {number} MODEL_TRAINING_MODE_UNSPECIFIED=0 MODEL_TRAINING_MODE_UNSPECIFIED value - * @property {number} MODEL_TRAINING_MODE_AUTOMATIC=1 MODEL_TRAINING_MODE_AUTOMATIC value - * @property {number} MODEL_TRAINING_MODE_MANUAL=2 MODEL_TRAINING_MODE_MANUAL value - */ - NluSettings.ModelTrainingMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MODEL_TRAINING_MODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "MODEL_TRAINING_MODE_AUTOMATIC"] = 1; - values[valuesById[2] = "MODEL_TRAINING_MODE_MANUAL"] = 2; - return values; - })(); + /** + * Properties of a FulfillmentInfo. + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest + * @interface IFulfillmentInfo + * @property {string|null} [tag] FulfillmentInfo tag + */ - return NluSettings; - })(); + /** + * Constructs a new FulfillmentInfo. + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest + * @classdesc Represents a FulfillmentInfo. + * @implements IFulfillmentInfo + * @constructor + * @param {google.cloud.dialogflow.cx.v3.WebhookRequest.IFulfillmentInfo=} [properties] Properties to set + */ + function FulfillmentInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - v3beta1.Flow = (function() { + /** + * FulfillmentInfo tag. + * @member {string} tag + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo + * @instance + */ + FulfillmentInfo.prototype.tag = ""; - /** - * Properties of a Flow. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IFlow - * @property {string|null} [name] Flow name - * @property {string|null} [displayName] Flow displayName - * @property {string|null} [description] Flow description - * @property {Array.|null} [transitionRoutes] Flow transitionRoutes - * @property {Array.|null} [eventHandlers] Flow eventHandlers - * @property {google.cloud.dialogflow.cx.v3beta1.INluSettings|null} [nluSettings] Flow nluSettings - */ + /** + * Creates a new FulfillmentInfo instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo + * @static + * @param {google.cloud.dialogflow.cx.v3.WebhookRequest.IFulfillmentInfo=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo} FulfillmentInfo instance + */ + FulfillmentInfo.create = function create(properties) { + return new FulfillmentInfo(properties); + }; - /** - * Constructs a new Flow. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a Flow. - * @implements IFlow - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IFlow=} [properties] Properties to set - */ - function Flow(properties) { - this.transitionRoutes = []; - this.eventHandlers = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Flow name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.Flow - * @instance - */ - Flow.prototype.name = ""; - - /** - * Flow displayName. - * @member {string} displayName - * @memberof google.cloud.dialogflow.cx.v3beta1.Flow - * @instance - */ - Flow.prototype.displayName = ""; + /** + * Encodes the specified FulfillmentInfo message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo + * @static + * @param {google.cloud.dialogflow.cx.v3.WebhookRequest.IFulfillmentInfo} message FulfillmentInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FulfillmentInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tag != null && Object.hasOwnProperty.call(message, "tag")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.tag); + return writer; + }; - /** - * Flow description. - * @member {string} description - * @memberof google.cloud.dialogflow.cx.v3beta1.Flow - * @instance - */ - Flow.prototype.description = ""; + /** + * Encodes the specified FulfillmentInfo message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo + * @static + * @param {google.cloud.dialogflow.cx.v3.WebhookRequest.IFulfillmentInfo} message FulfillmentInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FulfillmentInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Flow transitionRoutes. - * @member {Array.} transitionRoutes - * @memberof google.cloud.dialogflow.cx.v3beta1.Flow - * @instance - */ - Flow.prototype.transitionRoutes = $util.emptyArray; + /** + * Decodes a FulfillmentInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo} FulfillmentInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FulfillmentInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.tag = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Flow eventHandlers. - * @member {Array.} eventHandlers - * @memberof google.cloud.dialogflow.cx.v3beta1.Flow - * @instance - */ - Flow.prototype.eventHandlers = $util.emptyArray; + /** + * Decodes a FulfillmentInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo} FulfillmentInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FulfillmentInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Flow nluSettings. - * @member {google.cloud.dialogflow.cx.v3beta1.INluSettings|null|undefined} nluSettings - * @memberof google.cloud.dialogflow.cx.v3beta1.Flow - * @instance - */ - Flow.prototype.nluSettings = null; + /** + * Verifies a FulfillmentInfo message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FulfillmentInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tag != null && message.hasOwnProperty("tag")) + if (!$util.isString(message.tag)) + return "tag: string expected"; + return null; + }; - /** - * Creates a new Flow instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.Flow - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IFlow=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.Flow} Flow instance - */ - Flow.create = function create(properties) { - return new Flow(properties); - }; + /** + * Creates a FulfillmentInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo} FulfillmentInfo + */ + FulfillmentInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo(); + if (object.tag != null) + message.tag = String(object.tag); + return message; + }; - /** - * Encodes the specified Flow message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Flow.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.Flow - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IFlow} message Flow message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Flow.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); - if (message.transitionRoutes != null && message.transitionRoutes.length) - for (var i = 0; i < message.transitionRoutes.length; ++i) - $root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.encode(message.transitionRoutes[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.eventHandlers != null && message.eventHandlers.length) - for (var i = 0; i < message.eventHandlers.length; ++i) - $root.google.cloud.dialogflow.cx.v3beta1.EventHandler.encode(message.eventHandlers[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.nluSettings != null && Object.hasOwnProperty.call(message, "nluSettings")) - $root.google.cloud.dialogflow.cx.v3beta1.NluSettings.encode(message.nluSettings, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - return writer; - }; + /** + * Creates a plain object from a FulfillmentInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo + * @static + * @param {google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo} message FulfillmentInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FulfillmentInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.tag = ""; + if (message.tag != null && message.hasOwnProperty("tag")) + object.tag = message.tag; + return object; + }; - /** - * Encodes the specified Flow message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Flow.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Flow - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IFlow} message Flow message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Flow.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Converts this FulfillmentInfo to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo + * @instance + * @returns {Object.} JSON object + */ + FulfillmentInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Decodes a Flow message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.Flow - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.Flow} Flow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Flow.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Flow(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.displayName = reader.string(); - break; - case 3: - message.description = reader.string(); - break; - case 4: - if (!(message.transitionRoutes && message.transitionRoutes.length)) - message.transitionRoutes = []; - message.transitionRoutes.push($root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.decode(reader, reader.uint32())); - break; - case 10: - if (!(message.eventHandlers && message.eventHandlers.length)) - message.eventHandlers = []; - message.eventHandlers.push($root.google.cloud.dialogflow.cx.v3beta1.EventHandler.decode(reader, reader.uint32())); - break; - case 11: - message.nluSettings = $root.google.cloud.dialogflow.cx.v3beta1.NluSettings.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + return FulfillmentInfo; + })(); - /** - * Decodes a Flow message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Flow - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.Flow} Flow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Flow.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + WebhookRequest.IntentInfo = (function() { - /** - * Verifies a Flow message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.Flow - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Flow.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.transitionRoutes != null && message.hasOwnProperty("transitionRoutes")) { - if (!Array.isArray(message.transitionRoutes)) - return "transitionRoutes: array expected"; - for (var i = 0; i < message.transitionRoutes.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.verify(message.transitionRoutes[i]); - if (error) - return "transitionRoutes." + error; - } - } - if (message.eventHandlers != null && message.hasOwnProperty("eventHandlers")) { - if (!Array.isArray(message.eventHandlers)) - return "eventHandlers: array expected"; - for (var i = 0; i < message.eventHandlers.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.EventHandler.verify(message.eventHandlers[i]); - if (error) - return "eventHandlers." + error; - } - } - if (message.nluSettings != null && message.hasOwnProperty("nluSettings")) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.NluSettings.verify(message.nluSettings); - if (error) - return "nluSettings." + error; - } - return null; - }; + /** + * Properties of an IntentInfo. + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest + * @interface IIntentInfo + * @property {string|null} [lastMatchedIntent] IntentInfo lastMatchedIntent + * @property {Object.|null} [parameters] IntentInfo parameters + */ - /** - * Creates a Flow message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Flow - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.Flow} Flow - */ - Flow.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Flow) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.Flow(); - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.description != null) - message.description = String(object.description); - if (object.transitionRoutes) { - if (!Array.isArray(object.transitionRoutes)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Flow.transitionRoutes: array expected"); - message.transitionRoutes = []; - for (var i = 0; i < object.transitionRoutes.length; ++i) { - if (typeof object.transitionRoutes[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Flow.transitionRoutes: object expected"); - message.transitionRoutes[i] = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.fromObject(object.transitionRoutes[i]); - } - } - if (object.eventHandlers) { - if (!Array.isArray(object.eventHandlers)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Flow.eventHandlers: array expected"); - message.eventHandlers = []; - for (var i = 0; i < object.eventHandlers.length; ++i) { - if (typeof object.eventHandlers[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Flow.eventHandlers: object expected"); - message.eventHandlers[i] = $root.google.cloud.dialogflow.cx.v3beta1.EventHandler.fromObject(object.eventHandlers[i]); - } - } - if (object.nluSettings != null) { - if (typeof object.nluSettings !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Flow.nluSettings: object expected"); - message.nluSettings = $root.google.cloud.dialogflow.cx.v3beta1.NluSettings.fromObject(object.nluSettings); + /** + * Constructs a new IntentInfo. + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest + * @classdesc Represents an IntentInfo. + * @implements IIntentInfo + * @constructor + * @param {google.cloud.dialogflow.cx.v3.WebhookRequest.IIntentInfo=} [properties] Properties to set + */ + function IntentInfo(properties) { + this.parameters = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - return message; - }; - /** - * Creates a plain object from a Flow message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Flow - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Flow} message Flow - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Flow.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.transitionRoutes = []; - object.eventHandlers = []; - } - if (options.defaults) { - object.name = ""; - object.displayName = ""; - object.description = ""; - object.nluSettings = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.transitionRoutes && message.transitionRoutes.length) { - object.transitionRoutes = []; - for (var j = 0; j < message.transitionRoutes.length; ++j) - object.transitionRoutes[j] = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.toObject(message.transitionRoutes[j], options); - } - if (message.eventHandlers && message.eventHandlers.length) { - object.eventHandlers = []; - for (var j = 0; j < message.eventHandlers.length; ++j) - object.eventHandlers[j] = $root.google.cloud.dialogflow.cx.v3beta1.EventHandler.toObject(message.eventHandlers[j], options); - } - if (message.nluSettings != null && message.hasOwnProperty("nluSettings")) - object.nluSettings = $root.google.cloud.dialogflow.cx.v3beta1.NluSettings.toObject(message.nluSettings, options); - return object; - }; + /** + * IntentInfo lastMatchedIntent. + * @member {string} lastMatchedIntent + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo + * @instance + */ + IntentInfo.prototype.lastMatchedIntent = ""; - /** - * Converts this Flow to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.Flow - * @instance - * @returns {Object.} JSON object - */ - Flow.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * IntentInfo parameters. + * @member {Object.} parameters + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo + * @instance + */ + IntentInfo.prototype.parameters = $util.emptyObject; - return Flow; - })(); + /** + * Creates a new IntentInfo instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo + * @static + * @param {google.cloud.dialogflow.cx.v3.WebhookRequest.IIntentInfo=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo} IntentInfo instance + */ + IntentInfo.create = function create(properties) { + return new IntentInfo(properties); + }; - v3beta1.CreateFlowRequest = (function() { + /** + * Encodes the specified IntentInfo message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo + * @static + * @param {google.cloud.dialogflow.cx.v3.WebhookRequest.IIntentInfo} message IntentInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IntentInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.lastMatchedIntent != null && Object.hasOwnProperty.call(message, "lastMatchedIntent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.lastMatchedIntent); + if (message.parameters != null && Object.hasOwnProperty.call(message, "parameters")) + for (var keys = Object.keys(message.parameters), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue.encode(message.parameters[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + return writer; + }; - /** - * Properties of a CreateFlowRequest. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface ICreateFlowRequest - * @property {string|null} [parent] CreateFlowRequest parent - * @property {google.cloud.dialogflow.cx.v3beta1.IFlow|null} [flow] CreateFlowRequest flow - * @property {string|null} [languageCode] CreateFlowRequest languageCode + /** + * Encodes the specified IntentInfo message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo + * @static + * @param {google.cloud.dialogflow.cx.v3.WebhookRequest.IIntentInfo} message IntentInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IntentInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IntentInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo} IntentInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IntentInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.lastMatchedIntent = reader.string(); + break; + case 2: + if (message.parameters === $util.emptyObject) + message.parameters = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.parameters[key] = value; + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IntentInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo} IntentInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IntentInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IntentInfo message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IntentInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.lastMatchedIntent != null && message.hasOwnProperty("lastMatchedIntent")) + if (!$util.isString(message.lastMatchedIntent)) + return "lastMatchedIntent: string expected"; + if (message.parameters != null && message.hasOwnProperty("parameters")) { + if (!$util.isObject(message.parameters)) + return "parameters: object expected"; + var key = Object.keys(message.parameters); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue.verify(message.parameters[key[i]]); + if (error) + return "parameters." + error; + } + } + return null; + }; + + /** + * Creates an IntentInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo} IntentInfo + */ + IntentInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo(); + if (object.lastMatchedIntent != null) + message.lastMatchedIntent = String(object.lastMatchedIntent); + if (object.parameters) { + if (typeof object.parameters !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.parameters: object expected"); + message.parameters = {}; + for (var keys = Object.keys(object.parameters), i = 0; i < keys.length; ++i) { + if (typeof object.parameters[keys[i]] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.parameters: object expected"); + message.parameters[keys[i]] = $root.google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue.fromObject(object.parameters[keys[i]]); + } + } + return message; + }; + + /** + * Creates a plain object from an IntentInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo + * @static + * @param {google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo} message IntentInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IntentInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.parameters = {}; + if (options.defaults) + object.lastMatchedIntent = ""; + if (message.lastMatchedIntent != null && message.hasOwnProperty("lastMatchedIntent")) + object.lastMatchedIntent = message.lastMatchedIntent; + var keys2; + if (message.parameters && (keys2 = Object.keys(message.parameters)).length) { + object.parameters = {}; + for (var j = 0; j < keys2.length; ++j) + object.parameters[keys2[j]] = $root.google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue.toObject(message.parameters[keys2[j]], options); + } + return object; + }; + + /** + * Converts this IntentInfo to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo + * @instance + * @returns {Object.} JSON object + */ + IntentInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + IntentInfo.IntentParameterValue = (function() { + + /** + * Properties of an IntentParameterValue. + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo + * @interface IIntentParameterValue + * @property {string|null} [originalValue] IntentParameterValue originalValue + * @property {google.protobuf.IValue|null} [resolvedValue] IntentParameterValue resolvedValue + */ + + /** + * Constructs a new IntentParameterValue. + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo + * @classdesc Represents an IntentParameterValue. + * @implements IIntentParameterValue + * @constructor + * @param {google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IIntentParameterValue=} [properties] Properties to set + */ + function IntentParameterValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * IntentParameterValue originalValue. + * @member {string} originalValue + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue + * @instance + */ + IntentParameterValue.prototype.originalValue = ""; + + /** + * IntentParameterValue resolvedValue. + * @member {google.protobuf.IValue|null|undefined} resolvedValue + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue + * @instance + */ + IntentParameterValue.prototype.resolvedValue = null; + + /** + * Creates a new IntentParameterValue instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue + * @static + * @param {google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IIntentParameterValue=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue} IntentParameterValue instance + */ + IntentParameterValue.create = function create(properties) { + return new IntentParameterValue(properties); + }; + + /** + * Encodes the specified IntentParameterValue message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue + * @static + * @param {google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IIntentParameterValue} message IntentParameterValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IntentParameterValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.originalValue != null && Object.hasOwnProperty.call(message, "originalValue")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.originalValue); + if (message.resolvedValue != null && Object.hasOwnProperty.call(message, "resolvedValue")) + $root.google.protobuf.Value.encode(message.resolvedValue, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified IntentParameterValue message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue + * @static + * @param {google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IIntentParameterValue} message IntentParameterValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IntentParameterValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IntentParameterValue message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue} IntentParameterValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IntentParameterValue.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.originalValue = reader.string(); + break; + case 2: + message.resolvedValue = $root.google.protobuf.Value.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IntentParameterValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue} IntentParameterValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IntentParameterValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IntentParameterValue message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IntentParameterValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.originalValue != null && message.hasOwnProperty("originalValue")) + if (!$util.isString(message.originalValue)) + return "originalValue: string expected"; + if (message.resolvedValue != null && message.hasOwnProperty("resolvedValue")) { + var error = $root.google.protobuf.Value.verify(message.resolvedValue); + if (error) + return "resolvedValue." + error; + } + return null; + }; + + /** + * Creates an IntentParameterValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue} IntentParameterValue + */ + IntentParameterValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue(); + if (object.originalValue != null) + message.originalValue = String(object.originalValue); + if (object.resolvedValue != null) { + if (typeof object.resolvedValue !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue.resolvedValue: object expected"); + message.resolvedValue = $root.google.protobuf.Value.fromObject(object.resolvedValue); + } + return message; + }; + + /** + * Creates a plain object from an IntentParameterValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue + * @static + * @param {google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue} message IntentParameterValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IntentParameterValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.originalValue = ""; + object.resolvedValue = null; + } + if (message.originalValue != null && message.hasOwnProperty("originalValue")) + object.originalValue = message.originalValue; + if (message.resolvedValue != null && message.hasOwnProperty("resolvedValue")) + object.resolvedValue = $root.google.protobuf.Value.toObject(message.resolvedValue, options); + return object; + }; + + /** + * Converts this IntentParameterValue to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue + * @instance + * @returns {Object.} JSON object + */ + IntentParameterValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return IntentParameterValue; + })(); + + return IntentInfo; + })(); + + return WebhookRequest; + })(); + + v3.WebhookResponse = (function() { + + /** + * Properties of a WebhookResponse. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IWebhookResponse + * @property {google.cloud.dialogflow.cx.v3.WebhookResponse.IFulfillmentResponse|null} [fulfillmentResponse] WebhookResponse fulfillmentResponse + * @property {google.cloud.dialogflow.cx.v3.IPageInfo|null} [pageInfo] WebhookResponse pageInfo + * @property {google.cloud.dialogflow.cx.v3.ISessionInfo|null} [sessionInfo] WebhookResponse sessionInfo + * @property {google.protobuf.IStruct|null} [payload] WebhookResponse payload + * @property {string|null} [targetPage] WebhookResponse targetPage + * @property {string|null} [targetFlow] WebhookResponse targetFlow */ /** - * Constructs a new CreateFlowRequest. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a CreateFlowRequest. - * @implements ICreateFlowRequest + * Constructs a new WebhookResponse. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a WebhookResponse. + * @implements IWebhookResponse * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.ICreateFlowRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IWebhookResponse=} [properties] Properties to set */ - function CreateFlowRequest(properties) { + function WebhookResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -43177,101 +42328,154 @@ } /** - * CreateFlowRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest + * WebhookResponse fulfillmentResponse. + * @member {google.cloud.dialogflow.cx.v3.WebhookResponse.IFulfillmentResponse|null|undefined} fulfillmentResponse + * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse * @instance */ - CreateFlowRequest.prototype.parent = ""; + WebhookResponse.prototype.fulfillmentResponse = null; /** - * CreateFlowRequest flow. - * @member {google.cloud.dialogflow.cx.v3beta1.IFlow|null|undefined} flow - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest + * WebhookResponse pageInfo. + * @member {google.cloud.dialogflow.cx.v3.IPageInfo|null|undefined} pageInfo + * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse * @instance */ - CreateFlowRequest.prototype.flow = null; + WebhookResponse.prototype.pageInfo = null; /** - * CreateFlowRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest + * WebhookResponse sessionInfo. + * @member {google.cloud.dialogflow.cx.v3.ISessionInfo|null|undefined} sessionInfo + * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse * @instance */ - CreateFlowRequest.prototype.languageCode = ""; + WebhookResponse.prototype.sessionInfo = null; /** - * Creates a new CreateFlowRequest instance using the specified properties. + * WebhookResponse payload. + * @member {google.protobuf.IStruct|null|undefined} payload + * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse + * @instance + */ + WebhookResponse.prototype.payload = null; + + /** + * WebhookResponse targetPage. + * @member {string} targetPage + * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse + * @instance + */ + WebhookResponse.prototype.targetPage = ""; + + /** + * WebhookResponse targetFlow. + * @member {string} targetFlow + * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse + * @instance + */ + WebhookResponse.prototype.targetFlow = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * WebhookResponse transition. + * @member {"targetPage"|"targetFlow"|undefined} transition + * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse + * @instance + */ + Object.defineProperty(WebhookResponse.prototype, "transition", { + get: $util.oneOfGetter($oneOfFields = ["targetPage", "targetFlow"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new WebhookResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ICreateFlowRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest} CreateFlowRequest instance + * @param {google.cloud.dialogflow.cx.v3.IWebhookResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.WebhookResponse} WebhookResponse instance */ - CreateFlowRequest.create = function create(properties) { - return new CreateFlowRequest(properties); + WebhookResponse.create = function create(properties) { + return new WebhookResponse(properties); }; /** - * Encodes the specified CreateFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest.verify|verify} messages. + * Encodes the specified WebhookResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.WebhookResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ICreateFlowRequest} message CreateFlowRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IWebhookResponse} message WebhookResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateFlowRequest.encode = function encode(message, writer) { + WebhookResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.flow != null && Object.hasOwnProperty.call(message, "flow")) - $root.google.cloud.dialogflow.cx.v3beta1.Flow.encode(message.flow, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.languageCode); - return writer; + if (message.fulfillmentResponse != null && Object.hasOwnProperty.call(message, "fulfillmentResponse")) + $root.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.encode(message.fulfillmentResponse, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.pageInfo != null && Object.hasOwnProperty.call(message, "pageInfo")) + $root.google.cloud.dialogflow.cx.v3.PageInfo.encode(message.pageInfo, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.sessionInfo != null && Object.hasOwnProperty.call(message, "sessionInfo")) + $root.google.cloud.dialogflow.cx.v3.SessionInfo.encode(message.sessionInfo, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.payload != null && Object.hasOwnProperty.call(message, "payload")) + $root.google.protobuf.Struct.encode(message.payload, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.targetPage != null && Object.hasOwnProperty.call(message, "targetPage")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.targetPage); + if (message.targetFlow != null && Object.hasOwnProperty.call(message, "targetFlow")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.targetFlow); + return writer; }; /** - * Encodes the specified CreateFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest.verify|verify} messages. + * Encodes the specified WebhookResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.WebhookResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ICreateFlowRequest} message CreateFlowRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IWebhookResponse} message WebhookResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateFlowRequest.encodeDelimited = function encodeDelimited(message, writer) { + WebhookResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateFlowRequest message from the specified reader or buffer. + * Decodes a WebhookResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest} CreateFlowRequest + * @returns {google.cloud.dialogflow.cx.v3.WebhookResponse} WebhookResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateFlowRequest.decode = function decode(reader, length) { + WebhookResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.WebhookResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); + message.fulfillmentResponse = $root.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.decode(reader, reader.uint32()); break; case 2: - message.flow = $root.google.cloud.dialogflow.cx.v3beta1.Flow.decode(reader, reader.uint32()); + message.pageInfo = $root.google.cloud.dialogflow.cx.v3.PageInfo.decode(reader, reader.uint32()); break; case 3: - message.languageCode = reader.string(); + message.sessionInfo = $root.google.cloud.dialogflow.cx.v3.SessionInfo.decode(reader, reader.uint32()); + break; + case 4: + message.payload = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + case 5: + message.targetPage = reader.string(); + break; + case 6: + message.targetFlow = reader.string(); break; default: reader.skipType(tag & 7); @@ -43282,130 +42486,445 @@ }; /** - * Decodes a CreateFlowRequest message from the specified reader or buffer, length delimited. + * Decodes a WebhookResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest} CreateFlowRequest + * @returns {google.cloud.dialogflow.cx.v3.WebhookResponse} WebhookResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateFlowRequest.decodeDelimited = function decodeDelimited(reader) { + WebhookResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateFlowRequest message. + * Verifies a WebhookResponse message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateFlowRequest.verify = function verify(message) { + WebhookResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.flow != null && message.hasOwnProperty("flow")) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.Flow.verify(message.flow); + var properties = {}; + if (message.fulfillmentResponse != null && message.hasOwnProperty("fulfillmentResponse")) { + var error = $root.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.verify(message.fulfillmentResponse); if (error) - return "flow." + error; + return "fulfillmentResponse." + error; + } + if (message.pageInfo != null && message.hasOwnProperty("pageInfo")) { + var error = $root.google.cloud.dialogflow.cx.v3.PageInfo.verify(message.pageInfo); + if (error) + return "pageInfo." + error; + } + if (message.sessionInfo != null && message.hasOwnProperty("sessionInfo")) { + var error = $root.google.cloud.dialogflow.cx.v3.SessionInfo.verify(message.sessionInfo); + if (error) + return "sessionInfo." + error; + } + if (message.payload != null && message.hasOwnProperty("payload")) { + var error = $root.google.protobuf.Struct.verify(message.payload); + if (error) + return "payload." + error; + } + if (message.targetPage != null && message.hasOwnProperty("targetPage")) { + properties.transition = 1; + if (!$util.isString(message.targetPage)) + return "targetPage: string expected"; + } + if (message.targetFlow != null && message.hasOwnProperty("targetFlow")) { + if (properties.transition === 1) + return "transition: multiple values"; + properties.transition = 1; + if (!$util.isString(message.targetFlow)) + return "targetFlow: string expected"; } - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; return null; }; /** - * Creates a CreateFlowRequest message from a plain object. Also converts values to their respective internal types. + * Creates a WebhookResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest} CreateFlowRequest + * @returns {google.cloud.dialogflow.cx.v3.WebhookResponse} WebhookResponse */ - CreateFlowRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest) + WebhookResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.WebhookResponse) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.flow != null) { - if (typeof object.flow !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest.flow: object expected"); - message.flow = $root.google.cloud.dialogflow.cx.v3beta1.Flow.fromObject(object.flow); + var message = new $root.google.cloud.dialogflow.cx.v3.WebhookResponse(); + if (object.fulfillmentResponse != null) { + if (typeof object.fulfillmentResponse !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.WebhookResponse.fulfillmentResponse: object expected"); + message.fulfillmentResponse = $root.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.fromObject(object.fulfillmentResponse); } - if (object.languageCode != null) - message.languageCode = String(object.languageCode); + if (object.pageInfo != null) { + if (typeof object.pageInfo !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.WebhookResponse.pageInfo: object expected"); + message.pageInfo = $root.google.cloud.dialogflow.cx.v3.PageInfo.fromObject(object.pageInfo); + } + if (object.sessionInfo != null) { + if (typeof object.sessionInfo !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.WebhookResponse.sessionInfo: object expected"); + message.sessionInfo = $root.google.cloud.dialogflow.cx.v3.SessionInfo.fromObject(object.sessionInfo); + } + if (object.payload != null) { + if (typeof object.payload !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.WebhookResponse.payload: object expected"); + message.payload = $root.google.protobuf.Struct.fromObject(object.payload); + } + if (object.targetPage != null) + message.targetPage = String(object.targetPage); + if (object.targetFlow != null) + message.targetFlow = String(object.targetFlow); return message; }; /** - * Creates a plain object from a CreateFlowRequest message. Also converts values to other types if specified. + * Creates a plain object from a WebhookResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest} message CreateFlowRequest + * @param {google.cloud.dialogflow.cx.v3.WebhookResponse} message WebhookResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateFlowRequest.toObject = function toObject(message, options) { + WebhookResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.flow = null; - object.languageCode = ""; + object.fulfillmentResponse = null; + object.pageInfo = null; + object.sessionInfo = null; + object.payload = null; + } + if (message.fulfillmentResponse != null && message.hasOwnProperty("fulfillmentResponse")) + object.fulfillmentResponse = $root.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.toObject(message.fulfillmentResponse, options); + if (message.pageInfo != null && message.hasOwnProperty("pageInfo")) + object.pageInfo = $root.google.cloud.dialogflow.cx.v3.PageInfo.toObject(message.pageInfo, options); + if (message.sessionInfo != null && message.hasOwnProperty("sessionInfo")) + object.sessionInfo = $root.google.cloud.dialogflow.cx.v3.SessionInfo.toObject(message.sessionInfo, options); + if (message.payload != null && message.hasOwnProperty("payload")) + object.payload = $root.google.protobuf.Struct.toObject(message.payload, options); + if (message.targetPage != null && message.hasOwnProperty("targetPage")) { + object.targetPage = message.targetPage; + if (options.oneofs) + object.transition = "targetPage"; + } + if (message.targetFlow != null && message.hasOwnProperty("targetFlow")) { + object.targetFlow = message.targetFlow; + if (options.oneofs) + object.transition = "targetFlow"; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.flow != null && message.hasOwnProperty("flow")) - object.flow = $root.google.cloud.dialogflow.cx.v3beta1.Flow.toObject(message.flow, options); - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; return object; }; /** - * Converts this CreateFlowRequest to JSON. + * Converts this WebhookResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse * @instance * @returns {Object.} JSON object */ - CreateFlowRequest.prototype.toJSON = function toJSON() { + WebhookResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CreateFlowRequest; + WebhookResponse.FulfillmentResponse = (function() { + + /** + * Properties of a FulfillmentResponse. + * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse + * @interface IFulfillmentResponse + * @property {Array.|null} [messages] FulfillmentResponse messages + * @property {google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.MergeBehavior|null} [mergeBehavior] FulfillmentResponse mergeBehavior + */ + + /** + * Constructs a new FulfillmentResponse. + * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse + * @classdesc Represents a FulfillmentResponse. + * @implements IFulfillmentResponse + * @constructor + * @param {google.cloud.dialogflow.cx.v3.WebhookResponse.IFulfillmentResponse=} [properties] Properties to set + */ + function FulfillmentResponse(properties) { + this.messages = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FulfillmentResponse messages. + * @member {Array.} messages + * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse + * @instance + */ + FulfillmentResponse.prototype.messages = $util.emptyArray; + + /** + * FulfillmentResponse mergeBehavior. + * @member {google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.MergeBehavior} mergeBehavior + * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse + * @instance + */ + FulfillmentResponse.prototype.mergeBehavior = 0; + + /** + * Creates a new FulfillmentResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse + * @static + * @param {google.cloud.dialogflow.cx.v3.WebhookResponse.IFulfillmentResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse} FulfillmentResponse instance + */ + FulfillmentResponse.create = function create(properties) { + return new FulfillmentResponse(properties); + }; + + /** + * Encodes the specified FulfillmentResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse + * @static + * @param {google.cloud.dialogflow.cx.v3.WebhookResponse.IFulfillmentResponse} message FulfillmentResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FulfillmentResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.messages != null && message.messages.length) + for (var i = 0; i < message.messages.length; ++i) + $root.google.cloud.dialogflow.cx.v3.ResponseMessage.encode(message.messages[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.mergeBehavior != null && Object.hasOwnProperty.call(message, "mergeBehavior")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.mergeBehavior); + return writer; + }; + + /** + * Encodes the specified FulfillmentResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse + * @static + * @param {google.cloud.dialogflow.cx.v3.WebhookResponse.IFulfillmentResponse} message FulfillmentResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FulfillmentResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FulfillmentResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse} FulfillmentResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FulfillmentResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.messages && message.messages.length)) + message.messages = []; + message.messages.push($root.google.cloud.dialogflow.cx.v3.ResponseMessage.decode(reader, reader.uint32())); + break; + case 2: + message.mergeBehavior = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FulfillmentResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse} FulfillmentResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FulfillmentResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FulfillmentResponse message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FulfillmentResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.messages != null && message.hasOwnProperty("messages")) { + if (!Array.isArray(message.messages)) + return "messages: array expected"; + for (var i = 0; i < message.messages.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.verify(message.messages[i]); + if (error) + return "messages." + error; + } + } + if (message.mergeBehavior != null && message.hasOwnProperty("mergeBehavior")) + switch (message.mergeBehavior) { + default: + return "mergeBehavior: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a FulfillmentResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse} FulfillmentResponse + */ + FulfillmentResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse(); + if (object.messages) { + if (!Array.isArray(object.messages)) + throw TypeError(".google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.messages: array expected"); + message.messages = []; + for (var i = 0; i < object.messages.length; ++i) { + if (typeof object.messages[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.messages: object expected"); + message.messages[i] = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.fromObject(object.messages[i]); + } + } + switch (object.mergeBehavior) { + case "MERGE_BEHAVIOR_UNSPECIFIED": + case 0: + message.mergeBehavior = 0; + break; + case "APPEND": + case 1: + message.mergeBehavior = 1; + break; + case "REPLACE": + case 2: + message.mergeBehavior = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a FulfillmentResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse + * @static + * @param {google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse} message FulfillmentResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FulfillmentResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.messages = []; + if (options.defaults) + object.mergeBehavior = options.enums === String ? "MERGE_BEHAVIOR_UNSPECIFIED" : 0; + if (message.messages && message.messages.length) { + object.messages = []; + for (var j = 0; j < message.messages.length; ++j) + object.messages[j] = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.toObject(message.messages[j], options); + } + if (message.mergeBehavior != null && message.hasOwnProperty("mergeBehavior")) + object.mergeBehavior = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.MergeBehavior[message.mergeBehavior] : message.mergeBehavior; + return object; + }; + + /** + * Converts this FulfillmentResponse to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse + * @instance + * @returns {Object.} JSON object + */ + FulfillmentResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * MergeBehavior enum. + * @name google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.MergeBehavior + * @enum {number} + * @property {number} MERGE_BEHAVIOR_UNSPECIFIED=0 MERGE_BEHAVIOR_UNSPECIFIED value + * @property {number} APPEND=1 APPEND value + * @property {number} REPLACE=2 REPLACE value + */ + FulfillmentResponse.MergeBehavior = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MERGE_BEHAVIOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "APPEND"] = 1; + values[valuesById[2] = "REPLACE"] = 2; + return values; + })(); + + return FulfillmentResponse; + })(); + + return WebhookResponse; })(); - v3beta1.DeleteFlowRequest = (function() { + v3.PageInfo = (function() { /** - * Properties of a DeleteFlowRequest. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IDeleteFlowRequest - * @property {string|null} [name] DeleteFlowRequest name - * @property {boolean|null} [force] DeleteFlowRequest force + * Properties of a PageInfo. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IPageInfo + * @property {string|null} [currentPage] PageInfo currentPage + * @property {google.cloud.dialogflow.cx.v3.PageInfo.IFormInfo|null} [formInfo] PageInfo formInfo */ /** - * Constructs a new DeleteFlowRequest. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a DeleteFlowRequest. - * @implements IDeleteFlowRequest + * Constructs a new PageInfo. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a PageInfo. + * @implements IPageInfo * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteFlowRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IPageInfo=} [properties] Properties to set */ - function DeleteFlowRequest(properties) { + function PageInfo(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -43413,88 +42932,88 @@ } /** - * DeleteFlowRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest + * PageInfo currentPage. + * @member {string} currentPage + * @memberof google.cloud.dialogflow.cx.v3.PageInfo * @instance */ - DeleteFlowRequest.prototype.name = ""; + PageInfo.prototype.currentPage = ""; /** - * DeleteFlowRequest force. - * @member {boolean} force - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest + * PageInfo formInfo. + * @member {google.cloud.dialogflow.cx.v3.PageInfo.IFormInfo|null|undefined} formInfo + * @memberof google.cloud.dialogflow.cx.v3.PageInfo * @instance */ - DeleteFlowRequest.prototype.force = false; + PageInfo.prototype.formInfo = null; /** - * Creates a new DeleteFlowRequest instance using the specified properties. + * Creates a new PageInfo instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.PageInfo * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteFlowRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest} DeleteFlowRequest instance + * @param {google.cloud.dialogflow.cx.v3.IPageInfo=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.PageInfo} PageInfo instance */ - DeleteFlowRequest.create = function create(properties) { - return new DeleteFlowRequest(properties); + PageInfo.create = function create(properties) { + return new PageInfo(properties); }; /** - * Encodes the specified DeleteFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest.verify|verify} messages. + * Encodes the specified PageInfo message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.PageInfo.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.PageInfo * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteFlowRequest} message DeleteFlowRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IPageInfo} message PageInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteFlowRequest.encode = function encode(message, writer) { + PageInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.force != null && Object.hasOwnProperty.call(message, "force")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.force); + if (message.currentPage != null && Object.hasOwnProperty.call(message, "currentPage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.currentPage); + if (message.formInfo != null && Object.hasOwnProperty.call(message, "formInfo")) + $root.google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.encode(message.formInfo, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified DeleteFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest.verify|verify} messages. + * Encodes the specified PageInfo message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.PageInfo.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.PageInfo * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteFlowRequest} message DeleteFlowRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IPageInfo} message PageInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteFlowRequest.encodeDelimited = function encodeDelimited(message, writer) { + PageInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteFlowRequest message from the specified reader or buffer. + * Decodes a PageInfo message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.PageInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest} DeleteFlowRequest + * @returns {google.cloud.dialogflow.cx.v3.PageInfo} PageInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteFlowRequest.decode = function decode(reader, length) { + PageInfo.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.PageInfo(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.currentPage = reader.string(); break; - case 2: - message.force = reader.bool(); + case 3: + message.formInfo = $root.google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -43505,372 +43024,653 @@ }; /** - * Decodes a DeleteFlowRequest message from the specified reader or buffer, length delimited. + * Decodes a PageInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.PageInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest} DeleteFlowRequest + * @returns {google.cloud.dialogflow.cx.v3.PageInfo} PageInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteFlowRequest.decodeDelimited = function decodeDelimited(reader) { + PageInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteFlowRequest message. + * Verifies a PageInfo message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.PageInfo * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteFlowRequest.verify = function verify(message) { + PageInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.force != null && message.hasOwnProperty("force")) - if (typeof message.force !== "boolean") - return "force: boolean expected"; + if (message.currentPage != null && message.hasOwnProperty("currentPage")) + if (!$util.isString(message.currentPage)) + return "currentPage: string expected"; + if (message.formInfo != null && message.hasOwnProperty("formInfo")) { + var error = $root.google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.verify(message.formInfo); + if (error) + return "formInfo." + error; + } return null; }; /** - * Creates a DeleteFlowRequest message from a plain object. Also converts values to their respective internal types. + * Creates a PageInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.PageInfo * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest} DeleteFlowRequest + * @returns {google.cloud.dialogflow.cx.v3.PageInfo} PageInfo */ - DeleteFlowRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest) + PageInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.PageInfo) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.force != null) - message.force = Boolean(object.force); + var message = new $root.google.cloud.dialogflow.cx.v3.PageInfo(); + if (object.currentPage != null) + message.currentPage = String(object.currentPage); + if (object.formInfo != null) { + if (typeof object.formInfo !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.PageInfo.formInfo: object expected"); + message.formInfo = $root.google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.fromObject(object.formInfo); + } return message; }; /** - * Creates a plain object from a DeleteFlowRequest message. Also converts values to other types if specified. + * Creates a plain object from a PageInfo message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.PageInfo * @static - * @param {google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest} message DeleteFlowRequest + * @param {google.cloud.dialogflow.cx.v3.PageInfo} message PageInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteFlowRequest.toObject = function toObject(message, options) { + PageInfo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.force = false; + object.currentPage = ""; + object.formInfo = null; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.force != null && message.hasOwnProperty("force")) - object.force = message.force; + if (message.currentPage != null && message.hasOwnProperty("currentPage")) + object.currentPage = message.currentPage; + if (message.formInfo != null && message.hasOwnProperty("formInfo")) + object.formInfo = $root.google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.toObject(message.formInfo, options); return object; }; /** - * Converts this DeleteFlowRequest to JSON. + * Converts this PageInfo to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.PageInfo * @instance * @returns {Object.} JSON object */ - DeleteFlowRequest.prototype.toJSON = function toJSON() { + PageInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeleteFlowRequest; - })(); + PageInfo.FormInfo = (function() { - v3beta1.ListFlowsRequest = (function() { + /** + * Properties of a FormInfo. + * @memberof google.cloud.dialogflow.cx.v3.PageInfo + * @interface IFormInfo + * @property {Array.|null} [parameterInfo] FormInfo parameterInfo + */ - /** - * Properties of a ListFlowsRequest. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IListFlowsRequest - * @property {string|null} [parent] ListFlowsRequest parent - * @property {number|null} [pageSize] ListFlowsRequest pageSize - * @property {string|null} [pageToken] ListFlowsRequest pageToken - * @property {string|null} [languageCode] ListFlowsRequest languageCode - */ + /** + * Constructs a new FormInfo. + * @memberof google.cloud.dialogflow.cx.v3.PageInfo + * @classdesc Represents a FormInfo. + * @implements IFormInfo + * @constructor + * @param {google.cloud.dialogflow.cx.v3.PageInfo.IFormInfo=} [properties] Properties to set + */ + function FormInfo(properties) { + this.parameterInfo = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Constructs a new ListFlowsRequest. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a ListFlowsRequest. - * @implements IListFlowsRequest - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IListFlowsRequest=} [properties] Properties to set - */ - function ListFlowsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * FormInfo parameterInfo. + * @member {Array.} parameterInfo + * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo + * @instance + */ + FormInfo.prototype.parameterInfo = $util.emptyArray; - /** - * ListFlowsRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest - * @instance - */ - ListFlowsRequest.prototype.parent = ""; + /** + * Creates a new FormInfo instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo + * @static + * @param {google.cloud.dialogflow.cx.v3.PageInfo.IFormInfo=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.PageInfo.FormInfo} FormInfo instance + */ + FormInfo.create = function create(properties) { + return new FormInfo(properties); + }; - /** - * ListFlowsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest - * @instance - */ - ListFlowsRequest.prototype.pageSize = 0; + /** + * Encodes the specified FormInfo message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo + * @static + * @param {google.cloud.dialogflow.cx.v3.PageInfo.IFormInfo} message FormInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FormInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parameterInfo != null && message.parameterInfo.length) + for (var i = 0; i < message.parameterInfo.length; ++i) + $root.google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.encode(message.parameterInfo[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; - /** - * ListFlowsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest - * @instance - */ - ListFlowsRequest.prototype.pageToken = ""; + /** + * Encodes the specified FormInfo message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo + * @static + * @param {google.cloud.dialogflow.cx.v3.PageInfo.IFormInfo} message FormInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FormInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * ListFlowsRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest - * @instance - */ - ListFlowsRequest.prototype.languageCode = ""; + /** + * Decodes a FormInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3.PageInfo.FormInfo} FormInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FormInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.PageInfo.FormInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + if (!(message.parameterInfo && message.parameterInfo.length)) + message.parameterInfo = []; + message.parameterInfo.push($root.google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Creates a new ListFlowsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListFlowsRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest} ListFlowsRequest instance - */ - ListFlowsRequest.create = function create(properties) { - return new ListFlowsRequest(properties); - }; + /** + * Decodes a FormInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.PageInfo.FormInfo} FormInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FormInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Encodes the specified ListFlowsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListFlowsRequest} message ListFlowsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListFlowsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.languageCode); - return writer; - }; + /** + * Verifies a FormInfo message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FormInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parameterInfo != null && message.hasOwnProperty("parameterInfo")) { + if (!Array.isArray(message.parameterInfo)) + return "parameterInfo: array expected"; + for (var i = 0; i < message.parameterInfo.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.verify(message.parameterInfo[i]); + if (error) + return "parameterInfo." + error; + } + } + return null; + }; - /** - * Encodes the specified ListFlowsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListFlowsRequest} message ListFlowsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListFlowsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a FormInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.PageInfo.FormInfo} FormInfo + */ + FormInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.PageInfo.FormInfo) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.PageInfo.FormInfo(); + if (object.parameterInfo) { + if (!Array.isArray(object.parameterInfo)) + throw TypeError(".google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.parameterInfo: array expected"); + message.parameterInfo = []; + for (var i = 0; i < object.parameterInfo.length; ++i) { + if (typeof object.parameterInfo[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.parameterInfo: object expected"); + message.parameterInfo[i] = $root.google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.fromObject(object.parameterInfo[i]); + } + } + return message; + }; - /** - * Decodes a ListFlowsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest} ListFlowsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListFlowsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); - break; - case 4: - message.languageCode = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + /** + * Creates a plain object from a FormInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo + * @static + * @param {google.cloud.dialogflow.cx.v3.PageInfo.FormInfo} message FormInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FormInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.parameterInfo = []; + if (message.parameterInfo && message.parameterInfo.length) { + object.parameterInfo = []; + for (var j = 0; j < message.parameterInfo.length; ++j) + object.parameterInfo[j] = $root.google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.toObject(message.parameterInfo[j], options); } - } - return message; - }; + return object; + }; - /** - * Decodes a ListFlowsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest} ListFlowsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListFlowsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Converts this FormInfo to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo + * @instance + * @returns {Object.} JSON object + */ + FormInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Verifies a ListFlowsRequest message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListFlowsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; - return null; - }; + FormInfo.ParameterInfo = (function() { - /** - * Creates a ListFlowsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest} ListFlowsRequest - */ - ListFlowsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.languageCode != null) - message.languageCode = String(object.languageCode); - return message; - }; + /** + * Properties of a ParameterInfo. + * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo + * @interface IParameterInfo + * @property {string|null} [displayName] ParameterInfo displayName + * @property {boolean|null} [required] ParameterInfo required + * @property {google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.ParameterState|null} [state] ParameterInfo state + * @property {google.protobuf.IValue|null} [value] ParameterInfo value + * @property {boolean|null} [justCollected] ParameterInfo justCollected + */ - /** - * Creates a plain object from a ListFlowsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest} message ListFlowsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListFlowsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.languageCode = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; - return object; - }; + /** + * Constructs a new ParameterInfo. + * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo + * @classdesc Represents a ParameterInfo. + * @implements IParameterInfo + * @constructor + * @param {google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.IParameterInfo=} [properties] Properties to set + */ + function ParameterInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Converts this ListFlowsRequest to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest - * @instance - * @returns {Object.} JSON object - */ - ListFlowsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * ParameterInfo displayName. + * @member {string} displayName + * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo + * @instance + */ + ParameterInfo.prototype.displayName = ""; - return ListFlowsRequest; + /** + * ParameterInfo required. + * @member {boolean} required + * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo + * @instance + */ + ParameterInfo.prototype.required = false; + + /** + * ParameterInfo state. + * @member {google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.ParameterState} state + * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo + * @instance + */ + ParameterInfo.prototype.state = 0; + + /** + * ParameterInfo value. + * @member {google.protobuf.IValue|null|undefined} value + * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo + * @instance + */ + ParameterInfo.prototype.value = null; + + /** + * ParameterInfo justCollected. + * @member {boolean} justCollected + * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo + * @instance + */ + ParameterInfo.prototype.justCollected = false; + + /** + * Creates a new ParameterInfo instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo + * @static + * @param {google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.IParameterInfo=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo} ParameterInfo instance + */ + ParameterInfo.create = function create(properties) { + return new ParameterInfo(properties); + }; + + /** + * Encodes the specified ParameterInfo message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo + * @static + * @param {google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.IParameterInfo} message ParameterInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ParameterInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.required != null && Object.hasOwnProperty.call(message, "required")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.required); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + $root.google.protobuf.Value.encode(message.value, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.justCollected != null && Object.hasOwnProperty.call(message, "justCollected")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.justCollected); + return writer; + }; + + /** + * Encodes the specified ParameterInfo message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo + * @static + * @param {google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.IParameterInfo} message ParameterInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ParameterInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ParameterInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo} ParameterInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ParameterInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.displayName = reader.string(); + break; + case 2: + message.required = reader.bool(); + break; + case 3: + message.state = reader.int32(); + break; + case 4: + message.value = $root.google.protobuf.Value.decode(reader, reader.uint32()); + break; + case 5: + message.justCollected = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ParameterInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo} ParameterInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ParameterInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ParameterInfo message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ParameterInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.required != null && message.hasOwnProperty("required")) + if (typeof message.required !== "boolean") + return "required: boolean expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.value != null && message.hasOwnProperty("value")) { + var error = $root.google.protobuf.Value.verify(message.value); + if (error) + return "value." + error; + } + if (message.justCollected != null && message.hasOwnProperty("justCollected")) + if (typeof message.justCollected !== "boolean") + return "justCollected: boolean expected"; + return null; + }; + + /** + * Creates a ParameterInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo} ParameterInfo + */ + ParameterInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.required != null) + message.required = Boolean(object.required); + switch (object.state) { + case "PARAMETER_STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "EMPTY": + case 1: + message.state = 1; + break; + case "INVALID": + case 2: + message.state = 2; + break; + case "FILLED": + case 3: + message.state = 3; + break; + } + if (object.value != null) { + if (typeof object.value !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.value: object expected"); + message.value = $root.google.protobuf.Value.fromObject(object.value); + } + if (object.justCollected != null) + message.justCollected = Boolean(object.justCollected); + return message; + }; + + /** + * Creates a plain object from a ParameterInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo + * @static + * @param {google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo} message ParameterInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ParameterInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.displayName = ""; + object.required = false; + object.state = options.enums === String ? "PARAMETER_STATE_UNSPECIFIED" : 0; + object.value = null; + object.justCollected = false; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.required != null && message.hasOwnProperty("required")) + object.required = message.required; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.ParameterState[message.state] : message.state; + if (message.value != null && message.hasOwnProperty("value")) + object.value = $root.google.protobuf.Value.toObject(message.value, options); + if (message.justCollected != null && message.hasOwnProperty("justCollected")) + object.justCollected = message.justCollected; + return object; + }; + + /** + * Converts this ParameterInfo to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo + * @instance + * @returns {Object.} JSON object + */ + ParameterInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * ParameterState enum. + * @name google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.ParameterState + * @enum {number} + * @property {number} PARAMETER_STATE_UNSPECIFIED=0 PARAMETER_STATE_UNSPECIFIED value + * @property {number} EMPTY=1 EMPTY value + * @property {number} INVALID=2 INVALID value + * @property {number} FILLED=3 FILLED value + */ + ParameterInfo.ParameterState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PARAMETER_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "EMPTY"] = 1; + values[valuesById[2] = "INVALID"] = 2; + values[valuesById[3] = "FILLED"] = 3; + return values; + })(); + + return ParameterInfo; + })(); + + return FormInfo; + })(); + + return PageInfo; })(); - v3beta1.ListFlowsResponse = (function() { + v3.SessionInfo = (function() { /** - * Properties of a ListFlowsResponse. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IListFlowsResponse - * @property {Array.|null} [flows] ListFlowsResponse flows - * @property {string|null} [nextPageToken] ListFlowsResponse nextPageToken + * Properties of a SessionInfo. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface ISessionInfo + * @property {string|null} [session] SessionInfo session + * @property {Object.|null} [parameters] SessionInfo parameters */ /** - * Constructs a new ListFlowsResponse. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a ListFlowsResponse. - * @implements IListFlowsResponse + * Constructs a new SessionInfo. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a SessionInfo. + * @implements ISessionInfo * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IListFlowsResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.ISessionInfo=} [properties] Properties to set */ - function ListFlowsResponse(properties) { - this.flows = []; + function SessionInfo(properties) { + this.parameters = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -43878,91 +43678,110 @@ } /** - * ListFlowsResponse flows. - * @member {Array.} flows - * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse + * SessionInfo session. + * @member {string} session + * @memberof google.cloud.dialogflow.cx.v3.SessionInfo * @instance */ - ListFlowsResponse.prototype.flows = $util.emptyArray; + SessionInfo.prototype.session = ""; /** - * ListFlowsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse + * SessionInfo parameters. + * @member {Object.} parameters + * @memberof google.cloud.dialogflow.cx.v3.SessionInfo * @instance */ - ListFlowsResponse.prototype.nextPageToken = ""; + SessionInfo.prototype.parameters = $util.emptyObject; /** - * Creates a new ListFlowsResponse instance using the specified properties. + * Creates a new SessionInfo instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse + * @memberof google.cloud.dialogflow.cx.v3.SessionInfo * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListFlowsResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse} ListFlowsResponse instance + * @param {google.cloud.dialogflow.cx.v3.ISessionInfo=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.SessionInfo} SessionInfo instance */ - ListFlowsResponse.create = function create(properties) { - return new ListFlowsResponse(properties); + SessionInfo.create = function create(properties) { + return new SessionInfo(properties); }; /** - * Encodes the specified ListFlowsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse.verify|verify} messages. + * Encodes the specified SessionInfo message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SessionInfo.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse + * @memberof google.cloud.dialogflow.cx.v3.SessionInfo * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListFlowsResponse} message ListFlowsResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ISessionInfo} message SessionInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListFlowsResponse.encode = function encode(message, writer) { + SessionInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.flows != null && message.flows.length) - for (var i = 0; i < message.flows.length; ++i) - $root.google.cloud.dialogflow.cx.v3beta1.Flow.encode(message.flows[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.session != null && Object.hasOwnProperty.call(message, "session")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.session); + if (message.parameters != null && Object.hasOwnProperty.call(message, "parameters")) + for (var keys = Object.keys(message.parameters), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.protobuf.Value.encode(message.parameters[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } return writer; }; /** - * Encodes the specified ListFlowsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse.verify|verify} messages. + * Encodes the specified SessionInfo message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SessionInfo.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse + * @memberof google.cloud.dialogflow.cx.v3.SessionInfo * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListFlowsResponse} message ListFlowsResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ISessionInfo} message SessionInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListFlowsResponse.encodeDelimited = function encodeDelimited(message, writer) { + SessionInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListFlowsResponse message from the specified reader or buffer. + * Decodes a SessionInfo message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse + * @memberof google.cloud.dialogflow.cx.v3.SessionInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse} ListFlowsResponse + * @returns {google.cloud.dialogflow.cx.v3.SessionInfo} SessionInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListFlowsResponse.decode = function decode(reader, length) { + SessionInfo.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.SessionInfo(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.flows && message.flows.length)) - message.flows = []; - message.flows.push($root.google.cloud.dialogflow.cx.v3beta1.Flow.decode(reader, reader.uint32())); + message.session = reader.string(); break; case 2: - message.nextPageToken = reader.string(); + if (message.parameters === $util.emptyObject) + message.parameters = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.protobuf.Value.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.parameters[key] = value; break; default: reader.skipType(tag & 7); @@ -43973,134 +43792,413 @@ }; /** - * Decodes a ListFlowsResponse message from the specified reader or buffer, length delimited. + * Decodes a SessionInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse + * @memberof google.cloud.dialogflow.cx.v3.SessionInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse} ListFlowsResponse + * @returns {google.cloud.dialogflow.cx.v3.SessionInfo} SessionInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListFlowsResponse.decodeDelimited = function decodeDelimited(reader) { + SessionInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListFlowsResponse message. + * Verifies a SessionInfo message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse + * @memberof google.cloud.dialogflow.cx.v3.SessionInfo * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListFlowsResponse.verify = function verify(message) { + SessionInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.flows != null && message.hasOwnProperty("flows")) { - if (!Array.isArray(message.flows)) - return "flows: array expected"; - for (var i = 0; i < message.flows.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.Flow.verify(message.flows[i]); + if (message.session != null && message.hasOwnProperty("session")) + if (!$util.isString(message.session)) + return "session: string expected"; + if (message.parameters != null && message.hasOwnProperty("parameters")) { + if (!$util.isObject(message.parameters)) + return "parameters: object expected"; + var key = Object.keys(message.parameters); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.protobuf.Value.verify(message.parameters[key[i]]); if (error) - return "flows." + error; + return "parameters." + error; } } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; return null; }; /** - * Creates a ListFlowsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a SessionInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse + * @memberof google.cloud.dialogflow.cx.v3.SessionInfo * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse} ListFlowsResponse + * @returns {google.cloud.dialogflow.cx.v3.SessionInfo} SessionInfo */ - ListFlowsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse) + SessionInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.SessionInfo) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse(); - if (object.flows) { - if (!Array.isArray(object.flows)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse.flows: array expected"); - message.flows = []; - for (var i = 0; i < object.flows.length; ++i) { - if (typeof object.flows[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse.flows: object expected"); - message.flows[i] = $root.google.cloud.dialogflow.cx.v3beta1.Flow.fromObject(object.flows[i]); + var message = new $root.google.cloud.dialogflow.cx.v3.SessionInfo(); + if (object.session != null) + message.session = String(object.session); + if (object.parameters) { + if (typeof object.parameters !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.SessionInfo.parameters: object expected"); + message.parameters = {}; + for (var keys = Object.keys(object.parameters), i = 0; i < keys.length; ++i) { + if (typeof object.parameters[keys[i]] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.SessionInfo.parameters: object expected"); + message.parameters[keys[i]] = $root.google.protobuf.Value.fromObject(object.parameters[keys[i]]); } } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a ListFlowsResponse message. Also converts values to other types if specified. + * Creates a plain object from a SessionInfo message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse + * @memberof google.cloud.dialogflow.cx.v3.SessionInfo * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse} message ListFlowsResponse + * @param {google.cloud.dialogflow.cx.v3.SessionInfo} message SessionInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListFlowsResponse.toObject = function toObject(message, options) { + SessionInfo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.flows = []; + if (options.objects || options.defaults) + object.parameters = {}; if (options.defaults) - object.nextPageToken = ""; - if (message.flows && message.flows.length) { - object.flows = []; - for (var j = 0; j < message.flows.length; ++j) - object.flows[j] = $root.google.cloud.dialogflow.cx.v3beta1.Flow.toObject(message.flows[j], options); + object.session = ""; + if (message.session != null && message.hasOwnProperty("session")) + object.session = message.session; + var keys2; + if (message.parameters && (keys2 = Object.keys(message.parameters)).length) { + object.parameters = {}; + for (var j = 0; j < keys2.length; ++j) + object.parameters[keys2[j]] = $root.google.protobuf.Value.toObject(message.parameters[keys2[j]], options); } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this ListFlowsResponse to JSON. + * Converts this SessionInfo to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse + * @memberof google.cloud.dialogflow.cx.v3.SessionInfo * @instance * @returns {Object.} JSON object */ - ListFlowsResponse.prototype.toJSON = function toJSON() { + SessionInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListFlowsResponse; + return SessionInfo; })(); - v3beta1.GetFlowRequest = (function() { + return v3; + })(); + + cx.v3beta1 = (function() { + + /** + * Namespace v3beta1. + * @memberof google.cloud.dialogflow.cx + * @namespace + */ + var v3beta1 = {}; + + v3beta1.Agents = (function() { /** - * Properties of a GetFlowRequest. + * Constructs a new Agents service. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IGetFlowRequest - * @property {string|null} [name] GetFlowRequest name - * @property {string|null} [languageCode] GetFlowRequest languageCode + * @classdesc Represents an Agents + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited */ + function Agents(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Agents.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Agents; /** - * Constructs a new GetFlowRequest. + * Creates new Agents service using the specified rpc implementation. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.Agents + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Agents} RPC service. Useful where requests and/or responses are streamed. + */ + Agents.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Agents#listAgents}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Agents + * @typedef ListAgentsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse} [response] ListAgentsResponse + */ + + /** + * Calls ListAgents. + * @function listAgents + * @memberof google.cloud.dialogflow.cx.v3beta1.Agents + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IListAgentsRequest} request ListAgentsRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.Agents.ListAgentsCallback} callback Node-style callback called with the error, if any, and ListAgentsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Agents.prototype.listAgents = function listAgents(request, callback) { + return this.rpcCall(listAgents, $root.google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest, $root.google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse, request, callback); + }, "name", { value: "ListAgents" }); + + /** + * Calls ListAgents. + * @function listAgents + * @memberof google.cloud.dialogflow.cx.v3beta1.Agents + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IListAgentsRequest} request ListAgentsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Agents#getAgent}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Agents + * @typedef GetAgentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3beta1.Agent} [response] Agent + */ + + /** + * Calls GetAgent. + * @function getAgent + * @memberof google.cloud.dialogflow.cx.v3beta1.Agents + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IGetAgentRequest} request GetAgentRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.Agents.GetAgentCallback} callback Node-style callback called with the error, if any, and Agent + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Agents.prototype.getAgent = function getAgent(request, callback) { + return this.rpcCall(getAgent, $root.google.cloud.dialogflow.cx.v3beta1.GetAgentRequest, $root.google.cloud.dialogflow.cx.v3beta1.Agent, request, callback); + }, "name", { value: "GetAgent" }); + + /** + * Calls GetAgent. + * @function getAgent + * @memberof google.cloud.dialogflow.cx.v3beta1.Agents + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IGetAgentRequest} request GetAgentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Agents#createAgent}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Agents + * @typedef CreateAgentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3beta1.Agent} [response] Agent + */ + + /** + * Calls CreateAgent. + * @function createAgent + * @memberof google.cloud.dialogflow.cx.v3beta1.Agents + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.ICreateAgentRequest} request CreateAgentRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.Agents.CreateAgentCallback} callback Node-style callback called with the error, if any, and Agent + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Agents.prototype.createAgent = function createAgent(request, callback) { + return this.rpcCall(createAgent, $root.google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest, $root.google.cloud.dialogflow.cx.v3beta1.Agent, request, callback); + }, "name", { value: "CreateAgent" }); + + /** + * Calls CreateAgent. + * @function createAgent + * @memberof google.cloud.dialogflow.cx.v3beta1.Agents + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.ICreateAgentRequest} request CreateAgentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Agents#updateAgent}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Agents + * @typedef UpdateAgentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3beta1.Agent} [response] Agent + */ + + /** + * Calls UpdateAgent. + * @function updateAgent + * @memberof google.cloud.dialogflow.cx.v3beta1.Agents + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateAgentRequest} request UpdateAgentRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.Agents.UpdateAgentCallback} callback Node-style callback called with the error, if any, and Agent + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Agents.prototype.updateAgent = function updateAgent(request, callback) { + return this.rpcCall(updateAgent, $root.google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest, $root.google.cloud.dialogflow.cx.v3beta1.Agent, request, callback); + }, "name", { value: "UpdateAgent" }); + + /** + * Calls UpdateAgent. + * @function updateAgent + * @memberof google.cloud.dialogflow.cx.v3beta1.Agents + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateAgentRequest} request UpdateAgentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Agents#deleteAgent}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Agents + * @typedef DeleteAgentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteAgent. + * @function deleteAgent + * @memberof google.cloud.dialogflow.cx.v3beta1.Agents + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteAgentRequest} request DeleteAgentRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.Agents.DeleteAgentCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Agents.prototype.deleteAgent = function deleteAgent(request, callback) { + return this.rpcCall(deleteAgent, $root.google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteAgent" }); + + /** + * Calls DeleteAgent. + * @function deleteAgent + * @memberof google.cloud.dialogflow.cx.v3beta1.Agents + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteAgentRequest} request DeleteAgentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Agents#exportAgent}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Agents + * @typedef ExportAgentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls ExportAgent. + * @function exportAgent + * @memberof google.cloud.dialogflow.cx.v3beta1.Agents + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IExportAgentRequest} request ExportAgentRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.Agents.ExportAgentCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Agents.prototype.exportAgent = function exportAgent(request, callback) { + return this.rpcCall(exportAgent, $root.google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "ExportAgent" }); + + /** + * Calls ExportAgent. + * @function exportAgent + * @memberof google.cloud.dialogflow.cx.v3beta1.Agents + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IExportAgentRequest} request ExportAgentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Agents#restoreAgent}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Agents + * @typedef RestoreAgentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls RestoreAgent. + * @function restoreAgent + * @memberof google.cloud.dialogflow.cx.v3beta1.Agents + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IRestoreAgentRequest} request RestoreAgentRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.Agents.RestoreAgentCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Agents.prototype.restoreAgent = function restoreAgent(request, callback) { + return this.rpcCall(restoreAgent, $root.google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "RestoreAgent" }); + + /** + * Calls RestoreAgent. + * @function restoreAgent + * @memberof google.cloud.dialogflow.cx.v3beta1.Agents + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IRestoreAgentRequest} request RestoreAgentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Agents; + })(); + + v3beta1.SpeechToTextSettings = (function() { + + /** + * Properties of a SpeechToTextSettings. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a GetFlowRequest. - * @implements IGetFlowRequest + * @interface ISpeechToTextSettings + * @property {boolean|null} [enableSpeechAdaptation] SpeechToTextSettings enableSpeechAdaptation + */ + + /** + * Constructs a new SpeechToTextSettings. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents a SpeechToTextSettings. + * @implements ISpeechToTextSettings * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IGetFlowRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.ISpeechToTextSettings=} [properties] Properties to set */ - function GetFlowRequest(properties) { + function SpeechToTextSettings(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -44108,88 +44206,75 @@ } /** - * GetFlowRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowRequest - * @instance - */ - GetFlowRequest.prototype.name = ""; - - /** - * GetFlowRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowRequest + * SpeechToTextSettings enableSpeechAdaptation. + * @member {boolean} enableSpeechAdaptation + * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings * @instance */ - GetFlowRequest.prototype.languageCode = ""; + SpeechToTextSettings.prototype.enableSpeechAdaptation = false; /** - * Creates a new GetFlowRequest instance using the specified properties. + * Creates a new SpeechToTextSettings instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IGetFlowRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.GetFlowRequest} GetFlowRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.ISpeechToTextSettings=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings} SpeechToTextSettings instance */ - GetFlowRequest.create = function create(properties) { - return new GetFlowRequest(properties); + SpeechToTextSettings.create = function create(properties) { + return new SpeechToTextSettings(properties); }; /** - * Encodes the specified GetFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetFlowRequest.verify|verify} messages. + * Encodes the specified SpeechToTextSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IGetFlowRequest} message GetFlowRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.ISpeechToTextSettings} message SpeechToTextSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetFlowRequest.encode = function encode(message, writer) { + SpeechToTextSettings.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); + if (message.enableSpeechAdaptation != null && Object.hasOwnProperty.call(message, "enableSpeechAdaptation")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enableSpeechAdaptation); return writer; }; /** - * Encodes the specified GetFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetFlowRequest.verify|verify} messages. + * Encodes the specified SpeechToTextSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IGetFlowRequest} message GetFlowRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.ISpeechToTextSettings} message SpeechToTextSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetFlowRequest.encodeDelimited = function encodeDelimited(message, writer) { + SpeechToTextSettings.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetFlowRequest message from the specified reader or buffer. + * Decodes a SpeechToTextSettings message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.GetFlowRequest} GetFlowRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings} SpeechToTextSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetFlowRequest.decode = function decode(reader, length) { + SpeechToTextSettings.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.GetFlowRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); - break; - case 2: - message.languageCode = reader.string(); + message.enableSpeechAdaptation = reader.bool(); break; default: reader.skipType(tag & 7); @@ -44200,118 +44285,116 @@ }; /** - * Decodes a GetFlowRequest message from the specified reader or buffer, length delimited. + * Decodes a SpeechToTextSettings message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.GetFlowRequest} GetFlowRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings} SpeechToTextSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetFlowRequest.decodeDelimited = function decodeDelimited(reader) { + SpeechToTextSettings.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetFlowRequest message. + * Verifies a SpeechToTextSettings message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetFlowRequest.verify = function verify(message) { + SpeechToTextSettings.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; + if (message.enableSpeechAdaptation != null && message.hasOwnProperty("enableSpeechAdaptation")) + if (typeof message.enableSpeechAdaptation !== "boolean") + return "enableSpeechAdaptation: boolean expected"; return null; }; /** - * Creates a GetFlowRequest message from a plain object. Also converts values to their respective internal types. + * Creates a SpeechToTextSettings message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.GetFlowRequest} GetFlowRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings} SpeechToTextSettings */ - GetFlowRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.GetFlowRequest) + SpeechToTextSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.GetFlowRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.languageCode != null) - message.languageCode = String(object.languageCode); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings(); + if (object.enableSpeechAdaptation != null) + message.enableSpeechAdaptation = Boolean(object.enableSpeechAdaptation); return message; }; /** - * Creates a plain object from a GetFlowRequest message. Also converts values to other types if specified. + * Creates a plain object from a SpeechToTextSettings message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings * @static - * @param {google.cloud.dialogflow.cx.v3beta1.GetFlowRequest} message GetFlowRequest + * @param {google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings} message SpeechToTextSettings * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetFlowRequest.toObject = function toObject(message, options) { + SpeechToTextSettings.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.languageCode = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; + if (options.defaults) + object.enableSpeechAdaptation = false; + if (message.enableSpeechAdaptation != null && message.hasOwnProperty("enableSpeechAdaptation")) + object.enableSpeechAdaptation = message.enableSpeechAdaptation; return object; }; /** - * Converts this GetFlowRequest to JSON. + * Converts this SpeechToTextSettings to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings * @instance * @returns {Object.} JSON object */ - GetFlowRequest.prototype.toJSON = function toJSON() { + SpeechToTextSettings.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetFlowRequest; + return SpeechToTextSettings; })(); - v3beta1.UpdateFlowRequest = (function() { + v3beta1.Agent = (function() { /** - * Properties of an UpdateFlowRequest. + * Properties of an Agent. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IUpdateFlowRequest - * @property {google.cloud.dialogflow.cx.v3beta1.IFlow|null} [flow] UpdateFlowRequest flow - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateFlowRequest updateMask - * @property {string|null} [languageCode] UpdateFlowRequest languageCode + * @interface IAgent + * @property {string|null} [name] Agent name + * @property {string|null} [displayName] Agent displayName + * @property {string|null} [defaultLanguageCode] Agent defaultLanguageCode + * @property {string|null} [timeZone] Agent timeZone + * @property {string|null} [description] Agent description + * @property {string|null} [avatarUri] Agent avatarUri + * @property {google.cloud.dialogflow.cx.v3beta1.ISpeechToTextSettings|null} [speechToTextSettings] Agent speechToTextSettings + * @property {string|null} [startFlow] Agent startFlow + * @property {boolean|null} [enableStackdriverLogging] Agent enableStackdriverLogging + * @property {boolean|null} [enableSpellCorrection] Agent enableSpellCorrection */ /** - * Constructs a new UpdateFlowRequest. + * Constructs a new Agent. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents an UpdateFlowRequest. - * @implements IUpdateFlowRequest + * @classdesc Represents an Agent. + * @implements IAgent * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateFlowRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IAgent=} [properties] Properties to set */ - function UpdateFlowRequest(properties) { + function Agent(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -44319,101 +44402,192 @@ } /** - * UpdateFlowRequest flow. - * @member {google.cloud.dialogflow.cx.v3beta1.IFlow|null|undefined} flow - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest + * Agent name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent * @instance */ - UpdateFlowRequest.prototype.flow = null; + Agent.prototype.name = ""; /** - * UpdateFlowRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest + * Agent displayName. + * @member {string} displayName + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent * @instance */ - UpdateFlowRequest.prototype.updateMask = null; + Agent.prototype.displayName = ""; /** - * UpdateFlowRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest + * Agent defaultLanguageCode. + * @member {string} defaultLanguageCode + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent * @instance */ - UpdateFlowRequest.prototype.languageCode = ""; + Agent.prototype.defaultLanguageCode = ""; /** - * Creates a new UpdateFlowRequest instance using the specified properties. + * Agent timeZone. + * @member {string} timeZone + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent + * @instance + */ + Agent.prototype.timeZone = ""; + + /** + * Agent description. + * @member {string} description + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent + * @instance + */ + Agent.prototype.description = ""; + + /** + * Agent avatarUri. + * @member {string} avatarUri + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent + * @instance + */ + Agent.prototype.avatarUri = ""; + + /** + * Agent speechToTextSettings. + * @member {google.cloud.dialogflow.cx.v3beta1.ISpeechToTextSettings|null|undefined} speechToTextSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent + * @instance + */ + Agent.prototype.speechToTextSettings = null; + + /** + * Agent startFlow. + * @member {string} startFlow + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent + * @instance + */ + Agent.prototype.startFlow = ""; + + /** + * Agent enableStackdriverLogging. + * @member {boolean} enableStackdriverLogging + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent + * @instance + */ + Agent.prototype.enableStackdriverLogging = false; + + /** + * Agent enableSpellCorrection. + * @member {boolean} enableSpellCorrection + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent + * @instance + */ + Agent.prototype.enableSpellCorrection = false; + + /** + * Creates a new Agent instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateFlowRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest} UpdateFlowRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.IAgent=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.Agent} Agent instance */ - UpdateFlowRequest.create = function create(properties) { - return new UpdateFlowRequest(properties); + Agent.create = function create(properties) { + return new Agent(properties); }; /** - * Encodes the specified UpdateFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest.verify|verify} messages. + * Encodes the specified Agent message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Agent.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateFlowRequest} message UpdateFlowRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IAgent} message Agent message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateFlowRequest.encode = function encode(message, writer) { + Agent.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.flow != null && Object.hasOwnProperty.call(message, "flow")) - $root.google.cloud.dialogflow.cx.v3beta1.Flow.encode(message.flow, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.languageCode); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.defaultLanguageCode != null && Object.hasOwnProperty.call(message, "defaultLanguageCode")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.defaultLanguageCode); + if (message.timeZone != null && Object.hasOwnProperty.call(message, "timeZone")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.timeZone); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.description); + if (message.avatarUri != null && Object.hasOwnProperty.call(message, "avatarUri")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.avatarUri); + if (message.speechToTextSettings != null && Object.hasOwnProperty.call(message, "speechToTextSettings")) + $root.google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings.encode(message.speechToTextSettings, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.startFlow != null && Object.hasOwnProperty.call(message, "startFlow")) + writer.uint32(/* id 16, wireType 2 =*/130).string(message.startFlow); + if (message.enableStackdriverLogging != null && Object.hasOwnProperty.call(message, "enableStackdriverLogging")) + writer.uint32(/* id 18, wireType 0 =*/144).bool(message.enableStackdriverLogging); + if (message.enableSpellCorrection != null && Object.hasOwnProperty.call(message, "enableSpellCorrection")) + writer.uint32(/* id 20, wireType 0 =*/160).bool(message.enableSpellCorrection); return writer; }; /** - * Encodes the specified UpdateFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest.verify|verify} messages. + * Encodes the specified Agent message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Agent.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateFlowRequest} message UpdateFlowRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IAgent} message Agent message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateFlowRequest.encodeDelimited = function encodeDelimited(message, writer) { + Agent.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateFlowRequest message from the specified reader or buffer. + * Decodes an Agent message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest} UpdateFlowRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.Agent} Agent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateFlowRequest.decode = function decode(reader, length) { + Agent.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Agent(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.flow = $root.google.cloud.dialogflow.cx.v3beta1.Flow.decode(reader, reader.uint32()); + message.name = reader.string(); break; case 2: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.displayName = reader.string(); break; case 3: - message.languageCode = reader.string(); + message.defaultLanguageCode = reader.string(); + break; + case 5: + message.timeZone = reader.string(); + break; + case 6: + message.description = reader.string(); + break; + case 7: + message.avatarUri = reader.string(); + break; + case 13: + message.speechToTextSettings = $root.google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings.decode(reader, reader.uint32()); + break; + case 16: + message.startFlow = reader.string(); + break; + case 18: + message.enableStackdriverLogging = reader.bool(); + break; + case 20: + message.enableSpellCorrection = reader.bool(); break; default: reader.skipType(tag & 7); @@ -44424,134 +44598,187 @@ }; /** - * Decodes an UpdateFlowRequest message from the specified reader or buffer, length delimited. + * Decodes an Agent message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest} UpdateFlowRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.Agent} Agent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateFlowRequest.decodeDelimited = function decodeDelimited(reader) { + Agent.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateFlowRequest message. + * Verifies an Agent message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateFlowRequest.verify = function verify(message) { + Agent.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.flow != null && message.hasOwnProperty("flow")) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.Flow.verify(message.flow); - if (error) - return "flow." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.defaultLanguageCode != null && message.hasOwnProperty("defaultLanguageCode")) + if (!$util.isString(message.defaultLanguageCode)) + return "defaultLanguageCode: string expected"; + if (message.timeZone != null && message.hasOwnProperty("timeZone")) + if (!$util.isString(message.timeZone)) + return "timeZone: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.avatarUri != null && message.hasOwnProperty("avatarUri")) + if (!$util.isString(message.avatarUri)) + return "avatarUri: string expected"; + if (message.speechToTextSettings != null && message.hasOwnProperty("speechToTextSettings")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings.verify(message.speechToTextSettings); if (error) - return "updateMask." + error; + return "speechToTextSettings." + error; } - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; + if (message.startFlow != null && message.hasOwnProperty("startFlow")) + if (!$util.isString(message.startFlow)) + return "startFlow: string expected"; + if (message.enableStackdriverLogging != null && message.hasOwnProperty("enableStackdriverLogging")) + if (typeof message.enableStackdriverLogging !== "boolean") + return "enableStackdriverLogging: boolean expected"; + if (message.enableSpellCorrection != null && message.hasOwnProperty("enableSpellCorrection")) + if (typeof message.enableSpellCorrection !== "boolean") + return "enableSpellCorrection: boolean expected"; return null; }; /** - * Creates an UpdateFlowRequest message from a plain object. Also converts values to their respective internal types. + * Creates an Agent message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest} UpdateFlowRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.Agent} Agent */ - UpdateFlowRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest) + Agent.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Agent) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest(); - if (object.flow != null) { - if (typeof object.flow !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest.flow: object expected"); - message.flow = $root.google.cloud.dialogflow.cx.v3beta1.Flow.fromObject(object.flow); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.Agent(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.defaultLanguageCode != null) + message.defaultLanguageCode = String(object.defaultLanguageCode); + if (object.timeZone != null) + message.timeZone = String(object.timeZone); + if (object.description != null) + message.description = String(object.description); + if (object.avatarUri != null) + message.avatarUri = String(object.avatarUri); + if (object.speechToTextSettings != null) { + if (typeof object.speechToTextSettings !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Agent.speechToTextSettings: object expected"); + message.speechToTextSettings = $root.google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings.fromObject(object.speechToTextSettings); } - if (object.languageCode != null) - message.languageCode = String(object.languageCode); + if (object.startFlow != null) + message.startFlow = String(object.startFlow); + if (object.enableStackdriverLogging != null) + message.enableStackdriverLogging = Boolean(object.enableStackdriverLogging); + if (object.enableSpellCorrection != null) + message.enableSpellCorrection = Boolean(object.enableSpellCorrection); return message; }; /** - * Creates a plain object from an UpdateFlowRequest message. Also converts values to other types if specified. + * Creates a plain object from an Agent message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent * @static - * @param {google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest} message UpdateFlowRequest + * @param {google.cloud.dialogflow.cx.v3beta1.Agent} message Agent * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateFlowRequest.toObject = function toObject(message, options) { + Agent.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.flow = null; - object.updateMask = null; - object.languageCode = ""; + object.name = ""; + object.displayName = ""; + object.defaultLanguageCode = ""; + object.timeZone = ""; + object.description = ""; + object.avatarUri = ""; + object.speechToTextSettings = null; + object.startFlow = ""; + object.enableStackdriverLogging = false; + object.enableSpellCorrection = false; } - if (message.flow != null && message.hasOwnProperty("flow")) - object.flow = $root.google.cloud.dialogflow.cx.v3beta1.Flow.toObject(message.flow, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.defaultLanguageCode != null && message.hasOwnProperty("defaultLanguageCode")) + object.defaultLanguageCode = message.defaultLanguageCode; + if (message.timeZone != null && message.hasOwnProperty("timeZone")) + object.timeZone = message.timeZone; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.avatarUri != null && message.hasOwnProperty("avatarUri")) + object.avatarUri = message.avatarUri; + if (message.speechToTextSettings != null && message.hasOwnProperty("speechToTextSettings")) + object.speechToTextSettings = $root.google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings.toObject(message.speechToTextSettings, options); + if (message.startFlow != null && message.hasOwnProperty("startFlow")) + object.startFlow = message.startFlow; + if (message.enableStackdriverLogging != null && message.hasOwnProperty("enableStackdriverLogging")) + object.enableStackdriverLogging = message.enableStackdriverLogging; + if (message.enableSpellCorrection != null && message.hasOwnProperty("enableSpellCorrection")) + object.enableSpellCorrection = message.enableSpellCorrection; return object; }; /** - * Converts this UpdateFlowRequest to JSON. + * Converts this Agent to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent * @instance * @returns {Object.} JSON object */ - UpdateFlowRequest.prototype.toJSON = function toJSON() { + Agent.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UpdateFlowRequest; + return Agent; })(); - v3beta1.TrainFlowRequest = (function() { + v3beta1.ListAgentsRequest = (function() { /** - * Properties of a TrainFlowRequest. + * Properties of a ListAgentsRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface ITrainFlowRequest - * @property {string|null} [name] TrainFlowRequest name + * @interface IListAgentsRequest + * @property {string|null} [parent] ListAgentsRequest parent + * @property {number|null} [pageSize] ListAgentsRequest pageSize + * @property {string|null} [pageToken] ListAgentsRequest pageToken */ /** - * Constructs a new TrainFlowRequest. + * Constructs a new ListAgentsRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a TrainFlowRequest. - * @implements ITrainFlowRequest + * @classdesc Represents a ListAgentsRequest. + * @implements IListAgentsRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.ITrainFlowRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IListAgentsRequest=} [properties] Properties to set */ - function TrainFlowRequest(properties) { + function ListAgentsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -44559,75 +44786,101 @@ } /** - * TrainFlowRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest + * ListAgentsRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest * @instance */ - TrainFlowRequest.prototype.name = ""; + ListAgentsRequest.prototype.parent = ""; /** - * Creates a new TrainFlowRequest instance using the specified properties. + * ListAgentsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest + * @instance + */ + ListAgentsRequest.prototype.pageSize = 0; + + /** + * ListAgentsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest + * @instance + */ + ListAgentsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListAgentsRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ITrainFlowRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest} TrainFlowRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.IListAgentsRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest} ListAgentsRequest instance */ - TrainFlowRequest.create = function create(properties) { - return new TrainFlowRequest(properties); + ListAgentsRequest.create = function create(properties) { + return new ListAgentsRequest(properties); }; /** - * Encodes the specified TrainFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest.verify|verify} messages. + * Encodes the specified ListAgentsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ITrainFlowRequest} message TrainFlowRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IListAgentsRequest} message ListAgentsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TrainFlowRequest.encode = function encode(message, writer) { + ListAgentsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); return writer; }; /** - * Encodes the specified TrainFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest.verify|verify} messages. + * Encodes the specified ListAgentsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ITrainFlowRequest} message TrainFlowRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IListAgentsRequest} message ListAgentsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TrainFlowRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListAgentsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TrainFlowRequest message from the specified reader or buffer. + * Decodes a ListAgentsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest} TrainFlowRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest} ListAgentsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TrainFlowRequest.decode = function decode(reader, length) { + ListAgentsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.parent = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -44638,316 +44891,355 @@ }; /** - * Decodes a TrainFlowRequest message from the specified reader or buffer, length delimited. + * Decodes a ListAgentsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest} TrainFlowRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest} ListAgentsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TrainFlowRequest.decodeDelimited = function decodeDelimited(reader) { + ListAgentsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TrainFlowRequest message. + * Verifies a ListAgentsRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TrainFlowRequest.verify = function verify(message) { + ListAgentsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; return null; }; /** - * Creates a TrainFlowRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListAgentsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest} TrainFlowRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest} ListAgentsRequest */ - TrainFlowRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest) + ListAgentsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); return message; }; /** - * Creates a plain object from a TrainFlowRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListAgentsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest} message TrainFlowRequest + * @param {google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest} message ListAgentsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TrainFlowRequest.toObject = function toObject(message, options) { + ListAgentsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; return object; }; /** - * Converts this TrainFlowRequest to JSON. + * Converts this ListAgentsRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest * @instance * @returns {Object.} JSON object */ - TrainFlowRequest.prototype.toJSON = function toJSON() { + ListAgentsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return TrainFlowRequest; + return ListAgentsRequest; })(); - v3beta1.Pages = (function() { + v3beta1.ListAgentsResponse = (function() { /** - * Constructs a new Pages service. + * Properties of a ListAgentsResponse. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a Pages - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function Pages(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (Pages.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Pages; - - /** - * Creates new Pages service using the specified rpc implementation. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.Pages - * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {Pages} RPC service. Useful where requests and/or responses are streamed. - */ - Pages.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Pages#listPages}. - * @memberof google.cloud.dialogflow.cx.v3beta1.Pages - * @typedef ListPagesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3beta1.ListPagesResponse} [response] ListPagesResponse - */ - - /** - * Calls ListPages. - * @function listPages - * @memberof google.cloud.dialogflow.cx.v3beta1.Pages - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IListPagesRequest} request ListPagesRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.Pages.ListPagesCallback} callback Node-style callback called with the error, if any, and ListPagesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Pages.prototype.listPages = function listPages(request, callback) { - return this.rpcCall(listPages, $root.google.cloud.dialogflow.cx.v3beta1.ListPagesRequest, $root.google.cloud.dialogflow.cx.v3beta1.ListPagesResponse, request, callback); - }, "name", { value: "ListPages" }); - - /** - * Calls ListPages. - * @function listPages - * @memberof google.cloud.dialogflow.cx.v3beta1.Pages - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IListPagesRequest} request ListPagesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * @interface IListAgentsResponse + * @property {Array.|null} [agents] ListAgentsResponse agents + * @property {string|null} [nextPageToken] ListAgentsResponse nextPageToken */ /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Pages#getPage}. - * @memberof google.cloud.dialogflow.cx.v3beta1.Pages - * @typedef GetPageCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3beta1.Page} [response] Page + * Constructs a new ListAgentsResponse. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents a ListAgentsResponse. + * @implements IListAgentsResponse + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.IListAgentsResponse=} [properties] Properties to set */ + function ListAgentsResponse(properties) { + this.agents = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Calls GetPage. - * @function getPage - * @memberof google.cloud.dialogflow.cx.v3beta1.Pages + * ListAgentsResponse agents. + * @member {Array.} agents + * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IGetPageRequest} request GetPageRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.Pages.GetPageCallback} callback Node-style callback called with the error, if any, and Page - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(Pages.prototype.getPage = function getPage(request, callback) { - return this.rpcCall(getPage, $root.google.cloud.dialogflow.cx.v3beta1.GetPageRequest, $root.google.cloud.dialogflow.cx.v3beta1.Page, request, callback); - }, "name", { value: "GetPage" }); + ListAgentsResponse.prototype.agents = $util.emptyArray; /** - * Calls GetPage. - * @function getPage - * @memberof google.cloud.dialogflow.cx.v3beta1.Pages + * ListAgentsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IGetPageRequest} request GetPageRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + ListAgentsResponse.prototype.nextPageToken = ""; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Pages#createPage}. - * @memberof google.cloud.dialogflow.cx.v3beta1.Pages - * @typedef CreatePageCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3beta1.Page} [response] Page + * Creates a new ListAgentsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IListAgentsResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse} ListAgentsResponse instance */ + ListAgentsResponse.create = function create(properties) { + return new ListAgentsResponse(properties); + }; /** - * Calls CreatePage. - * @function createPage - * @memberof google.cloud.dialogflow.cx.v3beta1.Pages - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.ICreatePageRequest} request CreatePageRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.Pages.CreatePageCallback} callback Node-style callback called with the error, if any, and Page - * @returns {undefined} - * @variation 1 + * Encodes the specified ListAgentsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IListAgentsResponse} message ListAgentsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(Pages.prototype.createPage = function createPage(request, callback) { - return this.rpcCall(createPage, $root.google.cloud.dialogflow.cx.v3beta1.CreatePageRequest, $root.google.cloud.dialogflow.cx.v3beta1.Page, request, callback); - }, "name", { value: "CreatePage" }); + ListAgentsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.agents != null && message.agents.length) + for (var i = 0; i < message.agents.length; ++i) + $root.google.cloud.dialogflow.cx.v3beta1.Agent.encode(message.agents[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; /** - * Calls CreatePage. - * @function createPage - * @memberof google.cloud.dialogflow.cx.v3beta1.Pages - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.ICreatePageRequest} request CreatePageRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Encodes the specified ListAgentsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IListAgentsResponse} message ListAgentsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + ListAgentsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Pages#updatePage}. - * @memberof google.cloud.dialogflow.cx.v3beta1.Pages - * @typedef UpdatePageCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3beta1.Page} [response] Page + * Decodes a ListAgentsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse} ListAgentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + ListAgentsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.agents && message.agents.length)) + message.agents = []; + message.agents.push($root.google.cloud.dialogflow.cx.v3beta1.Agent.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Calls UpdatePage. - * @function updatePage - * @memberof google.cloud.dialogflow.cx.v3beta1.Pages - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdatePageRequest} request UpdatePageRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.Pages.UpdatePageCallback} callback Node-style callback called with the error, if any, and Page - * @returns {undefined} - * @variation 1 + * Decodes a ListAgentsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse} ListAgentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Object.defineProperty(Pages.prototype.updatePage = function updatePage(request, callback) { - return this.rpcCall(updatePage, $root.google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest, $root.google.cloud.dialogflow.cx.v3beta1.Page, request, callback); - }, "name", { value: "UpdatePage" }); + ListAgentsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls UpdatePage. - * @function updatePage - * @memberof google.cloud.dialogflow.cx.v3beta1.Pages - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdatePageRequest} request UpdatePageRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Verifies a ListAgentsResponse message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ + ListAgentsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.agents != null && message.hasOwnProperty("agents")) { + if (!Array.isArray(message.agents)) + return "agents: array expected"; + for (var i = 0; i < message.agents.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.Agent.verify(message.agents[i]); + if (error) + return "agents." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Pages#deletePage}. - * @memberof google.cloud.dialogflow.cx.v3beta1.Pages - * @typedef DeletePageCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty + * Creates a ListAgentsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse} ListAgentsResponse */ + ListAgentsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse(); + if (object.agents) { + if (!Array.isArray(object.agents)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse.agents: array expected"); + message.agents = []; + for (var i = 0; i < object.agents.length; ++i) { + if (typeof object.agents[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse.agents: object expected"); + message.agents[i] = $root.google.cloud.dialogflow.cx.v3beta1.Agent.fromObject(object.agents[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; /** - * Calls DeletePage. - * @function deletePage - * @memberof google.cloud.dialogflow.cx.v3beta1.Pages - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IDeletePageRequest} request DeletePageRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.Pages.DeletePageCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 + * Creates a plain object from a ListAgentsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse} message ListAgentsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Object.defineProperty(Pages.prototype.deletePage = function deletePage(request, callback) { - return this.rpcCall(deletePage, $root.google.cloud.dialogflow.cx.v3beta1.DeletePageRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeletePage" }); + ListAgentsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.agents = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.agents && message.agents.length) { + object.agents = []; + for (var j = 0; j < message.agents.length; ++j) + object.agents[j] = $root.google.cloud.dialogflow.cx.v3beta1.Agent.toObject(message.agents[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; /** - * Calls DeletePage. - * @function deletePage - * @memberof google.cloud.dialogflow.cx.v3beta1.Pages + * Converts this ListAgentsResponse to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IDeletePageRequest} request DeletePageRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * @returns {Object.} JSON object */ + ListAgentsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return Pages; + return ListAgentsResponse; })(); - v3beta1.Page = (function() { + v3beta1.GetAgentRequest = (function() { /** - * Properties of a Page. + * Properties of a GetAgentRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IPage - * @property {string|null} [name] Page name - * @property {string|null} [displayName] Page displayName - * @property {google.cloud.dialogflow.cx.v3beta1.IFulfillment|null} [entryFulfillment] Page entryFulfillment - * @property {google.cloud.dialogflow.cx.v3beta1.IForm|null} [form] Page form - * @property {Array.|null} [transitionRouteGroups] Page transitionRouteGroups - * @property {Array.|null} [transitionRoutes] Page transitionRoutes - * @property {Array.|null} [eventHandlers] Page eventHandlers + * @interface IGetAgentRequest + * @property {string|null} [name] GetAgentRequest name */ /** - * Constructs a new Page. + * Constructs a new GetAgentRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a Page. - * @implements IPage + * @classdesc Represents a GetAgentRequest. + * @implements IGetAgentRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IPage=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IGetAgentRequest=} [properties] Properties to set */ - function Page(properties) { - this.transitionRouteGroups = []; - this.transitionRoutes = []; - this.eventHandlers = []; + function GetAgentRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -44955,163 +45247,76 @@ } /** - * Page name. + * GetAgentRequest name. * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.Page - * @instance - */ - Page.prototype.name = ""; - - /** - * Page displayName. - * @member {string} displayName - * @memberof google.cloud.dialogflow.cx.v3beta1.Page - * @instance - */ - Page.prototype.displayName = ""; - - /** - * Page entryFulfillment. - * @member {google.cloud.dialogflow.cx.v3beta1.IFulfillment|null|undefined} entryFulfillment - * @memberof google.cloud.dialogflow.cx.v3beta1.Page - * @instance - */ - Page.prototype.entryFulfillment = null; - - /** - * Page form. - * @member {google.cloud.dialogflow.cx.v3beta1.IForm|null|undefined} form - * @memberof google.cloud.dialogflow.cx.v3beta1.Page - * @instance - */ - Page.prototype.form = null; - - /** - * Page transitionRouteGroups. - * @member {Array.} transitionRouteGroups - * @memberof google.cloud.dialogflow.cx.v3beta1.Page - * @instance - */ - Page.prototype.transitionRouteGroups = $util.emptyArray; - - /** - * Page transitionRoutes. - * @member {Array.} transitionRoutes - * @memberof google.cloud.dialogflow.cx.v3beta1.Page - * @instance - */ - Page.prototype.transitionRoutes = $util.emptyArray; - - /** - * Page eventHandlers. - * @member {Array.} eventHandlers - * @memberof google.cloud.dialogflow.cx.v3beta1.Page + * @memberof google.cloud.dialogflow.cx.v3beta1.GetAgentRequest * @instance */ - Page.prototype.eventHandlers = $util.emptyArray; + GetAgentRequest.prototype.name = ""; /** - * Creates a new Page instance using the specified properties. + * Creates a new GetAgentRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.Page + * @memberof google.cloud.dialogflow.cx.v3beta1.GetAgentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IPage=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.Page} Page instance + * @param {google.cloud.dialogflow.cx.v3beta1.IGetAgentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.GetAgentRequest} GetAgentRequest instance */ - Page.create = function create(properties) { - return new Page(properties); + GetAgentRequest.create = function create(properties) { + return new GetAgentRequest(properties); }; /** - * Encodes the specified Page message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Page.verify|verify} messages. + * Encodes the specified GetAgentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetAgentRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.Page + * @memberof google.cloud.dialogflow.cx.v3beta1.GetAgentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IPage} message Page message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IGetAgentRequest} message GetAgentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Page.encode = function encode(message, writer) { + GetAgentRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.form != null && Object.hasOwnProperty.call(message, "form")) - $root.google.cloud.dialogflow.cx.v3beta1.Form.encode(message.form, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.entryFulfillment != null && Object.hasOwnProperty.call(message, "entryFulfillment")) - $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.encode(message.entryFulfillment, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.transitionRoutes != null && message.transitionRoutes.length) - for (var i = 0; i < message.transitionRoutes.length; ++i) - $root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.encode(message.transitionRoutes[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.eventHandlers != null && message.eventHandlers.length) - for (var i = 0; i < message.eventHandlers.length; ++i) - $root.google.cloud.dialogflow.cx.v3beta1.EventHandler.encode(message.eventHandlers[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.transitionRouteGroups != null && message.transitionRouteGroups.length) - for (var i = 0; i < message.transitionRouteGroups.length; ++i) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.transitionRouteGroups[i]); return writer; }; /** - * Encodes the specified Page message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Page.verify|verify} messages. + * Encodes the specified GetAgentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetAgentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Page + * @memberof google.cloud.dialogflow.cx.v3beta1.GetAgentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IPage} message Page message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IGetAgentRequest} message GetAgentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Page.encodeDelimited = function encodeDelimited(message, writer) { + GetAgentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Page message from the specified reader or buffer. + * Decodes a GetAgentRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.Page + * @memberof google.cloud.dialogflow.cx.v3beta1.GetAgentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.Page} Page + * @returns {google.cloud.dialogflow.cx.v3beta1.GetAgentRequest} GetAgentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Page.decode = function decode(reader, length) { + GetAgentRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Page(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.GetAgentRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: message.name = reader.string(); break; - case 2: - message.displayName = reader.string(); - break; - case 7: - message.entryFulfillment = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.decode(reader, reader.uint32()); - break; - case 4: - message.form = $root.google.cloud.dialogflow.cx.v3beta1.Form.decode(reader, reader.uint32()); - break; - case 11: - if (!(message.transitionRouteGroups && message.transitionRouteGroups.length)) - message.transitionRouteGroups = []; - message.transitionRouteGroups.push(reader.string()); - break; - case 9: - if (!(message.transitionRoutes && message.transitionRoutes.length)) - message.transitionRoutes = []; - message.transitionRoutes.push($root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.decode(reader, reader.uint32())); - break; - case 10: - if (!(message.eventHandlers && message.eventHandlers.length)) - message.eventHandlers = []; - message.eventHandlers.push($root.google.cloud.dialogflow.cx.v3beta1.EventHandler.decode(reader, reader.uint32())); - break; default: reader.skipType(tag & 7); break; @@ -45121,215 +45326,108 @@ }; /** - * Decodes a Page message from the specified reader or buffer, length delimited. + * Decodes a GetAgentRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Page + * @memberof google.cloud.dialogflow.cx.v3beta1.GetAgentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.Page} Page + * @returns {google.cloud.dialogflow.cx.v3beta1.GetAgentRequest} GetAgentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Page.decodeDelimited = function decodeDelimited(reader) { + GetAgentRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Page message. + * Verifies a GetAgentRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.Page + * @memberof google.cloud.dialogflow.cx.v3beta1.GetAgentRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Page.verify = function verify(message) { + GetAgentRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.entryFulfillment != null && message.hasOwnProperty("entryFulfillment")) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.verify(message.entryFulfillment); - if (error) - return "entryFulfillment." + error; - } - if (message.form != null && message.hasOwnProperty("form")) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.Form.verify(message.form); - if (error) - return "form." + error; - } - if (message.transitionRouteGroups != null && message.hasOwnProperty("transitionRouteGroups")) { - if (!Array.isArray(message.transitionRouteGroups)) - return "transitionRouteGroups: array expected"; - for (var i = 0; i < message.transitionRouteGroups.length; ++i) - if (!$util.isString(message.transitionRouteGroups[i])) - return "transitionRouteGroups: string[] expected"; - } - if (message.transitionRoutes != null && message.hasOwnProperty("transitionRoutes")) { - if (!Array.isArray(message.transitionRoutes)) - return "transitionRoutes: array expected"; - for (var i = 0; i < message.transitionRoutes.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.verify(message.transitionRoutes[i]); - if (error) - return "transitionRoutes." + error; - } - } - if (message.eventHandlers != null && message.hasOwnProperty("eventHandlers")) { - if (!Array.isArray(message.eventHandlers)) - return "eventHandlers: array expected"; - for (var i = 0; i < message.eventHandlers.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.EventHandler.verify(message.eventHandlers[i]); - if (error) - return "eventHandlers." + error; - } - } return null; }; /** - * Creates a Page message from a plain object. Also converts values to their respective internal types. + * Creates a GetAgentRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Page + * @memberof google.cloud.dialogflow.cx.v3beta1.GetAgentRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.Page} Page + * @returns {google.cloud.dialogflow.cx.v3beta1.GetAgentRequest} GetAgentRequest */ - Page.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Page) + GetAgentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.GetAgentRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.Page(); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.GetAgentRequest(); if (object.name != null) message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.entryFulfillment != null) { - if (typeof object.entryFulfillment !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Page.entryFulfillment: object expected"); - message.entryFulfillment = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.fromObject(object.entryFulfillment); - } - if (object.form != null) { - if (typeof object.form !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Page.form: object expected"); - message.form = $root.google.cloud.dialogflow.cx.v3beta1.Form.fromObject(object.form); - } - if (object.transitionRouteGroups) { - if (!Array.isArray(object.transitionRouteGroups)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Page.transitionRouteGroups: array expected"); - message.transitionRouteGroups = []; - for (var i = 0; i < object.transitionRouteGroups.length; ++i) - message.transitionRouteGroups[i] = String(object.transitionRouteGroups[i]); - } - if (object.transitionRoutes) { - if (!Array.isArray(object.transitionRoutes)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Page.transitionRoutes: array expected"); - message.transitionRoutes = []; - for (var i = 0; i < object.transitionRoutes.length; ++i) { - if (typeof object.transitionRoutes[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Page.transitionRoutes: object expected"); - message.transitionRoutes[i] = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.fromObject(object.transitionRoutes[i]); - } - } - if (object.eventHandlers) { - if (!Array.isArray(object.eventHandlers)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Page.eventHandlers: array expected"); - message.eventHandlers = []; - for (var i = 0; i < object.eventHandlers.length; ++i) { - if (typeof object.eventHandlers[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Page.eventHandlers: object expected"); - message.eventHandlers[i] = $root.google.cloud.dialogflow.cx.v3beta1.EventHandler.fromObject(object.eventHandlers[i]); - } - } return message; }; /** - * Creates a plain object from a Page message. Also converts values to other types if specified. + * Creates a plain object from a GetAgentRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Page + * @memberof google.cloud.dialogflow.cx.v3beta1.GetAgentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Page} message Page + * @param {google.cloud.dialogflow.cx.v3beta1.GetAgentRequest} message GetAgentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Page.toObject = function toObject(message, options) { + GetAgentRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.transitionRoutes = []; - object.eventHandlers = []; - object.transitionRouteGroups = []; - } - if (options.defaults) { + if (options.defaults) object.name = ""; - object.displayName = ""; - object.form = null; - object.entryFulfillment = null; - } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.form != null && message.hasOwnProperty("form")) - object.form = $root.google.cloud.dialogflow.cx.v3beta1.Form.toObject(message.form, options); - if (message.entryFulfillment != null && message.hasOwnProperty("entryFulfillment")) - object.entryFulfillment = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.toObject(message.entryFulfillment, options); - if (message.transitionRoutes && message.transitionRoutes.length) { - object.transitionRoutes = []; - for (var j = 0; j < message.transitionRoutes.length; ++j) - object.transitionRoutes[j] = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.toObject(message.transitionRoutes[j], options); - } - if (message.eventHandlers && message.eventHandlers.length) { - object.eventHandlers = []; - for (var j = 0; j < message.eventHandlers.length; ++j) - object.eventHandlers[j] = $root.google.cloud.dialogflow.cx.v3beta1.EventHandler.toObject(message.eventHandlers[j], options); - } - if (message.transitionRouteGroups && message.transitionRouteGroups.length) { - object.transitionRouteGroups = []; - for (var j = 0; j < message.transitionRouteGroups.length; ++j) - object.transitionRouteGroups[j] = message.transitionRouteGroups[j]; - } return object; }; /** - * Converts this Page to JSON. + * Converts this GetAgentRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.Page + * @memberof google.cloud.dialogflow.cx.v3beta1.GetAgentRequest * @instance * @returns {Object.} JSON object */ - Page.prototype.toJSON = function toJSON() { + GetAgentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Page; + return GetAgentRequest; })(); - v3beta1.Form = (function() { + v3beta1.CreateAgentRequest = (function() { /** - * Properties of a Form. + * Properties of a CreateAgentRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IForm - * @property {Array.|null} [parameters] Form parameters + * @interface ICreateAgentRequest + * @property {string|null} [parent] CreateAgentRequest parent + * @property {google.cloud.dialogflow.cx.v3beta1.IAgent|null} [agent] CreateAgentRequest agent */ /** - * Constructs a new Form. + * Constructs a new CreateAgentRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a Form. - * @implements IForm + * @classdesc Represents a CreateAgentRequest. + * @implements ICreateAgentRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IForm=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.ICreateAgentRequest=} [properties] Properties to set */ - function Form(properties) { - this.parameters = []; + function CreateAgentRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -45337,78 +45435,88 @@ } /** - * Form parameters. - * @member {Array.} parameters - * @memberof google.cloud.dialogflow.cx.v3beta1.Form + * CreateAgentRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest * @instance */ - Form.prototype.parameters = $util.emptyArray; + CreateAgentRequest.prototype.parent = ""; /** - * Creates a new Form instance using the specified properties. + * CreateAgentRequest agent. + * @member {google.cloud.dialogflow.cx.v3beta1.IAgent|null|undefined} agent + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest + * @instance + */ + CreateAgentRequest.prototype.agent = null; + + /** + * Creates a new CreateAgentRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.Form + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IForm=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.Form} Form instance + * @param {google.cloud.dialogflow.cx.v3beta1.ICreateAgentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest} CreateAgentRequest instance */ - Form.create = function create(properties) { - return new Form(properties); + CreateAgentRequest.create = function create(properties) { + return new CreateAgentRequest(properties); }; /** - * Encodes the specified Form message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Form.verify|verify} messages. + * Encodes the specified CreateAgentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.Form + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IForm} message Form message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.ICreateAgentRequest} message CreateAgentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Form.encode = function encode(message, writer) { + CreateAgentRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parameters != null && message.parameters.length) - for (var i = 0; i < message.parameters.length; ++i) - $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.encode(message.parameters[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.agent != null && Object.hasOwnProperty.call(message, "agent")) + $root.google.cloud.dialogflow.cx.v3beta1.Agent.encode(message.agent, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified Form message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Form.verify|verify} messages. + * Encodes the specified CreateAgentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Form + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IForm} message Form message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.ICreateAgentRequest} message CreateAgentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Form.encodeDelimited = function encodeDelimited(message, writer) { + CreateAgentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Form message from the specified reader or buffer. + * Decodes a CreateAgentRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.Form + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.Form} Form + * @returns {google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest} CreateAgentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Form.decode = function decode(reader, length) { + CreateAgentRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Form(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.parameters && message.parameters.length)) - message.parameters = []; - message.parameters.push($root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.decode(reader, reader.uint32())); + message.parent = reader.string(); + break; + case 2: + message.agent = $root.google.cloud.dialogflow.cx.v3beta1.Agent.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -45419,694 +45527,529 @@ }; /** - * Decodes a Form message from the specified reader or buffer, length delimited. + * Decodes a CreateAgentRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Form + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.Form} Form + * @returns {google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest} CreateAgentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Form.decodeDelimited = function decodeDelimited(reader) { + CreateAgentRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Form message. + * Verifies a CreateAgentRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.Form + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Form.verify = function verify(message) { + CreateAgentRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parameters != null && message.hasOwnProperty("parameters")) { - if (!Array.isArray(message.parameters)) - return "parameters: array expected"; - for (var i = 0; i < message.parameters.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.verify(message.parameters[i]); - if (error) - return "parameters." + error; - } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.agent != null && message.hasOwnProperty("agent")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.Agent.verify(message.agent); + if (error) + return "agent." + error; } return null; }; /** - * Creates a Form message from a plain object. Also converts values to their respective internal types. + * Creates a CreateAgentRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Form + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.Form} Form + * @returns {google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest} CreateAgentRequest */ - Form.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Form) + CreateAgentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.Form(); - if (object.parameters) { - if (!Array.isArray(object.parameters)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Form.parameters: array expected"); - message.parameters = []; - for (var i = 0; i < object.parameters.length; ++i) { - if (typeof object.parameters[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Form.parameters: object expected"); - message.parameters[i] = $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.fromObject(object.parameters[i]); - } + var message = new $root.google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.agent != null) { + if (typeof object.agent !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest.agent: object expected"); + message.agent = $root.google.cloud.dialogflow.cx.v3beta1.Agent.fromObject(object.agent); } return message; }; /** - * Creates a plain object from a Form message. Also converts values to other types if specified. + * Creates a plain object from a CreateAgentRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Form + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Form} message Form + * @param {google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest} message CreateAgentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Form.toObject = function toObject(message, options) { + CreateAgentRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.parameters = []; - if (message.parameters && message.parameters.length) { - object.parameters = []; - for (var j = 0; j < message.parameters.length; ++j) - object.parameters[j] = $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.toObject(message.parameters[j], options); + if (options.defaults) { + object.parent = ""; + object.agent = null; } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.agent != null && message.hasOwnProperty("agent")) + object.agent = $root.google.cloud.dialogflow.cx.v3beta1.Agent.toObject(message.agent, options); return object; }; /** - * Converts this Form to JSON. + * Converts this CreateAgentRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.Form + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest * @instance * @returns {Object.} JSON object */ - Form.prototype.toJSON = function toJSON() { + CreateAgentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - Form.Parameter = (function() { + return CreateAgentRequest; + })(); - /** - * Properties of a Parameter. - * @memberof google.cloud.dialogflow.cx.v3beta1.Form - * @interface IParameter - * @property {string|null} [displayName] Parameter displayName - * @property {boolean|null} [required] Parameter required - * @property {string|null} [entityType] Parameter entityType - * @property {boolean|null} [isList] Parameter isList - * @property {google.cloud.dialogflow.cx.v3beta1.Form.Parameter.IFillBehavior|null} [fillBehavior] Parameter fillBehavior - * @property {google.protobuf.IValue|null} [defaultValue] Parameter defaultValue - * @property {boolean|null} [redact] Parameter redact - */ + v3beta1.UpdateAgentRequest = (function() { - /** - * Constructs a new Parameter. - * @memberof google.cloud.dialogflow.cx.v3beta1.Form - * @classdesc Represents a Parameter. - * @implements IParameter - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.Form.IParameter=} [properties] Properties to set - */ - function Parameter(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of an UpdateAgentRequest. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @interface IUpdateAgentRequest + * @property {google.cloud.dialogflow.cx.v3beta1.IAgent|null} [agent] UpdateAgentRequest agent + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateAgentRequest updateMask + */ - /** - * Parameter displayName. - * @member {string} displayName - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter - * @instance - */ - Parameter.prototype.displayName = ""; + /** + * Constructs a new UpdateAgentRequest. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents an UpdateAgentRequest. + * @implements IUpdateAgentRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateAgentRequest=} [properties] Properties to set + */ + function UpdateAgentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Parameter required. - * @member {boolean} required - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter - * @instance - */ - Parameter.prototype.required = false; + /** + * UpdateAgentRequest agent. + * @member {google.cloud.dialogflow.cx.v3beta1.IAgent|null|undefined} agent + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest + * @instance + */ + UpdateAgentRequest.prototype.agent = null; - /** - * Parameter entityType. - * @member {string} entityType - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter - * @instance - */ - Parameter.prototype.entityType = ""; + /** + * UpdateAgentRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest + * @instance + */ + UpdateAgentRequest.prototype.updateMask = null; - /** - * Parameter isList. - * @member {boolean} isList - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter - * @instance - */ - Parameter.prototype.isList = false; + /** + * Creates a new UpdateAgentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateAgentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest} UpdateAgentRequest instance + */ + UpdateAgentRequest.create = function create(properties) { + return new UpdateAgentRequest(properties); + }; - /** - * Parameter fillBehavior. - * @member {google.cloud.dialogflow.cx.v3beta1.Form.Parameter.IFillBehavior|null|undefined} fillBehavior - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter - * @instance - */ - Parameter.prototype.fillBehavior = null; + /** + * Encodes the specified UpdateAgentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateAgentRequest} message UpdateAgentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateAgentRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.agent != null && Object.hasOwnProperty.call(message, "agent")) + $root.google.cloud.dialogflow.cx.v3beta1.Agent.encode(message.agent, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; - /** - * Parameter defaultValue. - * @member {google.protobuf.IValue|null|undefined} defaultValue - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter - * @instance - */ - Parameter.prototype.defaultValue = null; + /** + * Encodes the specified UpdateAgentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateAgentRequest} message UpdateAgentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateAgentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Parameter redact. - * @member {boolean} redact - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter - * @instance - */ - Parameter.prototype.redact = false; + /** + * Decodes an UpdateAgentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest} UpdateAgentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateAgentRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.agent = $root.google.cloud.dialogflow.cx.v3beta1.Agent.decode(reader, reader.uint32()); + break; + case 2: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Creates a new Parameter instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Form.IParameter=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.Form.Parameter} Parameter instance - */ - Parameter.create = function create(properties) { - return new Parameter(properties); - }; + /** + * Decodes an UpdateAgentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest} UpdateAgentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateAgentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Encodes the specified Parameter message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Form.Parameter.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Form.IParameter} message Parameter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Parameter.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.required != null && Object.hasOwnProperty.call(message, "required")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.required); - if (message.entityType != null && Object.hasOwnProperty.call(message, "entityType")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.entityType); - if (message.isList != null && Object.hasOwnProperty.call(message, "isList")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.isList); - if (message.fillBehavior != null && Object.hasOwnProperty.call(message, "fillBehavior")) - $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.encode(message.fillBehavior, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) - $root.google.protobuf.Value.encode(message.defaultValue, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.redact != null && Object.hasOwnProperty.call(message, "redact")) - writer.uint32(/* id 11, wireType 0 =*/88).bool(message.redact); - return writer; - }; - - /** - * Encodes the specified Parameter message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Form.Parameter.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Form.IParameter} message Parameter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Parameter.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Verifies an UpdateAgentRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateAgentRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.agent != null && message.hasOwnProperty("agent")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.Agent.verify(message.agent); + if (error) + return "agent." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + return null; + }; - /** - * Decodes a Parameter message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.Form.Parameter} Parameter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Parameter.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.displayName = reader.string(); - break; - case 2: - message.required = reader.bool(); - break; - case 3: - message.entityType = reader.string(); - break; - case 4: - message.isList = reader.bool(); - break; - case 7: - message.fillBehavior = $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.decode(reader, reader.uint32()); - break; - case 9: - message.defaultValue = $root.google.protobuf.Value.decode(reader, reader.uint32()); - break; - case 11: - message.redact = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Creates an UpdateAgentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest} UpdateAgentRequest + */ + UpdateAgentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest(); + if (object.agent != null) { + if (typeof object.agent !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest.agent: object expected"); + message.agent = $root.google.cloud.dialogflow.cx.v3beta1.Agent.fromObject(object.agent); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; - /** - * Decodes a Parameter message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.Form.Parameter} Parameter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Parameter.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a plain object from an UpdateAgentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest} message UpdateAgentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateAgentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.agent = null; + object.updateMask = null; + } + if (message.agent != null && message.hasOwnProperty("agent")) + object.agent = $root.google.cloud.dialogflow.cx.v3beta1.Agent.toObject(message.agent, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; - /** - * Verifies a Parameter message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Parameter.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.required != null && message.hasOwnProperty("required")) - if (typeof message.required !== "boolean") - return "required: boolean expected"; - if (message.entityType != null && message.hasOwnProperty("entityType")) - if (!$util.isString(message.entityType)) - return "entityType: string expected"; - if (message.isList != null && message.hasOwnProperty("isList")) - if (typeof message.isList !== "boolean") - return "isList: boolean expected"; - if (message.fillBehavior != null && message.hasOwnProperty("fillBehavior")) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.verify(message.fillBehavior); - if (error) - return "fillBehavior." + error; - } - if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) { - var error = $root.google.protobuf.Value.verify(message.defaultValue); - if (error) - return "defaultValue." + error; - } - if (message.redact != null && message.hasOwnProperty("redact")) - if (typeof message.redact !== "boolean") - return "redact: boolean expected"; - return null; - }; + /** + * Converts this UpdateAgentRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateAgentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates a Parameter message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.Form.Parameter} Parameter - */ - Parameter.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.required != null) - message.required = Boolean(object.required); - if (object.entityType != null) - message.entityType = String(object.entityType); - if (object.isList != null) - message.isList = Boolean(object.isList); - if (object.fillBehavior != null) { - if (typeof object.fillBehavior !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Form.Parameter.fillBehavior: object expected"); - message.fillBehavior = $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.fromObject(object.fillBehavior); - } - if (object.defaultValue != null) { - if (typeof object.defaultValue !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Form.Parameter.defaultValue: object expected"); - message.defaultValue = $root.google.protobuf.Value.fromObject(object.defaultValue); - } - if (object.redact != null) - message.redact = Boolean(object.redact); - return message; - }; + return UpdateAgentRequest; + })(); - /** - * Creates a plain object from a Parameter message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Form.Parameter} message Parameter - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Parameter.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.displayName = ""; - object.required = false; - object.entityType = ""; - object.isList = false; - object.fillBehavior = null; - object.defaultValue = null; - object.redact = false; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.required != null && message.hasOwnProperty("required")) - object.required = message.required; - if (message.entityType != null && message.hasOwnProperty("entityType")) - object.entityType = message.entityType; - if (message.isList != null && message.hasOwnProperty("isList")) - object.isList = message.isList; - if (message.fillBehavior != null && message.hasOwnProperty("fillBehavior")) - object.fillBehavior = $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.toObject(message.fillBehavior, options); - if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) - object.defaultValue = $root.google.protobuf.Value.toObject(message.defaultValue, options); - if (message.redact != null && message.hasOwnProperty("redact")) - object.redact = message.redact; - return object; - }; + v3beta1.DeleteAgentRequest = (function() { - /** - * Converts this Parameter to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter - * @instance - * @returns {Object.} JSON object - */ - Parameter.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Properties of a DeleteAgentRequest. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @interface IDeleteAgentRequest + * @property {string|null} [name] DeleteAgentRequest name + */ - Parameter.FillBehavior = (function() { + /** + * Constructs a new DeleteAgentRequest. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents a DeleteAgentRequest. + * @implements IDeleteAgentRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteAgentRequest=} [properties] Properties to set + */ + function DeleteAgentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Properties of a FillBehavior. - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter - * @interface IFillBehavior - * @property {google.cloud.dialogflow.cx.v3beta1.IFulfillment|null} [initialPromptFulfillment] FillBehavior initialPromptFulfillment - * @property {Array.|null} [repromptEventHandlers] FillBehavior repromptEventHandlers - */ + /** + * DeleteAgentRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest + * @instance + */ + DeleteAgentRequest.prototype.name = ""; - /** - * Constructs a new FillBehavior. - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter - * @classdesc Represents a FillBehavior. - * @implements IFillBehavior - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.Form.Parameter.IFillBehavior=} [properties] Properties to set - */ - function FillBehavior(properties) { - this.repromptEventHandlers = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Creates a new DeleteAgentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteAgentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest} DeleteAgentRequest instance + */ + DeleteAgentRequest.create = function create(properties) { + return new DeleteAgentRequest(properties); + }; - /** - * FillBehavior initialPromptFulfillment. - * @member {google.cloud.dialogflow.cx.v3beta1.IFulfillment|null|undefined} initialPromptFulfillment - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior - * @instance - */ - FillBehavior.prototype.initialPromptFulfillment = null; + /** + * Encodes the specified DeleteAgentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteAgentRequest} message DeleteAgentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteAgentRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; - /** - * FillBehavior repromptEventHandlers. - * @member {Array.} repromptEventHandlers - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior - * @instance - */ - FillBehavior.prototype.repromptEventHandlers = $util.emptyArray; + /** + * Encodes the specified DeleteAgentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteAgentRequest} message DeleteAgentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteAgentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a new FillBehavior instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Form.Parameter.IFillBehavior=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior} FillBehavior instance - */ - FillBehavior.create = function create(properties) { - return new FillBehavior(properties); - }; + /** + * Decodes a DeleteAgentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest} DeleteAgentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteAgentRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Encodes the specified FillBehavior message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Form.Parameter.IFillBehavior} message FillBehavior message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FillBehavior.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.initialPromptFulfillment != null && Object.hasOwnProperty.call(message, "initialPromptFulfillment")) - $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.encode(message.initialPromptFulfillment, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.repromptEventHandlers != null && message.repromptEventHandlers.length) - for (var i = 0; i < message.repromptEventHandlers.length; ++i) - $root.google.cloud.dialogflow.cx.v3beta1.EventHandler.encode(message.repromptEventHandlers[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; + /** + * Decodes a DeleteAgentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest} DeleteAgentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteAgentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Encodes the specified FillBehavior message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Form.Parameter.IFillBehavior} message FillBehavior message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FillBehavior.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Verifies a DeleteAgentRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteAgentRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; - /** - * Decodes a FillBehavior message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior} FillBehavior - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FillBehavior.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 3: - message.initialPromptFulfillment = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.decode(reader, reader.uint32()); - break; - case 5: - if (!(message.repromptEventHandlers && message.repromptEventHandlers.length)) - message.repromptEventHandlers = []; - message.repromptEventHandlers.push($root.google.cloud.dialogflow.cx.v3beta1.EventHandler.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FillBehavior message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior} FillBehavior - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FillBehavior.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FillBehavior message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FillBehavior.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.initialPromptFulfillment != null && message.hasOwnProperty("initialPromptFulfillment")) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.verify(message.initialPromptFulfillment); - if (error) - return "initialPromptFulfillment." + error; - } - if (message.repromptEventHandlers != null && message.hasOwnProperty("repromptEventHandlers")) { - if (!Array.isArray(message.repromptEventHandlers)) - return "repromptEventHandlers: array expected"; - for (var i = 0; i < message.repromptEventHandlers.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.EventHandler.verify(message.repromptEventHandlers[i]); - if (error) - return "repromptEventHandlers." + error; - } - } - return null; - }; - - /** - * Creates a FillBehavior message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior} FillBehavior - */ - FillBehavior.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior(); - if (object.initialPromptFulfillment != null) { - if (typeof object.initialPromptFulfillment !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.initialPromptFulfillment: object expected"); - message.initialPromptFulfillment = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.fromObject(object.initialPromptFulfillment); - } - if (object.repromptEventHandlers) { - if (!Array.isArray(object.repromptEventHandlers)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.repromptEventHandlers: array expected"); - message.repromptEventHandlers = []; - for (var i = 0; i < object.repromptEventHandlers.length; ++i) { - if (typeof object.repromptEventHandlers[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.repromptEventHandlers: object expected"); - message.repromptEventHandlers[i] = $root.google.cloud.dialogflow.cx.v3beta1.EventHandler.fromObject(object.repromptEventHandlers[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a FillBehavior message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior} message FillBehavior - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FillBehavior.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.repromptEventHandlers = []; - if (options.defaults) - object.initialPromptFulfillment = null; - if (message.initialPromptFulfillment != null && message.hasOwnProperty("initialPromptFulfillment")) - object.initialPromptFulfillment = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.toObject(message.initialPromptFulfillment, options); - if (message.repromptEventHandlers && message.repromptEventHandlers.length) { - object.repromptEventHandlers = []; - for (var j = 0; j < message.repromptEventHandlers.length; ++j) - object.repromptEventHandlers[j] = $root.google.cloud.dialogflow.cx.v3beta1.EventHandler.toObject(message.repromptEventHandlers[j], options); - } - return object; - }; - - /** - * Converts this FillBehavior to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior - * @instance - * @returns {Object.} JSON object - */ - FillBehavior.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a DeleteAgentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest} DeleteAgentRequest + */ + DeleteAgentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; - return FillBehavior; - })(); + /** + * Creates a plain object from a DeleteAgentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest} message DeleteAgentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteAgentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; - return Parameter; - })(); + /** + * Converts this DeleteAgentRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteAgentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return Form; + return DeleteAgentRequest; })(); - v3beta1.EventHandler = (function() { + v3beta1.ExportAgentRequest = (function() { /** - * Properties of an EventHandler. + * Properties of an ExportAgentRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IEventHandler - * @property {string|null} [name] EventHandler name - * @property {string|null} [event] EventHandler event - * @property {google.cloud.dialogflow.cx.v3beta1.IFulfillment|null} [triggerFulfillment] EventHandler triggerFulfillment - * @property {string|null} [targetPage] EventHandler targetPage - * @property {string|null} [targetFlow] EventHandler targetFlow + * @interface IExportAgentRequest + * @property {string|null} [name] ExportAgentRequest name + * @property {string|null} [agentUri] ExportAgentRequest agentUri */ /** - * Constructs a new EventHandler. + * Constructs a new ExportAgentRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents an EventHandler. - * @implements IEventHandler + * @classdesc Represents an ExportAgentRequest. + * @implements IExportAgentRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IEventHandler=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IExportAgentRequest=} [properties] Properties to set */ - function EventHandler(properties) { + function ExportAgentRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -46114,141 +46057,88 @@ } /** - * EventHandler name. + * ExportAgentRequest name. * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler - * @instance - */ - EventHandler.prototype.name = ""; - - /** - * EventHandler event. - * @member {string} event - * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler - * @instance - */ - EventHandler.prototype.event = ""; - - /** - * EventHandler triggerFulfillment. - * @member {google.cloud.dialogflow.cx.v3beta1.IFulfillment|null|undefined} triggerFulfillment - * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler - * @instance - */ - EventHandler.prototype.triggerFulfillment = null; - - /** - * EventHandler targetPage. - * @member {string} targetPage - * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler - * @instance - */ - EventHandler.prototype.targetPage = ""; - - /** - * EventHandler targetFlow. - * @member {string} targetFlow - * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest * @instance */ - EventHandler.prototype.targetFlow = ""; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + ExportAgentRequest.prototype.name = ""; /** - * EventHandler target. - * @member {"targetPage"|"targetFlow"|undefined} target - * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler + * ExportAgentRequest agentUri. + * @member {string} agentUri + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest * @instance */ - Object.defineProperty(EventHandler.prototype, "target", { - get: $util.oneOfGetter($oneOfFields = ["targetPage", "targetFlow"]), - set: $util.oneOfSetter($oneOfFields) - }); + ExportAgentRequest.prototype.agentUri = ""; /** - * Creates a new EventHandler instance using the specified properties. + * Creates a new ExportAgentRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IEventHandler=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.EventHandler} EventHandler instance + * @param {google.cloud.dialogflow.cx.v3beta1.IExportAgentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest} ExportAgentRequest instance */ - EventHandler.create = function create(properties) { - return new EventHandler(properties); + ExportAgentRequest.create = function create(properties) { + return new ExportAgentRequest(properties); }; /** - * Encodes the specified EventHandler message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.EventHandler.verify|verify} messages. + * Encodes the specified ExportAgentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IEventHandler} message EventHandler message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IExportAgentRequest} message ExportAgentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EventHandler.encode = function encode(message, writer) { + ExportAgentRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.targetPage != null && Object.hasOwnProperty.call(message, "targetPage")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.targetPage); - if (message.targetFlow != null && Object.hasOwnProperty.call(message, "targetFlow")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.targetFlow); - if (message.event != null && Object.hasOwnProperty.call(message, "event")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.event); - if (message.triggerFulfillment != null && Object.hasOwnProperty.call(message, "triggerFulfillment")) - $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.encode(message.triggerFulfillment, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.agentUri != null && Object.hasOwnProperty.call(message, "agentUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.agentUri); return writer; }; /** - * Encodes the specified EventHandler message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.EventHandler.verify|verify} messages. + * Encodes the specified ExportAgentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IEventHandler} message EventHandler message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IExportAgentRequest} message ExportAgentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EventHandler.encodeDelimited = function encodeDelimited(message, writer) { + ExportAgentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an EventHandler message from the specified reader or buffer. + * Decodes an ExportAgentRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.EventHandler} EventHandler + * @returns {google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest} ExportAgentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EventHandler.decode = function decode(reader, length) { + ExportAgentRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.EventHandler(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 6: + case 1: message.name = reader.string(); break; - case 4: - message.event = reader.string(); - break; - case 5: - message.triggerFulfillment = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.decode(reader, reader.uint32()); - break; case 2: - message.targetPage = reader.string(); - break; - case 3: - message.targetFlow = reader.string(); + message.agentUri = reader.string(); break; default: reader.skipType(tag & 7); @@ -46259,161 +46149,117 @@ }; /** - * Decodes an EventHandler message from the specified reader or buffer, length delimited. + * Decodes an ExportAgentRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.EventHandler} EventHandler + * @returns {google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest} ExportAgentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EventHandler.decodeDelimited = function decodeDelimited(reader) { + ExportAgentRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an EventHandler message. + * Verifies an ExportAgentRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - EventHandler.verify = function verify(message) { + ExportAgentRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.event != null && message.hasOwnProperty("event")) - if (!$util.isString(message.event)) - return "event: string expected"; - if (message.triggerFulfillment != null && message.hasOwnProperty("triggerFulfillment")) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.verify(message.triggerFulfillment); - if (error) - return "triggerFulfillment." + error; - } - if (message.targetPage != null && message.hasOwnProperty("targetPage")) { - properties.target = 1; - if (!$util.isString(message.targetPage)) - return "targetPage: string expected"; - } - if (message.targetFlow != null && message.hasOwnProperty("targetFlow")) { - if (properties.target === 1) - return "target: multiple values"; - properties.target = 1; - if (!$util.isString(message.targetFlow)) - return "targetFlow: string expected"; - } + if (message.agentUri != null && message.hasOwnProperty("agentUri")) + if (!$util.isString(message.agentUri)) + return "agentUri: string expected"; return null; }; /** - * Creates an EventHandler message from a plain object. Also converts values to their respective internal types. + * Creates an ExportAgentRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.EventHandler} EventHandler + * @returns {google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest} ExportAgentRequest */ - EventHandler.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.EventHandler) + ExportAgentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.EventHandler(); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest(); if (object.name != null) message.name = String(object.name); - if (object.event != null) - message.event = String(object.event); - if (object.triggerFulfillment != null) { - if (typeof object.triggerFulfillment !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.EventHandler.triggerFulfillment: object expected"); - message.triggerFulfillment = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.fromObject(object.triggerFulfillment); - } - if (object.targetPage != null) - message.targetPage = String(object.targetPage); - if (object.targetFlow != null) - message.targetFlow = String(object.targetFlow); + if (object.agentUri != null) + message.agentUri = String(object.agentUri); return message; }; /** - * Creates a plain object from an EventHandler message. Also converts values to other types if specified. + * Creates a plain object from an ExportAgentRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.EventHandler} message EventHandler + * @param {google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest} message ExportAgentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EventHandler.toObject = function toObject(message, options) { + ExportAgentRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.event = ""; - object.triggerFulfillment = null; object.name = ""; + object.agentUri = ""; } - if (message.targetPage != null && message.hasOwnProperty("targetPage")) { - object.targetPage = message.targetPage; - if (options.oneofs) - object.target = "targetPage"; - } - if (message.targetFlow != null && message.hasOwnProperty("targetFlow")) { - object.targetFlow = message.targetFlow; - if (options.oneofs) - object.target = "targetFlow"; - } - if (message.event != null && message.hasOwnProperty("event")) - object.event = message.event; - if (message.triggerFulfillment != null && message.hasOwnProperty("triggerFulfillment")) - object.triggerFulfillment = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.toObject(message.triggerFulfillment, options); if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; + if (message.agentUri != null && message.hasOwnProperty("agentUri")) + object.agentUri = message.agentUri; return object; }; /** - * Converts this EventHandler to JSON. + * Converts this ExportAgentRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest * @instance * @returns {Object.} JSON object */ - EventHandler.prototype.toJSON = function toJSON() { + ExportAgentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return EventHandler; + return ExportAgentRequest; })(); - v3beta1.TransitionRoute = (function() { + v3beta1.ExportAgentResponse = (function() { /** - * Properties of a TransitionRoute. + * Properties of an ExportAgentResponse. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface ITransitionRoute - * @property {string|null} [name] TransitionRoute name - * @property {string|null} [intent] TransitionRoute intent - * @property {string|null} [condition] TransitionRoute condition - * @property {google.cloud.dialogflow.cx.v3beta1.IFulfillment|null} [triggerFulfillment] TransitionRoute triggerFulfillment - * @property {string|null} [targetPage] TransitionRoute targetPage - * @property {string|null} [targetFlow] TransitionRoute targetFlow + * @interface IExportAgentResponse + * @property {string|null} [agentUri] ExportAgentResponse agentUri + * @property {Uint8Array|null} [agentContent] ExportAgentResponse agentContent */ /** - * Constructs a new TransitionRoute. + * Constructs a new ExportAgentResponse. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a TransitionRoute. - * @implements ITransitionRoute + * @classdesc Represents an ExportAgentResponse. + * @implements IExportAgentResponse * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.ITransitionRoute=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IExportAgentResponse=} [properties] Properties to set */ - function TransitionRoute(properties) { + function ExportAgentResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -46421,154 +46267,102 @@ } /** - * TransitionRoute name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute - * @instance - */ - TransitionRoute.prototype.name = ""; - - /** - * TransitionRoute intent. - * @member {string} intent - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute - * @instance - */ - TransitionRoute.prototype.intent = ""; - - /** - * TransitionRoute condition. - * @member {string} condition - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute - * @instance - */ - TransitionRoute.prototype.condition = ""; - - /** - * TransitionRoute triggerFulfillment. - * @member {google.cloud.dialogflow.cx.v3beta1.IFulfillment|null|undefined} triggerFulfillment - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute - * @instance - */ - TransitionRoute.prototype.triggerFulfillment = null; - - /** - * TransitionRoute targetPage. - * @member {string} targetPage - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute + * ExportAgentResponse agentUri. + * @member {string} agentUri + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse * @instance */ - TransitionRoute.prototype.targetPage = ""; + ExportAgentResponse.prototype.agentUri = ""; /** - * TransitionRoute targetFlow. - * @member {string} targetFlow - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute + * ExportAgentResponse agentContent. + * @member {Uint8Array} agentContent + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse * @instance */ - TransitionRoute.prototype.targetFlow = ""; + ExportAgentResponse.prototype.agentContent = $util.newBuffer([]); // OneOf field names bound to virtual getters and setters var $oneOfFields; /** - * TransitionRoute target. - * @member {"targetPage"|"targetFlow"|undefined} target - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute + * ExportAgentResponse agent. + * @member {"agentUri"|"agentContent"|undefined} agent + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse * @instance */ - Object.defineProperty(TransitionRoute.prototype, "target", { - get: $util.oneOfGetter($oneOfFields = ["targetPage", "targetFlow"]), + Object.defineProperty(ExportAgentResponse.prototype, "agent", { + get: $util.oneOfGetter($oneOfFields = ["agentUri", "agentContent"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new TransitionRoute instance using the specified properties. + * Creates a new ExportAgentResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ITransitionRoute=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.TransitionRoute} TransitionRoute instance + * @param {google.cloud.dialogflow.cx.v3beta1.IExportAgentResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse} ExportAgentResponse instance */ - TransitionRoute.create = function create(properties) { - return new TransitionRoute(properties); + ExportAgentResponse.create = function create(properties) { + return new ExportAgentResponse(properties); }; /** - * Encodes the specified TransitionRoute message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TransitionRoute.verify|verify} messages. + * Encodes the specified ExportAgentResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ITransitionRoute} message TransitionRoute message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IExportAgentResponse} message ExportAgentResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TransitionRoute.encode = function encode(message, writer) { + ExportAgentResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.intent != null && Object.hasOwnProperty.call(message, "intent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.intent); - if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.condition); - if (message.triggerFulfillment != null && Object.hasOwnProperty.call(message, "triggerFulfillment")) - $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.encode(message.triggerFulfillment, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.targetPage != null && Object.hasOwnProperty.call(message, "targetPage")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.targetPage); - if (message.targetFlow != null && Object.hasOwnProperty.call(message, "targetFlow")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.targetFlow); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); + if (message.agentUri != null && Object.hasOwnProperty.call(message, "agentUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.agentUri); + if (message.agentContent != null && Object.hasOwnProperty.call(message, "agentContent")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.agentContent); return writer; }; /** - * Encodes the specified TransitionRoute message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TransitionRoute.verify|verify} messages. + * Encodes the specified ExportAgentResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ITransitionRoute} message TransitionRoute message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IExportAgentResponse} message ExportAgentResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TransitionRoute.encodeDelimited = function encodeDelimited(message, writer) { + ExportAgentResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TransitionRoute message from the specified reader or buffer. + * Decodes an ExportAgentResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.TransitionRoute} TransitionRoute + * @returns {google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse} ExportAgentResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TransitionRoute.decode = function decode(reader, length) { + ExportAgentResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 6: - message.name = reader.string(); - break; case 1: - message.intent = reader.string(); + message.agentUri = reader.string(); break; case 2: - message.condition = reader.string(); - break; - case 3: - message.triggerFulfillment = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.decode(reader, reader.uint32()); - break; - case 4: - message.targetPage = reader.string(); - break; - case 5: - message.targetFlow = reader.string(); + message.agentContent = reader.bytes(); break; default: reader.skipType(tag & 7); @@ -46579,167 +46373,130 @@ }; /** - * Decodes a TransitionRoute message from the specified reader or buffer, length delimited. + * Decodes an ExportAgentResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.TransitionRoute} TransitionRoute + * @returns {google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse} ExportAgentResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TransitionRoute.decodeDelimited = function decodeDelimited(reader) { + ExportAgentResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TransitionRoute message. + * Verifies an ExportAgentResponse message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TransitionRoute.verify = function verify(message) { + ExportAgentResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.intent != null && message.hasOwnProperty("intent")) - if (!$util.isString(message.intent)) - return "intent: string expected"; - if (message.condition != null && message.hasOwnProperty("condition")) - if (!$util.isString(message.condition)) - return "condition: string expected"; - if (message.triggerFulfillment != null && message.hasOwnProperty("triggerFulfillment")) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.verify(message.triggerFulfillment); - if (error) - return "triggerFulfillment." + error; - } - if (message.targetPage != null && message.hasOwnProperty("targetPage")) { - properties.target = 1; - if (!$util.isString(message.targetPage)) - return "targetPage: string expected"; + if (message.agentUri != null && message.hasOwnProperty("agentUri")) { + properties.agent = 1; + if (!$util.isString(message.agentUri)) + return "agentUri: string expected"; } - if (message.targetFlow != null && message.hasOwnProperty("targetFlow")) { - if (properties.target === 1) - return "target: multiple values"; - properties.target = 1; - if (!$util.isString(message.targetFlow)) - return "targetFlow: string expected"; + if (message.agentContent != null && message.hasOwnProperty("agentContent")) { + if (properties.agent === 1) + return "agent: multiple values"; + properties.agent = 1; + if (!(message.agentContent && typeof message.agentContent.length === "number" || $util.isString(message.agentContent))) + return "agentContent: buffer expected"; } return null; }; /** - * Creates a TransitionRoute message from a plain object. Also converts values to their respective internal types. + * Creates an ExportAgentResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.TransitionRoute} TransitionRoute + * @returns {google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse} ExportAgentResponse */ - TransitionRoute.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute) + ExportAgentResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute(); - if (object.name != null) - message.name = String(object.name); - if (object.intent != null) - message.intent = String(object.intent); - if (object.condition != null) - message.condition = String(object.condition); - if (object.triggerFulfillment != null) { - if (typeof object.triggerFulfillment !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.TransitionRoute.triggerFulfillment: object expected"); - message.triggerFulfillment = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.fromObject(object.triggerFulfillment); - } - if (object.targetPage != null) - message.targetPage = String(object.targetPage); - if (object.targetFlow != null) - message.targetFlow = String(object.targetFlow); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse(); + if (object.agentUri != null) + message.agentUri = String(object.agentUri); + if (object.agentContent != null) + if (typeof object.agentContent === "string") + $util.base64.decode(object.agentContent, message.agentContent = $util.newBuffer($util.base64.length(object.agentContent)), 0); + else if (object.agentContent.length) + message.agentContent = object.agentContent; return message; }; /** - * Creates a plain object from a TransitionRoute message. Also converts values to other types if specified. + * Creates a plain object from an ExportAgentResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.TransitionRoute} message TransitionRoute + * @param {google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse} message ExportAgentResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TransitionRoute.toObject = function toObject(message, options) { + ExportAgentResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.intent = ""; - object.condition = ""; - object.triggerFulfillment = null; - object.name = ""; - } - if (message.intent != null && message.hasOwnProperty("intent")) - object.intent = message.intent; - if (message.condition != null && message.hasOwnProperty("condition")) - object.condition = message.condition; - if (message.triggerFulfillment != null && message.hasOwnProperty("triggerFulfillment")) - object.triggerFulfillment = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.toObject(message.triggerFulfillment, options); - if (message.targetPage != null && message.hasOwnProperty("targetPage")) { - object.targetPage = message.targetPage; + if (message.agentUri != null && message.hasOwnProperty("agentUri")) { + object.agentUri = message.agentUri; if (options.oneofs) - object.target = "targetPage"; + object.agent = "agentUri"; } - if (message.targetFlow != null && message.hasOwnProperty("targetFlow")) { - object.targetFlow = message.targetFlow; + if (message.agentContent != null && message.hasOwnProperty("agentContent")) { + object.agentContent = options.bytes === String ? $util.base64.encode(message.agentContent, 0, message.agentContent.length) : options.bytes === Array ? Array.prototype.slice.call(message.agentContent) : message.agentContent; if (options.oneofs) - object.target = "targetFlow"; + object.agent = "agentContent"; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; return object; }; /** - * Converts this TransitionRoute to JSON. + * Converts this ExportAgentResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse * @instance * @returns {Object.} JSON object */ - TransitionRoute.prototype.toJSON = function toJSON() { + ExportAgentResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return TransitionRoute; + return ExportAgentResponse; })(); - v3beta1.ListPagesRequest = (function() { + v3beta1.RestoreAgentRequest = (function() { /** - * Properties of a ListPagesRequest. + * Properties of a RestoreAgentRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IListPagesRequest - * @property {string|null} [parent] ListPagesRequest parent - * @property {string|null} [languageCode] ListPagesRequest languageCode - * @property {number|null} [pageSize] ListPagesRequest pageSize - * @property {string|null} [pageToken] ListPagesRequest pageToken + * @interface IRestoreAgentRequest + * @property {string|null} [name] RestoreAgentRequest name + * @property {string|null} [agentUri] RestoreAgentRequest agentUri + * @property {Uint8Array|null} [agentContent] RestoreAgentRequest agentContent */ /** - * Constructs a new ListPagesRequest. + * Constructs a new RestoreAgentRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a ListPagesRequest. - * @implements IListPagesRequest + * @classdesc Represents a RestoreAgentRequest. + * @implements IRestoreAgentRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IListPagesRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IRestoreAgentRequest=} [properties] Properties to set */ - function ListPagesRequest(properties) { + function RestoreAgentRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -46747,114 +46504,115 @@ } /** - * ListPagesRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesRequest + * RestoreAgentRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest * @instance */ - ListPagesRequest.prototype.parent = ""; + RestoreAgentRequest.prototype.name = ""; /** - * ListPagesRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesRequest + * RestoreAgentRequest agentUri. + * @member {string} agentUri + * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest * @instance */ - ListPagesRequest.prototype.languageCode = ""; + RestoreAgentRequest.prototype.agentUri = ""; /** - * ListPagesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesRequest + * RestoreAgentRequest agentContent. + * @member {Uint8Array} agentContent + * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest * @instance */ - ListPagesRequest.prototype.pageSize = 0; + RestoreAgentRequest.prototype.agentContent = $util.newBuffer([]); + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * ListPagesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesRequest + * RestoreAgentRequest agent. + * @member {"agentUri"|"agentContent"|undefined} agent + * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest * @instance */ - ListPagesRequest.prototype.pageToken = ""; + Object.defineProperty(RestoreAgentRequest.prototype, "agent", { + get: $util.oneOfGetter($oneOfFields = ["agentUri", "agentContent"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new ListPagesRequest instance using the specified properties. + * Creates a new RestoreAgentRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListPagesRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ListPagesRequest} ListPagesRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.IRestoreAgentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest} RestoreAgentRequest instance */ - ListPagesRequest.create = function create(properties) { - return new ListPagesRequest(properties); + RestoreAgentRequest.create = function create(properties) { + return new RestoreAgentRequest(properties); }; /** - * Encodes the specified ListPagesRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListPagesRequest.verify|verify} messages. + * Encodes the specified RestoreAgentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListPagesRequest} message ListPagesRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IRestoreAgentRequest} message RestoreAgentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListPagesRequest.encode = function encode(message, writer) { + RestoreAgentRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.agentUri != null && Object.hasOwnProperty.call(message, "agentUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.agentUri); + if (message.agentContent != null && Object.hasOwnProperty.call(message, "agentContent")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.agentContent); return writer; }; /** - * Encodes the specified ListPagesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListPagesRequest.verify|verify} messages. + * Encodes the specified RestoreAgentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListPagesRequest} message ListPagesRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IRestoreAgentRequest} message RestoreAgentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListPagesRequest.encodeDelimited = function encodeDelimited(message, writer) { + RestoreAgentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListPagesRequest message from the specified reader or buffer. + * Decodes a RestoreAgentRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.ListPagesRequest} ListPagesRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest} RestoreAgentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListPagesRequest.decode = function decode(reader, length) { + RestoreAgentRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ListPagesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); + message.name = reader.string(); break; case 2: - message.languageCode = reader.string(); + message.agentUri = reader.string(); break; case 3: - message.pageSize = reader.int32(); - break; - case 4: - message.pageToken = reader.string(); + message.agentContent = reader.bytes(); break; default: reader.skipType(tag & 7); @@ -46865,364 +46623,372 @@ }; /** - * Decodes a ListPagesRequest message from the specified reader or buffer, length delimited. + * Decodes a RestoreAgentRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ListPagesRequest} ListPagesRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest} RestoreAgentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListPagesRequest.decodeDelimited = function decodeDelimited(reader) { + RestoreAgentRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListPagesRequest message. + * Verifies a RestoreAgentRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListPagesRequest.verify = function verify(message) { + RestoreAgentRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.agentUri != null && message.hasOwnProperty("agentUri")) { + properties.agent = 1; + if (!$util.isString(message.agentUri)) + return "agentUri: string expected"; + } + if (message.agentContent != null && message.hasOwnProperty("agentContent")) { + if (properties.agent === 1) + return "agent: multiple values"; + properties.agent = 1; + if (!(message.agentContent && typeof message.agentContent.length === "number" || $util.isString(message.agentContent))) + return "agentContent: buffer expected"; + } return null; }; /** - * Creates a ListPagesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a RestoreAgentRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ListPagesRequest} ListPagesRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest} RestoreAgentRequest */ - ListPagesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ListPagesRequest) + RestoreAgentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.ListPagesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.languageCode != null) - message.languageCode = String(object.languageCode); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.agentUri != null) + message.agentUri = String(object.agentUri); + if (object.agentContent != null) + if (typeof object.agentContent === "string") + $util.base64.decode(object.agentContent, message.agentContent = $util.newBuffer($util.base64.length(object.agentContent)), 0); + else if (object.agentContent.length) + message.agentContent = object.agentContent; return message; }; /** - * Creates a plain object from a ListPagesRequest message. Also converts values to other types if specified. + * Creates a plain object from a RestoreAgentRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ListPagesRequest} message ListPagesRequest + * @param {google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest} message RestoreAgentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListPagesRequest.toObject = function toObject(message, options) { + RestoreAgentRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.languageCode = ""; - object.pageSize = 0; - object.pageToken = ""; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.agentUri != null && message.hasOwnProperty("agentUri")) { + object.agentUri = message.agentUri; + if (options.oneofs) + object.agent = "agentUri"; + } + if (message.agentContent != null && message.hasOwnProperty("agentContent")) { + object.agentContent = options.bytes === String ? $util.base64.encode(message.agentContent, 0, message.agentContent.length) : options.bytes === Array ? Array.prototype.slice.call(message.agentContent) : message.agentContent; + if (options.oneofs) + object.agent = "agentContent"; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; return object; }; /** - * Converts this ListPagesRequest to JSON. + * Converts this RestoreAgentRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest * @instance * @returns {Object.} JSON object */ - ListPagesRequest.prototype.toJSON = function toJSON() { + RestoreAgentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListPagesRequest; + return RestoreAgentRequest; })(); - v3beta1.ListPagesResponse = (function() { + v3beta1.Flows = (function() { /** - * Properties of a ListPagesResponse. + * Constructs a new Flows service. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IListPagesResponse - * @property {Array.|null} [pages] ListPagesResponse pages - * @property {string|null} [nextPageToken] ListPagesResponse nextPageToken + * @classdesc Represents a Flows + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited */ + function Flows(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Flows.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Flows; /** - * Constructs a new ListPagesResponse. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a ListPagesResponse. - * @implements IListPagesResponse - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IListPagesResponse=} [properties] Properties to set + * Creates new Flows service using the specified rpc implementation. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Flows} RPC service. Useful where requests and/or responses are streamed. */ - function ListPagesResponse(properties) { - this.pages = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + Flows.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; /** - * ListPagesResponse pages. - * @member {Array.} pages - * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesResponse - * @instance + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows#createFlow}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * @typedef CreateFlowCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3beta1.Flow} [response] Flow */ - ListPagesResponse.prototype.pages = $util.emptyArray; /** - * ListPagesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesResponse + * Calls CreateFlow. + * @function createFlow + * @memberof google.cloud.dialogflow.cx.v3beta1.Flows * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.ICreateFlowRequest} request CreateFlowRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.Flows.CreateFlowCallback} callback Node-style callback called with the error, if any, and Flow + * @returns {undefined} + * @variation 1 */ - ListPagesResponse.prototype.nextPageToken = ""; + Object.defineProperty(Flows.prototype.createFlow = function createFlow(request, callback) { + return this.rpcCall(createFlow, $root.google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest, $root.google.cloud.dialogflow.cx.v3beta1.Flow, request, callback); + }, "name", { value: "CreateFlow" }); /** - * Creates a new ListPagesResponse instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesResponse - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListPagesResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ListPagesResponse} ListPagesResponse instance + * Calls CreateFlow. + * @function createFlow + * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.ICreateFlowRequest} request CreateFlowRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListPagesResponse.create = function create(properties) { - return new ListPagesResponse(properties); - }; /** - * Encodes the specified ListPagesResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListPagesResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesResponse - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListPagesResponse} message ListPagesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows#deleteFlow}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * @typedef DeleteFlowCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty */ - ListPagesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.pages != null && message.pages.length) - for (var i = 0; i < message.pages.length; ++i) - $root.google.cloud.dialogflow.cx.v3beta1.Page.encode(message.pages[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - return writer; - }; /** - * Encodes the specified ListPagesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListPagesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesResponse - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListPagesResponse} message ListPagesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls DeleteFlow. + * @function deleteFlow + * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteFlowRequest} request DeleteFlowRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.Flows.DeleteFlowCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 */ - ListPagesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + Object.defineProperty(Flows.prototype.deleteFlow = function deleteFlow(request, callback) { + return this.rpcCall(deleteFlow, $root.google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteFlow" }); /** - * Decodes a ListPagesResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.ListPagesResponse} ListPagesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls DeleteFlow. + * @function deleteFlow + * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteFlowRequest} request DeleteFlowRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListPagesResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ListPagesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.pages && message.pages.length)) - message.pages = []; - message.pages.push($root.google.cloud.dialogflow.cx.v3beta1.Page.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes a ListPagesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ListPagesResponse} ListPagesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows#listFlows}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * @typedef ListFlowsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse} [response] ListFlowsResponse */ - ListPagesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; /** - * Verifies a ListPagesResponse message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls ListFlows. + * @function listFlows + * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IListFlowsRequest} request ListFlowsRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.Flows.ListFlowsCallback} callback Node-style callback called with the error, if any, and ListFlowsResponse + * @returns {undefined} + * @variation 1 */ - ListPagesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.pages != null && message.hasOwnProperty("pages")) { - if (!Array.isArray(message.pages)) - return "pages: array expected"; - for (var i = 0; i < message.pages.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.Page.verify(message.pages[i]); - if (error) - return "pages." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; + Object.defineProperty(Flows.prototype.listFlows = function listFlows(request, callback) { + return this.rpcCall(listFlows, $root.google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest, $root.google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse, request, callback); + }, "name", { value: "ListFlows" }); /** - * Creates a ListPagesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ListPagesResponse} ListPagesResponse + * Calls ListFlows. + * @function listFlows + * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IListFlowsRequest} request ListFlowsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListPagesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ListPagesResponse) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.ListPagesResponse(); - if (object.pages) { - if (!Array.isArray(object.pages)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ListPagesResponse.pages: array expected"); - message.pages = []; - for (var i = 0; i < object.pages.length; ++i) { - if (typeof object.pages[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ListPagesResponse.pages: object expected"); - message.pages[i] = $root.google.cloud.dialogflow.cx.v3beta1.Page.fromObject(object.pages[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; /** - * Creates a plain object from a ListPagesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesResponse - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ListPagesResponse} message ListPagesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows#getFlow}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * @typedef GetFlowCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3beta1.Flow} [response] Flow */ - ListPagesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.pages = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.pages && message.pages.length) { - object.pages = []; - for (var j = 0; j < message.pages.length; ++j) - object.pages[j] = $root.google.cloud.dialogflow.cx.v3beta1.Page.toObject(message.pages[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; /** - * Converts this ListPagesResponse to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesResponse + * Calls GetFlow. + * @function getFlow + * @memberof google.cloud.dialogflow.cx.v3beta1.Flows * @instance - * @returns {Object.} JSON object + * @param {google.cloud.dialogflow.cx.v3beta1.IGetFlowRequest} request GetFlowRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.Flows.GetFlowCallback} callback Node-style callback called with the error, if any, and Flow + * @returns {undefined} + * @variation 1 */ - ListPagesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + Object.defineProperty(Flows.prototype.getFlow = function getFlow(request, callback) { + return this.rpcCall(getFlow, $root.google.cloud.dialogflow.cx.v3beta1.GetFlowRequest, $root.google.cloud.dialogflow.cx.v3beta1.Flow, request, callback); + }, "name", { value: "GetFlow" }); - return ListPagesResponse; + /** + * Calls GetFlow. + * @function getFlow + * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IGetFlowRequest} request GetFlowRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows#updateFlow}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * @typedef UpdateFlowCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3beta1.Flow} [response] Flow + */ + + /** + * Calls UpdateFlow. + * @function updateFlow + * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateFlowRequest} request UpdateFlowRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.Flows.UpdateFlowCallback} callback Node-style callback called with the error, if any, and Flow + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Flows.prototype.updateFlow = function updateFlow(request, callback) { + return this.rpcCall(updateFlow, $root.google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest, $root.google.cloud.dialogflow.cx.v3beta1.Flow, request, callback); + }, "name", { value: "UpdateFlow" }); + + /** + * Calls UpdateFlow. + * @function updateFlow + * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateFlowRequest} request UpdateFlowRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows#trainFlow}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * @typedef TrainFlowCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls TrainFlow. + * @function trainFlow + * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.ITrainFlowRequest} request TrainFlowRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.Flows.TrainFlowCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Flows.prototype.trainFlow = function trainFlow(request, callback) { + return this.rpcCall(trainFlow, $root.google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "TrainFlow" }); + + /** + * Calls TrainFlow. + * @function trainFlow + * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.ITrainFlowRequest} request TrainFlowRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Flows; })(); - v3beta1.GetPageRequest = (function() { + v3beta1.NluSettings = (function() { /** - * Properties of a GetPageRequest. + * Properties of a NluSettings. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IGetPageRequest - * @property {string|null} [name] GetPageRequest name - * @property {string|null} [languageCode] GetPageRequest languageCode + * @interface INluSettings + * @property {google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelType|null} [modelType] NluSettings modelType + * @property {number|null} [classificationThreshold] NluSettings classificationThreshold + * @property {google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelTrainingMode|null} [modelTrainingMode] NluSettings modelTrainingMode */ /** - * Constructs a new GetPageRequest. + * Constructs a new NluSettings. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a GetPageRequest. - * @implements IGetPageRequest + * @classdesc Represents a NluSettings. + * @implements INluSettings * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IGetPageRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.INluSettings=} [properties] Properties to set */ - function GetPageRequest(properties) { + function NluSettings(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -47230,88 +46996,101 @@ } /** - * GetPageRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.GetPageRequest + * NluSettings modelType. + * @member {google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelType} modelType + * @memberof google.cloud.dialogflow.cx.v3beta1.NluSettings * @instance */ - GetPageRequest.prototype.name = ""; + NluSettings.prototype.modelType = 0; /** - * GetPageRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3beta1.GetPageRequest + * NluSettings classificationThreshold. + * @member {number} classificationThreshold + * @memberof google.cloud.dialogflow.cx.v3beta1.NluSettings * @instance */ - GetPageRequest.prototype.languageCode = ""; + NluSettings.prototype.classificationThreshold = 0; /** - * Creates a new GetPageRequest instance using the specified properties. + * NluSettings modelTrainingMode. + * @member {google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelTrainingMode} modelTrainingMode + * @memberof google.cloud.dialogflow.cx.v3beta1.NluSettings + * @instance + */ + NluSettings.prototype.modelTrainingMode = 0; + + /** + * Creates a new NluSettings instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.GetPageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.NluSettings * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IGetPageRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.GetPageRequest} GetPageRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.INluSettings=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.NluSettings} NluSettings instance */ - GetPageRequest.create = function create(properties) { - return new GetPageRequest(properties); + NluSettings.create = function create(properties) { + return new NluSettings(properties); }; /** - * Encodes the specified GetPageRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetPageRequest.verify|verify} messages. + * Encodes the specified NluSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.NluSettings.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.GetPageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.NluSettings * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IGetPageRequest} message GetPageRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.INluSettings} message NluSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetPageRequest.encode = function encode(message, writer) { + NluSettings.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); + if (message.modelType != null && Object.hasOwnProperty.call(message, "modelType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.modelType); + if (message.classificationThreshold != null && Object.hasOwnProperty.call(message, "classificationThreshold")) + writer.uint32(/* id 3, wireType 5 =*/29).float(message.classificationThreshold); + if (message.modelTrainingMode != null && Object.hasOwnProperty.call(message, "modelTrainingMode")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.modelTrainingMode); return writer; }; /** - * Encodes the specified GetPageRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetPageRequest.verify|verify} messages. + * Encodes the specified NluSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.NluSettings.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.GetPageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.NluSettings * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IGetPageRequest} message GetPageRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.INluSettings} message NluSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetPageRequest.encodeDelimited = function encodeDelimited(message, writer) { + NluSettings.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetPageRequest message from the specified reader or buffer. + * Decodes a NluSettings message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.GetPageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.NluSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.GetPageRequest} GetPageRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.NluSettings} NluSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetPageRequest.decode = function decode(reader, length) { + NluSettings.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.GetPageRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.NluSettings(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.modelType = reader.int32(); break; - case 2: - message.languageCode = reader.string(); + case 3: + message.classificationThreshold = reader.float(); + break; + case 4: + message.modelTrainingMode = reader.int32(); break; default: reader.skipType(tag & 7); @@ -47322,118 +47101,199 @@ }; /** - * Decodes a GetPageRequest message from the specified reader or buffer, length delimited. + * Decodes a NluSettings message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.GetPageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.NluSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.GetPageRequest} GetPageRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.NluSettings} NluSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetPageRequest.decodeDelimited = function decodeDelimited(reader) { + NluSettings.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetPageRequest message. + * Verifies a NluSettings message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.GetPageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.NluSettings * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetPageRequest.verify = function verify(message) { + NluSettings.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; + if (message.modelType != null && message.hasOwnProperty("modelType")) + switch (message.modelType) { + default: + return "modelType: enum value expected"; + case 0: + case 1: + case 3: + break; + } + if (message.classificationThreshold != null && message.hasOwnProperty("classificationThreshold")) + if (typeof message.classificationThreshold !== "number") + return "classificationThreshold: number expected"; + if (message.modelTrainingMode != null && message.hasOwnProperty("modelTrainingMode")) + switch (message.modelTrainingMode) { + default: + return "modelTrainingMode: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; /** - * Creates a GetPageRequest message from a plain object. Also converts values to their respective internal types. + * Creates a NluSettings message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.GetPageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.NluSettings * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.GetPageRequest} GetPageRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.NluSettings} NluSettings */ - GetPageRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.GetPageRequest) + NluSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.NluSettings) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.GetPageRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.languageCode != null) - message.languageCode = String(object.languageCode); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.NluSettings(); + switch (object.modelType) { + case "MODEL_TYPE_UNSPECIFIED": + case 0: + message.modelType = 0; + break; + case "MODEL_TYPE_STANDARD": + case 1: + message.modelType = 1; + break; + case "MODEL_TYPE_ADVANCED": + case 3: + message.modelType = 3; + break; + } + if (object.classificationThreshold != null) + message.classificationThreshold = Number(object.classificationThreshold); + switch (object.modelTrainingMode) { + case "MODEL_TRAINING_MODE_UNSPECIFIED": + case 0: + message.modelTrainingMode = 0; + break; + case "MODEL_TRAINING_MODE_AUTOMATIC": + case 1: + message.modelTrainingMode = 1; + break; + case "MODEL_TRAINING_MODE_MANUAL": + case 2: + message.modelTrainingMode = 2; + break; + } return message; }; /** - * Creates a plain object from a GetPageRequest message. Also converts values to other types if specified. + * Creates a plain object from a NluSettings message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.GetPageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.NluSettings * @static - * @param {google.cloud.dialogflow.cx.v3beta1.GetPageRequest} message GetPageRequest + * @param {google.cloud.dialogflow.cx.v3beta1.NluSettings} message NluSettings * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetPageRequest.toObject = function toObject(message, options) { + NluSettings.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.languageCode = ""; + object.modelType = options.enums === String ? "MODEL_TYPE_UNSPECIFIED" : 0; + object.classificationThreshold = 0; + object.modelTrainingMode = options.enums === String ? "MODEL_TRAINING_MODE_UNSPECIFIED" : 0; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; + if (message.modelType != null && message.hasOwnProperty("modelType")) + object.modelType = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelType[message.modelType] : message.modelType; + if (message.classificationThreshold != null && message.hasOwnProperty("classificationThreshold")) + object.classificationThreshold = options.json && !isFinite(message.classificationThreshold) ? String(message.classificationThreshold) : message.classificationThreshold; + if (message.modelTrainingMode != null && message.hasOwnProperty("modelTrainingMode")) + object.modelTrainingMode = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelTrainingMode[message.modelTrainingMode] : message.modelTrainingMode; return object; }; /** - * Converts this GetPageRequest to JSON. + * Converts this NluSettings to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.GetPageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.NluSettings * @instance * @returns {Object.} JSON object */ - GetPageRequest.prototype.toJSON = function toJSON() { + NluSettings.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetPageRequest; - })(); - - v3beta1.CreatePageRequest = (function() { - /** - * Properties of a CreatePageRequest. + * ModelType enum. + * @name google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelType + * @enum {number} + * @property {number} MODEL_TYPE_UNSPECIFIED=0 MODEL_TYPE_UNSPECIFIED value + * @property {number} MODEL_TYPE_STANDARD=1 MODEL_TYPE_STANDARD value + * @property {number} MODEL_TYPE_ADVANCED=3 MODEL_TYPE_ADVANCED value + */ + NluSettings.ModelType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MODEL_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "MODEL_TYPE_STANDARD"] = 1; + values[valuesById[3] = "MODEL_TYPE_ADVANCED"] = 3; + return values; + })(); + + /** + * ModelTrainingMode enum. + * @name google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelTrainingMode + * @enum {number} + * @property {number} MODEL_TRAINING_MODE_UNSPECIFIED=0 MODEL_TRAINING_MODE_UNSPECIFIED value + * @property {number} MODEL_TRAINING_MODE_AUTOMATIC=1 MODEL_TRAINING_MODE_AUTOMATIC value + * @property {number} MODEL_TRAINING_MODE_MANUAL=2 MODEL_TRAINING_MODE_MANUAL value + */ + NluSettings.ModelTrainingMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MODEL_TRAINING_MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "MODEL_TRAINING_MODE_AUTOMATIC"] = 1; + values[valuesById[2] = "MODEL_TRAINING_MODE_MANUAL"] = 2; + return values; + })(); + + return NluSettings; + })(); + + v3beta1.Flow = (function() { + + /** + * Properties of a Flow. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface ICreatePageRequest - * @property {string|null} [parent] CreatePageRequest parent - * @property {google.cloud.dialogflow.cx.v3beta1.IPage|null} [page] CreatePageRequest page - * @property {string|null} [languageCode] CreatePageRequest languageCode + * @interface IFlow + * @property {string|null} [name] Flow name + * @property {string|null} [displayName] Flow displayName + * @property {string|null} [description] Flow description + * @property {Array.|null} [transitionRoutes] Flow transitionRoutes + * @property {Array.|null} [eventHandlers] Flow eventHandlers + * @property {google.cloud.dialogflow.cx.v3beta1.INluSettings|null} [nluSettings] Flow nluSettings */ /** - * Constructs a new CreatePageRequest. + * Constructs a new Flow. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a CreatePageRequest. - * @implements ICreatePageRequest + * @classdesc Represents a Flow. + * @implements IFlow * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.ICreatePageRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IFlow=} [properties] Properties to set */ - function CreatePageRequest(properties) { + function Flow(properties) { + this.transitionRoutes = []; + this.eventHandlers = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -47441,101 +47301,146 @@ } /** - * CreatePageRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3beta1.CreatePageRequest + * Flow name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3beta1.Flow * @instance */ - CreatePageRequest.prototype.parent = ""; + Flow.prototype.name = ""; /** - * CreatePageRequest page. - * @member {google.cloud.dialogflow.cx.v3beta1.IPage|null|undefined} page - * @memberof google.cloud.dialogflow.cx.v3beta1.CreatePageRequest + * Flow displayName. + * @member {string} displayName + * @memberof google.cloud.dialogflow.cx.v3beta1.Flow * @instance */ - CreatePageRequest.prototype.page = null; + Flow.prototype.displayName = ""; /** - * CreatePageRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3beta1.CreatePageRequest + * Flow description. + * @member {string} description + * @memberof google.cloud.dialogflow.cx.v3beta1.Flow * @instance */ - CreatePageRequest.prototype.languageCode = ""; + Flow.prototype.description = ""; /** - * Creates a new CreatePageRequest instance using the specified properties. + * Flow transitionRoutes. + * @member {Array.} transitionRoutes + * @memberof google.cloud.dialogflow.cx.v3beta1.Flow + * @instance + */ + Flow.prototype.transitionRoutes = $util.emptyArray; + + /** + * Flow eventHandlers. + * @member {Array.} eventHandlers + * @memberof google.cloud.dialogflow.cx.v3beta1.Flow + * @instance + */ + Flow.prototype.eventHandlers = $util.emptyArray; + + /** + * Flow nluSettings. + * @member {google.cloud.dialogflow.cx.v3beta1.INluSettings|null|undefined} nluSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.Flow + * @instance + */ + Flow.prototype.nluSettings = null; + + /** + * Creates a new Flow instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.CreatePageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Flow * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ICreatePageRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.CreatePageRequest} CreatePageRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.IFlow=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.Flow} Flow instance */ - CreatePageRequest.create = function create(properties) { - return new CreatePageRequest(properties); + Flow.create = function create(properties) { + return new Flow(properties); }; /** - * Encodes the specified CreatePageRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreatePageRequest.verify|verify} messages. + * Encodes the specified Flow message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Flow.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.CreatePageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Flow * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ICreatePageRequest} message CreatePageRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IFlow} message Flow message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreatePageRequest.encode = function encode(message, writer) { + Flow.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.page != null && Object.hasOwnProperty.call(message, "page")) - $root.google.cloud.dialogflow.cx.v3beta1.Page.encode(message.page, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.languageCode); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.transitionRoutes != null && message.transitionRoutes.length) + for (var i = 0; i < message.transitionRoutes.length; ++i) + $root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.encode(message.transitionRoutes[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.eventHandlers != null && message.eventHandlers.length) + for (var i = 0; i < message.eventHandlers.length; ++i) + $root.google.cloud.dialogflow.cx.v3beta1.EventHandler.encode(message.eventHandlers[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.nluSettings != null && Object.hasOwnProperty.call(message, "nluSettings")) + $root.google.cloud.dialogflow.cx.v3beta1.NluSettings.encode(message.nluSettings, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); return writer; }; /** - * Encodes the specified CreatePageRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreatePageRequest.verify|verify} messages. + * Encodes the specified Flow message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Flow.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.CreatePageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Flow * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ICreatePageRequest} message CreatePageRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IFlow} message Flow message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreatePageRequest.encodeDelimited = function encodeDelimited(message, writer) { + Flow.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreatePageRequest message from the specified reader or buffer. + * Decodes a Flow message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.CreatePageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Flow * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.CreatePageRequest} CreatePageRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.Flow} Flow * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreatePageRequest.decode = function decode(reader, length) { + Flow.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.CreatePageRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Flow(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); + message.name = reader.string(); break; case 2: - message.page = $root.google.cloud.dialogflow.cx.v3beta1.Page.decode(reader, reader.uint32()); + message.displayName = reader.string(); break; case 3: - message.languageCode = reader.string(); + message.description = reader.string(); + break; + case 4: + if (!(message.transitionRoutes && message.transitionRoutes.length)) + message.transitionRoutes = []; + message.transitionRoutes.push($root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.decode(reader, reader.uint32())); + break; + case 10: + if (!(message.eventHandlers && message.eventHandlers.length)) + message.eventHandlers = []; + message.eventHandlers.push($root.google.cloud.dialogflow.cx.v3beta1.EventHandler.decode(reader, reader.uint32())); + break; + case 11: + message.nluSettings = $root.google.cloud.dialogflow.cx.v3beta1.NluSettings.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -47546,131 +47451,191 @@ }; /** - * Decodes a CreatePageRequest message from the specified reader or buffer, length delimited. + * Decodes a Flow message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.CreatePageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Flow * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.CreatePageRequest} CreatePageRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.Flow} Flow * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreatePageRequest.decodeDelimited = function decodeDelimited(reader) { + Flow.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreatePageRequest message. + * Verifies a Flow message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.CreatePageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Flow * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreatePageRequest.verify = function verify(message) { + Flow.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.page != null && message.hasOwnProperty("page")) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.Page.verify(message.page); + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.transitionRoutes != null && message.hasOwnProperty("transitionRoutes")) { + if (!Array.isArray(message.transitionRoutes)) + return "transitionRoutes: array expected"; + for (var i = 0; i < message.transitionRoutes.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.verify(message.transitionRoutes[i]); + if (error) + return "transitionRoutes." + error; + } + } + if (message.eventHandlers != null && message.hasOwnProperty("eventHandlers")) { + if (!Array.isArray(message.eventHandlers)) + return "eventHandlers: array expected"; + for (var i = 0; i < message.eventHandlers.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.EventHandler.verify(message.eventHandlers[i]); + if (error) + return "eventHandlers." + error; + } + } + if (message.nluSettings != null && message.hasOwnProperty("nluSettings")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.NluSettings.verify(message.nluSettings); if (error) - return "page." + error; + return "nluSettings." + error; } - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; return null; }; /** - * Creates a CreatePageRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Flow message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.CreatePageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Flow * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.CreatePageRequest} CreatePageRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.Flow} Flow */ - CreatePageRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.CreatePageRequest) + Flow.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Flow) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.CreatePageRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.page != null) { - if (typeof object.page !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.CreatePageRequest.page: object expected"); - message.page = $root.google.cloud.dialogflow.cx.v3beta1.Page.fromObject(object.page); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.Flow(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.description != null) + message.description = String(object.description); + if (object.transitionRoutes) { + if (!Array.isArray(object.transitionRoutes)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Flow.transitionRoutes: array expected"); + message.transitionRoutes = []; + for (var i = 0; i < object.transitionRoutes.length; ++i) { + if (typeof object.transitionRoutes[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Flow.transitionRoutes: object expected"); + message.transitionRoutes[i] = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.fromObject(object.transitionRoutes[i]); + } + } + if (object.eventHandlers) { + if (!Array.isArray(object.eventHandlers)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Flow.eventHandlers: array expected"); + message.eventHandlers = []; + for (var i = 0; i < object.eventHandlers.length; ++i) { + if (typeof object.eventHandlers[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Flow.eventHandlers: object expected"); + message.eventHandlers[i] = $root.google.cloud.dialogflow.cx.v3beta1.EventHandler.fromObject(object.eventHandlers[i]); + } + } + if (object.nluSettings != null) { + if (typeof object.nluSettings !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Flow.nluSettings: object expected"); + message.nluSettings = $root.google.cloud.dialogflow.cx.v3beta1.NluSettings.fromObject(object.nluSettings); } - if (object.languageCode != null) - message.languageCode = String(object.languageCode); return message; }; /** - * Creates a plain object from a CreatePageRequest message. Also converts values to other types if specified. + * Creates a plain object from a Flow message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.CreatePageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Flow * @static - * @param {google.cloud.dialogflow.cx.v3beta1.CreatePageRequest} message CreatePageRequest + * @param {google.cloud.dialogflow.cx.v3beta1.Flow} message Flow * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreatePageRequest.toObject = function toObject(message, options) { + Flow.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) { + object.transitionRoutes = []; + object.eventHandlers = []; + } if (options.defaults) { - object.parent = ""; - object.page = null; - object.languageCode = ""; + object.name = ""; + object.displayName = ""; + object.description = ""; + object.nluSettings = null; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.page != null && message.hasOwnProperty("page")) - object.page = $root.google.cloud.dialogflow.cx.v3beta1.Page.toObject(message.page, options); - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.transitionRoutes && message.transitionRoutes.length) { + object.transitionRoutes = []; + for (var j = 0; j < message.transitionRoutes.length; ++j) + object.transitionRoutes[j] = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.toObject(message.transitionRoutes[j], options); + } + if (message.eventHandlers && message.eventHandlers.length) { + object.eventHandlers = []; + for (var j = 0; j < message.eventHandlers.length; ++j) + object.eventHandlers[j] = $root.google.cloud.dialogflow.cx.v3beta1.EventHandler.toObject(message.eventHandlers[j], options); + } + if (message.nluSettings != null && message.hasOwnProperty("nluSettings")) + object.nluSettings = $root.google.cloud.dialogflow.cx.v3beta1.NluSettings.toObject(message.nluSettings, options); return object; }; /** - * Converts this CreatePageRequest to JSON. + * Converts this Flow to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.CreatePageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Flow * @instance * @returns {Object.} JSON object */ - CreatePageRequest.prototype.toJSON = function toJSON() { + Flow.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CreatePageRequest; + return Flow; })(); - v3beta1.UpdatePageRequest = (function() { + v3beta1.CreateFlowRequest = (function() { /** - * Properties of an UpdatePageRequest. + * Properties of a CreateFlowRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IUpdatePageRequest - * @property {google.cloud.dialogflow.cx.v3beta1.IPage|null} [page] UpdatePageRequest page - * @property {string|null} [languageCode] UpdatePageRequest languageCode - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdatePageRequest updateMask + * @interface ICreateFlowRequest + * @property {string|null} [parent] CreateFlowRequest parent + * @property {google.cloud.dialogflow.cx.v3beta1.IFlow|null} [flow] CreateFlowRequest flow + * @property {string|null} [languageCode] CreateFlowRequest languageCode */ /** - * Constructs a new UpdatePageRequest. + * Constructs a new CreateFlowRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents an UpdatePageRequest. - * @implements IUpdatePageRequest + * @classdesc Represents a CreateFlowRequest. + * @implements ICreateFlowRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdatePageRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.ICreateFlowRequest=} [properties] Properties to set */ - function UpdatePageRequest(properties) { + function CreateFlowRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -47678,101 +47643,101 @@ } /** - * UpdatePageRequest page. - * @member {google.cloud.dialogflow.cx.v3beta1.IPage|null|undefined} page - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest + * CreateFlowRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest * @instance */ - UpdatePageRequest.prototype.page = null; + CreateFlowRequest.prototype.parent = ""; /** - * UpdatePageRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest + * CreateFlowRequest flow. + * @member {google.cloud.dialogflow.cx.v3beta1.IFlow|null|undefined} flow + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest * @instance */ - UpdatePageRequest.prototype.languageCode = ""; + CreateFlowRequest.prototype.flow = null; /** - * UpdatePageRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest + * CreateFlowRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest * @instance */ - UpdatePageRequest.prototype.updateMask = null; + CreateFlowRequest.prototype.languageCode = ""; /** - * Creates a new UpdatePageRequest instance using the specified properties. + * Creates a new CreateFlowRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdatePageRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest} UpdatePageRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.ICreateFlowRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest} CreateFlowRequest instance */ - UpdatePageRequest.create = function create(properties) { - return new UpdatePageRequest(properties); + CreateFlowRequest.create = function create(properties) { + return new CreateFlowRequest(properties); }; /** - * Encodes the specified UpdatePageRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest.verify|verify} messages. + * Encodes the specified CreateFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdatePageRequest} message UpdatePageRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.ICreateFlowRequest} message CreateFlowRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdatePageRequest.encode = function encode(message, writer) { + CreateFlowRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.page != null && Object.hasOwnProperty.call(message, "page")) - $root.google.cloud.dialogflow.cx.v3beta1.Page.encode(message.page, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.flow != null && Object.hasOwnProperty.call(message, "flow")) + $root.google.cloud.dialogflow.cx.v3beta1.Flow.encode(message.flow, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + writer.uint32(/* id 3, wireType 2 =*/26).string(message.languageCode); return writer; }; /** - * Encodes the specified UpdatePageRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest.verify|verify} messages. + * Encodes the specified CreateFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdatePageRequest} message UpdatePageRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.ICreateFlowRequest} message CreateFlowRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdatePageRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreateFlowRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdatePageRequest message from the specified reader or buffer. + * Decodes a CreateFlowRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest} UpdatePageRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest} CreateFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdatePageRequest.decode = function decode(reader, length) { + CreateFlowRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.page = $root.google.cloud.dialogflow.cx.v3beta1.Page.decode(reader, reader.uint32()); + message.parent = reader.string(); break; case 2: - message.languageCode = reader.string(); + message.flow = $root.google.cloud.dialogflow.cx.v3beta1.Flow.decode(reader, reader.uint32()); break; case 3: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.languageCode = reader.string(); break; default: reader.skipType(tag & 7); @@ -47783,135 +47748,130 @@ }; /** - * Decodes an UpdatePageRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateFlowRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest} UpdatePageRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest} CreateFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdatePageRequest.decodeDelimited = function decodeDelimited(reader) { + CreateFlowRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdatePageRequest message. + * Verifies a CreateFlowRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdatePageRequest.verify = function verify(message) { + CreateFlowRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.page != null && message.hasOwnProperty("page")) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.Page.verify(message.page); + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.flow != null && message.hasOwnProperty("flow")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.Flow.verify(message.flow); if (error) - return "page." + error; + return "flow." + error; } if (message.languageCode != null && message.hasOwnProperty("languageCode")) if (!$util.isString(message.languageCode)) return "languageCode: string expected"; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } return null; }; /** - * Creates an UpdatePageRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateFlowRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest} UpdatePageRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest} CreateFlowRequest */ - UpdatePageRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest) + CreateFlowRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest(); - if (object.page != null) { - if (typeof object.page !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest.page: object expected"); - message.page = $root.google.cloud.dialogflow.cx.v3beta1.Page.fromObject(object.page); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.flow != null) { + if (typeof object.flow !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest.flow: object expected"); + message.flow = $root.google.cloud.dialogflow.cx.v3beta1.Flow.fromObject(object.flow); } if (object.languageCode != null) message.languageCode = String(object.languageCode); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } return message; }; /** - * Creates a plain object from an UpdatePageRequest message. Also converts values to other types if specified. + * Creates a plain object from a CreateFlowRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest} message UpdatePageRequest + * @param {google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest} message CreateFlowRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdatePageRequest.toObject = function toObject(message, options) { + CreateFlowRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.page = null; + object.parent = ""; + object.flow = null; object.languageCode = ""; - object.updateMask = null; } - if (message.page != null && message.hasOwnProperty("page")) - object.page = $root.google.cloud.dialogflow.cx.v3beta1.Page.toObject(message.page, options); - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.flow != null && message.hasOwnProperty("flow")) + object.flow = $root.google.cloud.dialogflow.cx.v3beta1.Flow.toObject(message.flow, options); + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; return object; }; /** - * Converts this UpdatePageRequest to JSON. + * Converts this CreateFlowRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest * @instance * @returns {Object.} JSON object */ - UpdatePageRequest.prototype.toJSON = function toJSON() { + CreateFlowRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UpdatePageRequest; + return CreateFlowRequest; })(); - v3beta1.DeletePageRequest = (function() { + v3beta1.DeleteFlowRequest = (function() { /** - * Properties of a DeletePageRequest. + * Properties of a DeleteFlowRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IDeletePageRequest - * @property {string|null} [name] DeletePageRequest name - * @property {boolean|null} [force] DeletePageRequest force + * @interface IDeleteFlowRequest + * @property {string|null} [name] DeleteFlowRequest name + * @property {boolean|null} [force] DeleteFlowRequest force */ /** - * Constructs a new DeletePageRequest. + * Constructs a new DeleteFlowRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a DeletePageRequest. - * @implements IDeletePageRequest + * @classdesc Represents a DeleteFlowRequest. + * @implements IDeleteFlowRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IDeletePageRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteFlowRequest=} [properties] Properties to set */ - function DeletePageRequest(properties) { + function DeleteFlowRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -47919,43 +47879,43 @@ } /** - * DeletePageRequest name. + * DeleteFlowRequest name. * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.DeletePageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest * @instance */ - DeletePageRequest.prototype.name = ""; + DeleteFlowRequest.prototype.name = ""; /** - * DeletePageRequest force. + * DeleteFlowRequest force. * @member {boolean} force - * @memberof google.cloud.dialogflow.cx.v3beta1.DeletePageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest * @instance */ - DeletePageRequest.prototype.force = false; + DeleteFlowRequest.prototype.force = false; /** - * Creates a new DeletePageRequest instance using the specified properties. + * Creates a new DeleteFlowRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.DeletePageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IDeletePageRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.DeletePageRequest} DeletePageRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteFlowRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest} DeleteFlowRequest instance */ - DeletePageRequest.create = function create(properties) { - return new DeletePageRequest(properties); + DeleteFlowRequest.create = function create(properties) { + return new DeleteFlowRequest(properties); }; /** - * Encodes the specified DeletePageRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeletePageRequest.verify|verify} messages. + * Encodes the specified DeleteFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.DeletePageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IDeletePageRequest} message DeletePageRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteFlowRequest} message DeleteFlowRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeletePageRequest.encode = function encode(message, writer) { + DeleteFlowRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) @@ -47966,33 +47926,33 @@ }; /** - * Encodes the specified DeletePageRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeletePageRequest.verify|verify} messages. + * Encodes the specified DeleteFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.DeletePageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IDeletePageRequest} message DeletePageRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteFlowRequest} message DeleteFlowRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeletePageRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeleteFlowRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeletePageRequest message from the specified reader or buffer. + * Decodes a DeleteFlowRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.DeletePageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.DeletePageRequest} DeletePageRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest} DeleteFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeletePageRequest.decode = function decode(reader, length) { + DeleteFlowRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.DeletePageRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -48011,30 +47971,30 @@ }; /** - * Decodes a DeletePageRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteFlowRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.DeletePageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.DeletePageRequest} DeletePageRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest} DeleteFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeletePageRequest.decodeDelimited = function decodeDelimited(reader) { + DeleteFlowRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeletePageRequest message. + * Verifies a DeleteFlowRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.DeletePageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeletePageRequest.verify = function verify(message) { + DeleteFlowRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) @@ -48047,17 +48007,17 @@ }; /** - * Creates a DeletePageRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteFlowRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.DeletePageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.DeletePageRequest} DeletePageRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest} DeleteFlowRequest */ - DeletePageRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.DeletePageRequest) + DeleteFlowRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.DeletePageRequest(); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest(); if (object.name != null) message.name = String(object.name); if (object.force != null) @@ -48066,15 +48026,15 @@ }; /** - * Creates a plain object from a DeletePageRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeleteFlowRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.DeletePageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.DeletePageRequest} message DeletePageRequest + * @param {google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest} message DeleteFlowRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeletePageRequest.toObject = function toObject(message, options) { + DeleteFlowRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -48090,44 +48050,40 @@ }; /** - * Converts this DeletePageRequest to JSON. + * Converts this DeleteFlowRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.DeletePageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest * @instance * @returns {Object.} JSON object */ - DeletePageRequest.prototype.toJSON = function toJSON() { + DeleteFlowRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeletePageRequest; + return DeleteFlowRequest; })(); - v3beta1.Fulfillment = (function() { + v3beta1.ListFlowsRequest = (function() { /** - * Properties of a Fulfillment. + * Properties of a ListFlowsRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IFulfillment - * @property {Array.|null} [messages] Fulfillment messages - * @property {string|null} [webhook] Fulfillment webhook - * @property {string|null} [tag] Fulfillment tag - * @property {Array.|null} [setParameterActions] Fulfillment setParameterActions - * @property {Array.|null} [conditionalCases] Fulfillment conditionalCases + * @interface IListFlowsRequest + * @property {string|null} [parent] ListFlowsRequest parent + * @property {number|null} [pageSize] ListFlowsRequest pageSize + * @property {string|null} [pageToken] ListFlowsRequest pageToken + * @property {string|null} [languageCode] ListFlowsRequest languageCode */ /** - * Constructs a new Fulfillment. + * Constructs a new ListFlowsRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a Fulfillment. - * @implements IFulfillment + * @classdesc Represents a ListFlowsRequest. + * @implements IListFlowsRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IFulfillment=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IListFlowsRequest=} [properties] Properties to set */ - function Fulfillment(properties) { - this.messages = []; - this.setParameterActions = []; - this.conditionalCases = []; + function ListFlowsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -48135,136 +48091,114 @@ } /** - * Fulfillment messages. - * @member {Array.} messages - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment - * @instance - */ - Fulfillment.prototype.messages = $util.emptyArray; - - /** - * Fulfillment webhook. - * @member {string} webhook - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * ListFlowsRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest * @instance */ - Fulfillment.prototype.webhook = ""; + ListFlowsRequest.prototype.parent = ""; /** - * Fulfillment tag. - * @member {string} tag - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * ListFlowsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest * @instance */ - Fulfillment.prototype.tag = ""; + ListFlowsRequest.prototype.pageSize = 0; /** - * Fulfillment setParameterActions. - * @member {Array.} setParameterActions - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * ListFlowsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest * @instance */ - Fulfillment.prototype.setParameterActions = $util.emptyArray; + ListFlowsRequest.prototype.pageToken = ""; /** - * Fulfillment conditionalCases. - * @member {Array.} conditionalCases - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * ListFlowsRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest * @instance */ - Fulfillment.prototype.conditionalCases = $util.emptyArray; + ListFlowsRequest.prototype.languageCode = ""; /** - * Creates a new Fulfillment instance using the specified properties. + * Creates a new ListFlowsRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IFulfillment=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment} Fulfillment instance + * @param {google.cloud.dialogflow.cx.v3beta1.IListFlowsRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest} ListFlowsRequest instance */ - Fulfillment.create = function create(properties) { - return new Fulfillment(properties); + ListFlowsRequest.create = function create(properties) { + return new ListFlowsRequest(properties); }; /** - * Encodes the specified Fulfillment message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.verify|verify} messages. + * Encodes the specified ListFlowsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IFulfillment} message Fulfillment message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IListFlowsRequest} message ListFlowsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Fulfillment.encode = function encode(message, writer) { + ListFlowsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.messages != null && message.messages.length) - for (var i = 0; i < message.messages.length; ++i) - $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.encode(message.messages[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.webhook != null && Object.hasOwnProperty.call(message, "webhook")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.webhook); - if (message.tag != null && Object.hasOwnProperty.call(message, "tag")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.tag); - if (message.setParameterActions != null && message.setParameterActions.length) - for (var i = 0; i < message.setParameterActions.length; ++i) - $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction.encode(message.setParameterActions[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.conditionalCases != null && message.conditionalCases.length) - for (var i = 0; i < message.conditionalCases.length; ++i) - $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.encode(message.conditionalCases[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.languageCode); return writer; }; /** - * Encodes the specified Fulfillment message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.verify|verify} messages. + * Encodes the specified ListFlowsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IFulfillment} message Fulfillment message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IListFlowsRequest} message ListFlowsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Fulfillment.encodeDelimited = function encodeDelimited(message, writer) { + ListFlowsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Fulfillment message from the specified reader or buffer. + * Decodes a ListFlowsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment} Fulfillment + * @returns {google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest} ListFlowsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Fulfillment.decode = function decode(reader, length) { + ListFlowsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.messages && message.messages.length)) - message.messages = []; - message.messages.push($root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.decode(reader, reader.uint32())); + message.parent = reader.string(); break; case 2: - message.webhook = reader.string(); + message.pageSize = reader.int32(); break; case 3: - message.tag = reader.string(); + message.pageToken = reader.string(); break; case 4: - if (!(message.setParameterActions && message.setParameterActions.length)) - message.setParameterActions = []; - message.setParameterActions.push($root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.conditionalCases && message.conditionalCases.length)) - message.conditionalCases = []; - message.conditionalCases.push($root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.decode(reader, reader.uint32())); + message.languageCode = reader.string(); break; default: reader.skipType(tag & 7); @@ -48275,1280 +48209,891 @@ }; /** - * Decodes a Fulfillment message from the specified reader or buffer, length delimited. + * Decodes a ListFlowsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment} Fulfillment + * @returns {google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest} ListFlowsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Fulfillment.decodeDelimited = function decodeDelimited(reader) { + ListFlowsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Fulfillment message. + * Verifies a ListFlowsRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Fulfillment.verify = function verify(message) { + ListFlowsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.messages != null && message.hasOwnProperty("messages")) { - if (!Array.isArray(message.messages)) - return "messages: array expected"; - for (var i = 0; i < message.messages.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.verify(message.messages[i]); - if (error) - return "messages." + error; - } - } - if (message.webhook != null && message.hasOwnProperty("webhook")) - if (!$util.isString(message.webhook)) - return "webhook: string expected"; - if (message.tag != null && message.hasOwnProperty("tag")) - if (!$util.isString(message.tag)) - return "tag: string expected"; - if (message.setParameterActions != null && message.hasOwnProperty("setParameterActions")) { - if (!Array.isArray(message.setParameterActions)) - return "setParameterActions: array expected"; - for (var i = 0; i < message.setParameterActions.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction.verify(message.setParameterActions[i]); - if (error) - return "setParameterActions." + error; - } - } - if (message.conditionalCases != null && message.hasOwnProperty("conditionalCases")) { - if (!Array.isArray(message.conditionalCases)) - return "conditionalCases: array expected"; - for (var i = 0; i < message.conditionalCases.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.verify(message.conditionalCases[i]); - if (error) - return "conditionalCases." + error; - } - } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; return null; }; /** - * Creates a Fulfillment message from a plain object. Also converts values to their respective internal types. + * Creates a ListFlowsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment} Fulfillment + * @returns {google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest} ListFlowsRequest */ - Fulfillment.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment) + ListFlowsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment(); - if (object.messages) { - if (!Array.isArray(object.messages)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Fulfillment.messages: array expected"); - message.messages = []; - for (var i = 0; i < object.messages.length; ++i) { - if (typeof object.messages[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Fulfillment.messages: object expected"); - message.messages[i] = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.fromObject(object.messages[i]); - } - } - if (object.webhook != null) - message.webhook = String(object.webhook); - if (object.tag != null) - message.tag = String(object.tag); - if (object.setParameterActions) { - if (!Array.isArray(object.setParameterActions)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Fulfillment.setParameterActions: array expected"); - message.setParameterActions = []; - for (var i = 0; i < object.setParameterActions.length; ++i) { - if (typeof object.setParameterActions[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Fulfillment.setParameterActions: object expected"); - message.setParameterActions[i] = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction.fromObject(object.setParameterActions[i]); - } - } - if (object.conditionalCases) { - if (!Array.isArray(object.conditionalCases)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Fulfillment.conditionalCases: array expected"); - message.conditionalCases = []; - for (var i = 0; i < object.conditionalCases.length; ++i) { - if (typeof object.conditionalCases[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Fulfillment.conditionalCases: object expected"); - message.conditionalCases[i] = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.fromObject(object.conditionalCases[i]); - } - } + var message = new $root.google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.languageCode != null) + message.languageCode = String(object.languageCode); return message; }; /** - * Creates a plain object from a Fulfillment message. Also converts values to other types if specified. + * Creates a plain object from a ListFlowsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment} message Fulfillment + * @param {google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest} message ListFlowsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Fulfillment.toObject = function toObject(message, options) { + ListFlowsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.messages = []; - object.setParameterActions = []; - object.conditionalCases = []; - } if (options.defaults) { - object.webhook = ""; - object.tag = ""; - } - if (message.messages && message.messages.length) { - object.messages = []; - for (var j = 0; j < message.messages.length; ++j) - object.messages[j] = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.toObject(message.messages[j], options); - } - if (message.webhook != null && message.hasOwnProperty("webhook")) - object.webhook = message.webhook; - if (message.tag != null && message.hasOwnProperty("tag")) - object.tag = message.tag; - if (message.setParameterActions && message.setParameterActions.length) { - object.setParameterActions = []; - for (var j = 0; j < message.setParameterActions.length; ++j) - object.setParameterActions[j] = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction.toObject(message.setParameterActions[j], options); - } - if (message.conditionalCases && message.conditionalCases.length) { - object.conditionalCases = []; - for (var j = 0; j < message.conditionalCases.length; ++j) - object.conditionalCases[j] = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.toObject(message.conditionalCases[j], options); + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.languageCode = ""; } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; return object; }; /** - * Converts this Fulfillment to JSON. + * Converts this ListFlowsRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest * @instance * @returns {Object.} JSON object */ - Fulfillment.prototype.toJSON = function toJSON() { + ListFlowsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - Fulfillment.SetParameterAction = (function() { + return ListFlowsRequest; + })(); - /** - * Properties of a SetParameterAction. - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment - * @interface ISetParameterAction - * @property {string|null} [parameter] SetParameterAction parameter - * @property {google.protobuf.IValue|null} [value] SetParameterAction value - */ + v3beta1.ListFlowsResponse = (function() { - /** - * Constructs a new SetParameterAction. - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment - * @classdesc Represents a SetParameterAction. - * @implements ISetParameterAction - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ISetParameterAction=} [properties] Properties to set - */ - function SetParameterAction(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of a ListFlowsResponse. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @interface IListFlowsResponse + * @property {Array.|null} [flows] ListFlowsResponse flows + * @property {string|null} [nextPageToken] ListFlowsResponse nextPageToken + */ - /** - * SetParameterAction parameter. - * @member {string} parameter - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction - * @instance - */ - SetParameterAction.prototype.parameter = ""; + /** + * Constructs a new ListFlowsResponse. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents a ListFlowsResponse. + * @implements IListFlowsResponse + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.IListFlowsResponse=} [properties] Properties to set + */ + function ListFlowsResponse(properties) { + this.flows = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * SetParameterAction value. - * @member {google.protobuf.IValue|null|undefined} value - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction - * @instance - */ - SetParameterAction.prototype.value = null; + /** + * ListFlowsResponse flows. + * @member {Array.} flows + * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse + * @instance + */ + ListFlowsResponse.prototype.flows = $util.emptyArray; - /** - * Creates a new SetParameterAction instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ISetParameterAction=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction} SetParameterAction instance - */ - SetParameterAction.create = function create(properties) { - return new SetParameterAction(properties); - }; + /** + * ListFlowsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse + * @instance + */ + ListFlowsResponse.prototype.nextPageToken = ""; - /** - * Encodes the specified SetParameterAction message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ISetParameterAction} message SetParameterAction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetParameterAction.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parameter != null && Object.hasOwnProperty.call(message, "parameter")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parameter); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - $root.google.protobuf.Value.encode(message.value, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; + /** + * Creates a new ListFlowsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IListFlowsResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse} ListFlowsResponse instance + */ + ListFlowsResponse.create = function create(properties) { + return new ListFlowsResponse(properties); + }; - /** - * Encodes the specified SetParameterAction message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ISetParameterAction} message SetParameterAction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetParameterAction.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified ListFlowsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IListFlowsResponse} message ListFlowsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListFlowsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.flows != null && message.flows.length) + for (var i = 0; i < message.flows.length; ++i) + $root.google.cloud.dialogflow.cx.v3beta1.Flow.encode(message.flows[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; - /** - * Decodes a SetParameterAction message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction} SetParameterAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetParameterAction.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.parameter = reader.string(); - break; - case 2: - message.value = $root.google.protobuf.Value.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } + /** + * Encodes the specified ListFlowsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IListFlowsResponse} message ListFlowsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListFlowsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListFlowsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse} ListFlowsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListFlowsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.flows && message.flows.length)) + message.flows = []; + message.flows.push($root.google.cloud.dialogflow.cx.v3beta1.Flow.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } - return message; - }; + } + return message; + }; - /** - * Decodes a SetParameterAction message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction} SetParameterAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetParameterAction.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a ListFlowsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse} ListFlowsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListFlowsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a SetParameterAction message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SetParameterAction.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parameter != null && message.hasOwnProperty("parameter")) - if (!$util.isString(message.parameter)) - return "parameter: string expected"; - if (message.value != null && message.hasOwnProperty("value")) { - var error = $root.google.protobuf.Value.verify(message.value); + /** + * Verifies a ListFlowsResponse message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListFlowsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.flows != null && message.hasOwnProperty("flows")) { + if (!Array.isArray(message.flows)) + return "flows: array expected"; + for (var i = 0; i < message.flows.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.Flow.verify(message.flows[i]); if (error) - return "value." + error; + return "flows." + error; } - return null; - }; + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; - /** - * Creates a SetParameterAction message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction} SetParameterAction - */ - SetParameterAction.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction(); - if (object.parameter != null) - message.parameter = String(object.parameter); - if (object.value != null) { - if (typeof object.value !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction.value: object expected"); - message.value = $root.google.protobuf.Value.fromObject(object.value); + /** + * Creates a ListFlowsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse} ListFlowsResponse + */ + ListFlowsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse(); + if (object.flows) { + if (!Array.isArray(object.flows)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse.flows: array expected"); + message.flows = []; + for (var i = 0; i < object.flows.length; ++i) { + if (typeof object.flows[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse.flows: object expected"); + message.flows[i] = $root.google.cloud.dialogflow.cx.v3beta1.Flow.fromObject(object.flows[i]); } - return message; - }; + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; - /** - * Creates a plain object from a SetParameterAction message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction} message SetParameterAction - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SetParameterAction.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parameter = ""; - object.value = null; - } - if (message.parameter != null && message.hasOwnProperty("parameter")) - object.parameter = message.parameter; - if (message.value != null && message.hasOwnProperty("value")) - object.value = $root.google.protobuf.Value.toObject(message.value, options); - return object; - }; + /** + * Creates a plain object from a ListFlowsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse} message ListFlowsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListFlowsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.flows = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.flows && message.flows.length) { + object.flows = []; + for (var j = 0; j < message.flows.length; ++j) + object.flows[j] = $root.google.cloud.dialogflow.cx.v3beta1.Flow.toObject(message.flows[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; - /** - * Converts this SetParameterAction to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction - * @instance - * @returns {Object.} JSON object - */ - SetParameterAction.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this ListFlowsResponse to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse + * @instance + * @returns {Object.} JSON object + */ + ListFlowsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return SetParameterAction; - })(); + return ListFlowsResponse; + })(); - Fulfillment.ConditionalCases = (function() { + v3beta1.GetFlowRequest = (function() { - /** - * Properties of a ConditionalCases. - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment - * @interface IConditionalCases - * @property {Array.|null} [cases] ConditionalCases cases - */ + /** + * Properties of a GetFlowRequest. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @interface IGetFlowRequest + * @property {string|null} [name] GetFlowRequest name + * @property {string|null} [languageCode] GetFlowRequest languageCode + */ - /** - * Constructs a new ConditionalCases. - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment - * @classdesc Represents a ConditionalCases. - * @implements IConditionalCases - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.IConditionalCases=} [properties] Properties to set - */ - function ConditionalCases(properties) { - this.cases = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Constructs a new GetFlowRequest. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents a GetFlowRequest. + * @implements IGetFlowRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.IGetFlowRequest=} [properties] Properties to set + */ + function GetFlowRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * ConditionalCases cases. - * @member {Array.} cases - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases - * @instance - */ - ConditionalCases.prototype.cases = $util.emptyArray; + /** + * GetFlowRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowRequest + * @instance + */ + GetFlowRequest.prototype.name = ""; - /** - * Creates a new ConditionalCases instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.IConditionalCases=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases} ConditionalCases instance - */ - ConditionalCases.create = function create(properties) { - return new ConditionalCases(properties); - }; + /** + * GetFlowRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowRequest + * @instance + */ + GetFlowRequest.prototype.languageCode = ""; - /** - * Encodes the specified ConditionalCases message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.IConditionalCases} message ConditionalCases message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConditionalCases.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.cases != null && message.cases.length) - for (var i = 0; i < message.cases.length; ++i) - $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.encode(message.cases[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; + /** + * Creates a new GetFlowRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IGetFlowRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.GetFlowRequest} GetFlowRequest instance + */ + GetFlowRequest.create = function create(properties) { + return new GetFlowRequest(properties); + }; - /** - * Encodes the specified ConditionalCases message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.IConditionalCases} message ConditionalCases message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConditionalCases.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified GetFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetFlowRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IGetFlowRequest} message GetFlowRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetFlowRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); + return writer; + }; - /** - * Decodes a ConditionalCases message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases} ConditionalCases - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConditionalCases.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.cases && message.cases.length)) - message.cases = []; - message.cases.push($root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Encodes the specified GetFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetFlowRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IGetFlowRequest} message GetFlowRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetFlowRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a ConditionalCases message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases} ConditionalCases - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConditionalCases.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ConditionalCases message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ConditionalCases.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.cases != null && message.hasOwnProperty("cases")) { - if (!Array.isArray(message.cases)) - return "cases: array expected"; - for (var i = 0; i < message.cases.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.verify(message.cases[i]); - if (error) - return "cases." + error; - } + /** + * Decodes a GetFlowRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.GetFlowRequest} GetFlowRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetFlowRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.GetFlowRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.languageCode = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } - return null; - }; + } + return message; + }; - /** - * Creates a ConditionalCases message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases} ConditionalCases - */ - ConditionalCases.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases(); - if (object.cases) { - if (!Array.isArray(object.cases)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.cases: array expected"); - message.cases = []; - for (var i = 0; i < object.cases.length; ++i) { - if (typeof object.cases[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.cases: object expected"); - message.cases[i] = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.fromObject(object.cases[i]); - } - } - return message; - }; + /** + * Decodes a GetFlowRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.GetFlowRequest} GetFlowRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetFlowRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a plain object from a ConditionalCases message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases} message ConditionalCases - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ConditionalCases.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.cases = []; - if (message.cases && message.cases.length) { - object.cases = []; - for (var j = 0; j < message.cases.length; ++j) - object.cases[j] = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.toObject(message.cases[j], options); - } + /** + * Verifies a GetFlowRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetFlowRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; + return null; + }; + + /** + * Creates a GetFlowRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.GetFlowRequest} GetFlowRequest + */ + GetFlowRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.GetFlowRequest) return object; - }; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.GetFlowRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.languageCode != null) + message.languageCode = String(object.languageCode); + return message; + }; - /** - * Converts this ConditionalCases to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases - * @instance - * @returns {Object.} JSON object - */ - ConditionalCases.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a GetFlowRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.GetFlowRequest} message GetFlowRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetFlowRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.languageCode = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; + return object; + }; - ConditionalCases.Case = (function() { + /** + * Converts this GetFlowRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowRequest + * @instance + * @returns {Object.} JSON object + */ + GetFlowRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Properties of a Case. - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases - * @interface ICase - * @property {string|null} [condition] Case condition - * @property {Array.|null} [caseContent] Case caseContent - */ + return GetFlowRequest; + })(); - /** - * Constructs a new Case. - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases - * @classdesc Represents a Case. - * @implements ICase - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.ICase=} [properties] Properties to set - */ - function Case(properties) { - this.caseContent = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + v3beta1.UpdateFlowRequest = (function() { - /** - * Case condition. - * @member {string} condition - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case - * @instance - */ - Case.prototype.condition = ""; + /** + * Properties of an UpdateFlowRequest. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @interface IUpdateFlowRequest + * @property {google.cloud.dialogflow.cx.v3beta1.IFlow|null} [flow] UpdateFlowRequest flow + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateFlowRequest updateMask + * @property {string|null} [languageCode] UpdateFlowRequest languageCode + */ - /** - * Case caseContent. - * @member {Array.} caseContent - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case - * @instance - */ - Case.prototype.caseContent = $util.emptyArray; + /** + * Constructs a new UpdateFlowRequest. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents an UpdateFlowRequest. + * @implements IUpdateFlowRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateFlowRequest=} [properties] Properties to set + */ + function UpdateFlowRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Creates a new Case instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.ICase=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case} Case instance - */ - Case.create = function create(properties) { - return new Case(properties); - }; + /** + * UpdateFlowRequest flow. + * @member {google.cloud.dialogflow.cx.v3beta1.IFlow|null|undefined} flow + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest + * @instance + */ + UpdateFlowRequest.prototype.flow = null; - /** - * Encodes the specified Case message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.ICase} message Case message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Case.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.condition); - if (message.caseContent != null && message.caseContent.length) - for (var i = 0; i < message.caseContent.length; ++i) - $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent.encode(message.caseContent[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; + /** + * UpdateFlowRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest + * @instance + */ + UpdateFlowRequest.prototype.updateMask = null; - /** - * Encodes the specified Case message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.ICase} message Case message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Case.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * UpdateFlowRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest + * @instance + */ + UpdateFlowRequest.prototype.languageCode = ""; - /** - * Decodes a Case message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case} Case - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Case.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.condition = reader.string(); - break; - case 2: - if (!(message.caseContent && message.caseContent.length)) - message.caseContent = []; - message.caseContent.push($root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Creates a new UpdateFlowRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateFlowRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest} UpdateFlowRequest instance + */ + UpdateFlowRequest.create = function create(properties) { + return new UpdateFlowRequest(properties); + }; - /** - * Decodes a Case message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case} Case - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Case.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Encodes the specified UpdateFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateFlowRequest} message UpdateFlowRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateFlowRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.flow != null && Object.hasOwnProperty.call(message, "flow")) + $root.google.cloud.dialogflow.cx.v3beta1.Flow.encode(message.flow, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.languageCode); + return writer; + }; - /** - * Verifies a Case message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Case.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.condition != null && message.hasOwnProperty("condition")) - if (!$util.isString(message.condition)) - return "condition: string expected"; - if (message.caseContent != null && message.hasOwnProperty("caseContent")) { - if (!Array.isArray(message.caseContent)) - return "caseContent: array expected"; - for (var i = 0; i < message.caseContent.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent.verify(message.caseContent[i]); - if (error) - return "caseContent." + error; - } - } - return null; - }; + /** + * Encodes the specified UpdateFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateFlowRequest} message UpdateFlowRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateFlowRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a Case message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case} Case - */ - Case.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case(); - if (object.condition != null) - message.condition = String(object.condition); - if (object.caseContent) { - if (!Array.isArray(object.caseContent)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.caseContent: array expected"); - message.caseContent = []; - for (var i = 0; i < object.caseContent.length; ++i) { - if (typeof object.caseContent[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.caseContent: object expected"); - message.caseContent[i] = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent.fromObject(object.caseContent[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a Case message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case} message Case - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Case.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.caseContent = []; - if (options.defaults) - object.condition = ""; - if (message.condition != null && message.hasOwnProperty("condition")) - object.condition = message.condition; - if (message.caseContent && message.caseContent.length) { - object.caseContent = []; - for (var j = 0; j < message.caseContent.length; ++j) - object.caseContent[j] = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent.toObject(message.caseContent[j], options); - } - return object; - }; - - /** - * Converts this Case to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case - * @instance - * @returns {Object.} JSON object - */ - Case.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - Case.CaseContent = (function() { - - /** - * Properties of a CaseContent. - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case - * @interface ICaseContent - * @property {google.cloud.dialogflow.cx.v3beta1.IResponseMessage|null} [message] CaseContent message - * @property {google.cloud.dialogflow.cx.v3beta1.Fulfillment.IConditionalCases|null} [additionalCases] CaseContent additionalCases - */ - - /** - * Constructs a new CaseContent. - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case - * @classdesc Represents a CaseContent. - * @implements ICaseContent - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.ICaseContent=} [properties] Properties to set - */ - function CaseContent(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CaseContent message. - * @member {google.cloud.dialogflow.cx.v3beta1.IResponseMessage|null|undefined} message - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent - * @instance - */ - CaseContent.prototype.message = null; - - /** - * CaseContent additionalCases. - * @member {google.cloud.dialogflow.cx.v3beta1.Fulfillment.IConditionalCases|null|undefined} additionalCases - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent - * @instance - */ - CaseContent.prototype.additionalCases = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * CaseContent casesOrMessage. - * @member {"message"|"additionalCases"|undefined} casesOrMessage - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent - * @instance - */ - Object.defineProperty(CaseContent.prototype, "casesOrMessage", { - get: $util.oneOfGetter($oneOfFields = ["message", "additionalCases"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new CaseContent instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.ICaseContent=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent} CaseContent instance - */ - CaseContent.create = function create(properties) { - return new CaseContent(properties); - }; - - /** - * Encodes the specified CaseContent message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.ICaseContent} message CaseContent message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CaseContent.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.encode(message.message, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.additionalCases != null && Object.hasOwnProperty.call(message, "additionalCases")) - $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.encode(message.additionalCases, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CaseContent message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.ICaseContent} message CaseContent message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CaseContent.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CaseContent message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent} CaseContent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CaseContent.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.message = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.decode(reader, reader.uint32()); - break; - case 2: - message.additionalCases = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CaseContent message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent} CaseContent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CaseContent.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CaseContent message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CaseContent.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.message != null && message.hasOwnProperty("message")) { - properties.casesOrMessage = 1; - { - var error = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.verify(message.message); - if (error) - return "message." + error; - } - } - if (message.additionalCases != null && message.hasOwnProperty("additionalCases")) { - if (properties.casesOrMessage === 1) - return "casesOrMessage: multiple values"; - properties.casesOrMessage = 1; - { - var error = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.verify(message.additionalCases); - if (error) - return "additionalCases." + error; - } - } - return null; - }; - - /** - * Creates a CaseContent message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent} CaseContent - */ - CaseContent.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent(); - if (object.message != null) { - if (typeof object.message !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent.message: object expected"); - message.message = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.fromObject(object.message); - } - if (object.additionalCases != null) { - if (typeof object.additionalCases !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent.additionalCases: object expected"); - message.additionalCases = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.fromObject(object.additionalCases); - } - return message; - }; - - /** - * Creates a plain object from a CaseContent message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent} message CaseContent - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CaseContent.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.message != null && message.hasOwnProperty("message")) { - object.message = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.toObject(message.message, options); - if (options.oneofs) - object.casesOrMessage = "message"; - } - if (message.additionalCases != null && message.hasOwnProperty("additionalCases")) { - object.additionalCases = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.toObject(message.additionalCases, options); - if (options.oneofs) - object.casesOrMessage = "additionalCases"; - } - return object; - }; - - /** - * Converts this CaseContent to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent - * @instance - * @returns {Object.} JSON object - */ - CaseContent.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return CaseContent; - })(); - - return Case; - })(); - - return ConditionalCases; - })(); - - return Fulfillment; - })(); - - v3beta1.ResponseMessage = (function() { - - /** - * Properties of a ResponseMessage. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IResponseMessage - * @property {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IText|null} [text] ResponseMessage text - * @property {google.protobuf.IStruct|null} [payload] ResponseMessage payload - * @property {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IConversationSuccess|null} [conversationSuccess] ResponseMessage conversationSuccess - * @property {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IOutputAudioText|null} [outputAudioText] ResponseMessage outputAudioText - * @property {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ILiveAgentHandoff|null} [liveAgentHandoff] ResponseMessage liveAgentHandoff - * @property {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IEndInteraction|null} [endInteraction] ResponseMessage endInteraction - * @property {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IPlayAudio|null} [playAudio] ResponseMessage playAudio - * @property {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IMixedAudio|null} [mixedAudio] ResponseMessage mixedAudio - */ + /** + * Decodes an UpdateFlowRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest} UpdateFlowRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateFlowRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.flow = $root.google.cloud.dialogflow.cx.v3beta1.Flow.decode(reader, reader.uint32()); + break; + case 2: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + case 3: + message.languageCode = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Constructs a new ResponseMessage. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a ResponseMessage. - * @implements IResponseMessage - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IResponseMessage=} [properties] Properties to set + * Decodes an UpdateFlowRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest} UpdateFlowRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - function ResponseMessage(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + UpdateFlowRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * ResponseMessage text. - * @member {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IText|null|undefined} text - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage - * @instance + * Verifies an UpdateFlowRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ResponseMessage.prototype.text = null; + UpdateFlowRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.flow != null && message.hasOwnProperty("flow")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.Flow.verify(message.flow); + if (error) + return "flow." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; + return null; + }; /** - * ResponseMessage payload. - * @member {google.protobuf.IStruct|null|undefined} payload - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage - * @instance + * Creates an UpdateFlowRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest} UpdateFlowRequest */ - ResponseMessage.prototype.payload = null; + UpdateFlowRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest(); + if (object.flow != null) { + if (typeof object.flow !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest.flow: object expected"); + message.flow = $root.google.cloud.dialogflow.cx.v3beta1.Flow.fromObject(object.flow); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.languageCode != null) + message.languageCode = String(object.languageCode); + return message; + }; /** - * ResponseMessage conversationSuccess. - * @member {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IConversationSuccess|null|undefined} conversationSuccess - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage - * @instance + * Creates a plain object from an UpdateFlowRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest} message UpdateFlowRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - ResponseMessage.prototype.conversationSuccess = null; + UpdateFlowRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.flow = null; + object.updateMask = null; + object.languageCode = ""; + } + if (message.flow != null && message.hasOwnProperty("flow")) + object.flow = $root.google.cloud.dialogflow.cx.v3beta1.Flow.toObject(message.flow, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; + return object; + }; /** - * ResponseMessage outputAudioText. - * @member {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IOutputAudioText|null|undefined} outputAudioText - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * Converts this UpdateFlowRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest * @instance + * @returns {Object.} JSON object */ - ResponseMessage.prototype.outputAudioText = null; + UpdateFlowRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * ResponseMessage liveAgentHandoff. - * @member {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ILiveAgentHandoff|null|undefined} liveAgentHandoff - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage - * @instance - */ - ResponseMessage.prototype.liveAgentHandoff = null; + return UpdateFlowRequest; + })(); - /** - * ResponseMessage endInteraction. - * @member {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IEndInteraction|null|undefined} endInteraction - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage - * @instance - */ - ResponseMessage.prototype.endInteraction = null; + v3beta1.TrainFlowRequest = (function() { /** - * ResponseMessage playAudio. - * @member {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IPlayAudio|null|undefined} playAudio - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage - * @instance + * Properties of a TrainFlowRequest. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @interface ITrainFlowRequest + * @property {string|null} [name] TrainFlowRequest name */ - ResponseMessage.prototype.playAudio = null; /** - * ResponseMessage mixedAudio. - * @member {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IMixedAudio|null|undefined} mixedAudio - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage - * @instance + * Constructs a new TrainFlowRequest. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents a TrainFlowRequest. + * @implements ITrainFlowRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.ITrainFlowRequest=} [properties] Properties to set */ - ResponseMessage.prototype.mixedAudio = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + function TrainFlowRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * ResponseMessage message. - * @member {"text"|"payload"|"conversationSuccess"|"outputAudioText"|"liveAgentHandoff"|"endInteraction"|"playAudio"|"mixedAudio"|undefined} message - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * TrainFlowRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest * @instance */ - Object.defineProperty(ResponseMessage.prototype, "message", { - get: $util.oneOfGetter($oneOfFields = ["text", "payload", "conversationSuccess", "outputAudioText", "liveAgentHandoff", "endInteraction", "playAudio", "mixedAudio"]), - set: $util.oneOfSetter($oneOfFields) - }); + TrainFlowRequest.prototype.name = ""; /** - * Creates a new ResponseMessage instance using the specified properties. + * Creates a new TrainFlowRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @memberof google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IResponseMessage=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage} ResponseMessage instance + * @param {google.cloud.dialogflow.cx.v3beta1.ITrainFlowRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest} TrainFlowRequest instance */ - ResponseMessage.create = function create(properties) { - return new ResponseMessage(properties); + TrainFlowRequest.create = function create(properties) { + return new TrainFlowRequest(properties); }; /** - * Encodes the specified ResponseMessage message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.verify|verify} messages. + * Encodes the specified TrainFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @memberof google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IResponseMessage} message ResponseMessage message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.ITrainFlowRequest} message TrainFlowRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResponseMessage.encode = function encode(message, writer) { + TrainFlowRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.text != null && Object.hasOwnProperty.call(message, "text")) - $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text.encode(message.text, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.payload != null && Object.hasOwnProperty.call(message, "payload")) - $root.google.protobuf.Struct.encode(message.payload, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.outputAudioText != null && Object.hasOwnProperty.call(message, "outputAudioText")) - $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText.encode(message.outputAudioText, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.conversationSuccess != null && Object.hasOwnProperty.call(message, "conversationSuccess")) - $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess.encode(message.conversationSuccess, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.liveAgentHandoff != null && Object.hasOwnProperty.call(message, "liveAgentHandoff")) - $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff.encode(message.liveAgentHandoff, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.endInteraction != null && Object.hasOwnProperty.call(message, "endInteraction")) - $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction.encode(message.endInteraction, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.playAudio != null && Object.hasOwnProperty.call(message, "playAudio")) - $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio.encode(message.playAudio, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.mixedAudio != null && Object.hasOwnProperty.call(message, "mixedAudio")) - $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.encode(message.mixedAudio, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified ResponseMessage message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.verify|verify} messages. + * Encodes the specified TrainFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @memberof google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IResponseMessage} message ResponseMessage message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.ITrainFlowRequest} message TrainFlowRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { + TrainFlowRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ResponseMessage message from the specified reader or buffer. + * Decodes a TrainFlowRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @memberof google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage} ResponseMessage + * @returns {google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest} TrainFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResponseMessage.decode = function decode(reader, length) { + TrainFlowRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.text = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text.decode(reader, reader.uint32()); - break; - case 2: - message.payload = $root.google.protobuf.Struct.decode(reader, reader.uint32()); - break; - case 9: - message.conversationSuccess = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess.decode(reader, reader.uint32()); - break; - case 8: - message.outputAudioText = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText.decode(reader, reader.uint32()); - break; - case 10: - message.liveAgentHandoff = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff.decode(reader, reader.uint32()); - break; - case 11: - message.endInteraction = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction.decode(reader, reader.uint32()); - break; - case 12: - message.playAudio = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio.decode(reader, reader.uint32()); - break; - case 13: - message.mixedAudio = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.decode(reader, reader.uint32()); + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -49559,1210 +49104,1062 @@ }; /** - * Decodes a ResponseMessage message from the specified reader or buffer, length delimited. + * Decodes a TrainFlowRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @memberof google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage} ResponseMessage + * @returns {google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest} TrainFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResponseMessage.decodeDelimited = function decodeDelimited(reader) { + TrainFlowRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ResponseMessage message. + * Verifies a TrainFlowRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @memberof google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ResponseMessage.verify = function verify(message) { + TrainFlowRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.text != null && message.hasOwnProperty("text")) { - properties.message = 1; - { - var error = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text.verify(message.text); - if (error) - return "text." + error; - } - } - if (message.payload != null && message.hasOwnProperty("payload")) { - if (properties.message === 1) - return "message: multiple values"; - properties.message = 1; - { - var error = $root.google.protobuf.Struct.verify(message.payload); - if (error) - return "payload." + error; - } - } - if (message.conversationSuccess != null && message.hasOwnProperty("conversationSuccess")) { - if (properties.message === 1) - return "message: multiple values"; - properties.message = 1; - { - var error = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess.verify(message.conversationSuccess); - if (error) - return "conversationSuccess." + error; - } - } - if (message.outputAudioText != null && message.hasOwnProperty("outputAudioText")) { - if (properties.message === 1) - return "message: multiple values"; - properties.message = 1; - { - var error = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText.verify(message.outputAudioText); - if (error) - return "outputAudioText." + error; - } - } - if (message.liveAgentHandoff != null && message.hasOwnProperty("liveAgentHandoff")) { - if (properties.message === 1) - return "message: multiple values"; - properties.message = 1; - { - var error = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff.verify(message.liveAgentHandoff); - if (error) - return "liveAgentHandoff." + error; - } - } - if (message.endInteraction != null && message.hasOwnProperty("endInteraction")) { - if (properties.message === 1) - return "message: multiple values"; - properties.message = 1; - { - var error = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction.verify(message.endInteraction); - if (error) - return "endInteraction." + error; - } - } - if (message.playAudio != null && message.hasOwnProperty("playAudio")) { - if (properties.message === 1) - return "message: multiple values"; - properties.message = 1; - { - var error = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio.verify(message.playAudio); - if (error) - return "playAudio." + error; - } - } - if (message.mixedAudio != null && message.hasOwnProperty("mixedAudio")) { - if (properties.message === 1) - return "message: multiple values"; - properties.message = 1; - { - var error = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.verify(message.mixedAudio); - if (error) - return "mixedAudio." + error; - } - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a ResponseMessage message from a plain object. Also converts values to their respective internal types. + * Creates a TrainFlowRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @memberof google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage} ResponseMessage + * @returns {google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest} TrainFlowRequest */ - ResponseMessage.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage) + TrainFlowRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage(); - if (object.text != null) { - if (typeof object.text !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ResponseMessage.text: object expected"); - message.text = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text.fromObject(object.text); - } - if (object.payload != null) { - if (typeof object.payload !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ResponseMessage.payload: object expected"); - message.payload = $root.google.protobuf.Struct.fromObject(object.payload); - } - if (object.conversationSuccess != null) { - if (typeof object.conversationSuccess !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ResponseMessage.conversationSuccess: object expected"); - message.conversationSuccess = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess.fromObject(object.conversationSuccess); - } - if (object.outputAudioText != null) { - if (typeof object.outputAudioText !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ResponseMessage.outputAudioText: object expected"); - message.outputAudioText = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText.fromObject(object.outputAudioText); - } - if (object.liveAgentHandoff != null) { - if (typeof object.liveAgentHandoff !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ResponseMessage.liveAgentHandoff: object expected"); - message.liveAgentHandoff = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff.fromObject(object.liveAgentHandoff); - } - if (object.endInteraction != null) { - if (typeof object.endInteraction !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ResponseMessage.endInteraction: object expected"); - message.endInteraction = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction.fromObject(object.endInteraction); - } - if (object.playAudio != null) { - if (typeof object.playAudio !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ResponseMessage.playAudio: object expected"); - message.playAudio = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio.fromObject(object.playAudio); - } - if (object.mixedAudio != null) { - if (typeof object.mixedAudio !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ResponseMessage.mixedAudio: object expected"); - message.mixedAudio = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.fromObject(object.mixedAudio); - } + var message = new $root.google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a ResponseMessage message. Also converts values to other types if specified. + * Creates a plain object from a TrainFlowRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @memberof google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage} message ResponseMessage + * @param {google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest} message TrainFlowRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResponseMessage.toObject = function toObject(message, options) { + TrainFlowRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.text != null && message.hasOwnProperty("text")) { - object.text = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text.toObject(message.text, options); - if (options.oneofs) - object.message = "text"; - } - if (message.payload != null && message.hasOwnProperty("payload")) { - object.payload = $root.google.protobuf.Struct.toObject(message.payload, options); - if (options.oneofs) - object.message = "payload"; - } - if (message.outputAudioText != null && message.hasOwnProperty("outputAudioText")) { - object.outputAudioText = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText.toObject(message.outputAudioText, options); - if (options.oneofs) - object.message = "outputAudioText"; - } - if (message.conversationSuccess != null && message.hasOwnProperty("conversationSuccess")) { - object.conversationSuccess = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess.toObject(message.conversationSuccess, options); - if (options.oneofs) - object.message = "conversationSuccess"; - } - if (message.liveAgentHandoff != null && message.hasOwnProperty("liveAgentHandoff")) { - object.liveAgentHandoff = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff.toObject(message.liveAgentHandoff, options); - if (options.oneofs) - object.message = "liveAgentHandoff"; - } - if (message.endInteraction != null && message.hasOwnProperty("endInteraction")) { - object.endInteraction = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction.toObject(message.endInteraction, options); - if (options.oneofs) - object.message = "endInteraction"; - } - if (message.playAudio != null && message.hasOwnProperty("playAudio")) { - object.playAudio = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio.toObject(message.playAudio, options); - if (options.oneofs) - object.message = "playAudio"; - } - if (message.mixedAudio != null && message.hasOwnProperty("mixedAudio")) { - object.mixedAudio = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.toObject(message.mixedAudio, options); - if (options.oneofs) - object.message = "mixedAudio"; - } + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this ResponseMessage to JSON. + * Converts this TrainFlowRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @memberof google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest * @instance * @returns {Object.} JSON object */ - ResponseMessage.prototype.toJSON = function toJSON() { + TrainFlowRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - ResponseMessage.Text = (function() { + return TrainFlowRequest; + })(); - /** - * Properties of a Text. - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage - * @interface IText - * @property {Array.|null} [text] Text text - * @property {boolean|null} [allowPlaybackInterruption] Text allowPlaybackInterruption - */ + v3beta1.Pages = (function() { - /** - * Constructs a new Text. - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage - * @classdesc Represents a Text. - * @implements IText - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IText=} [properties] Properties to set - */ - function Text(properties) { - this.text = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Constructs a new Pages service. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents a Pages + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Pages(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } - /** - * Text text. - * @member {Array.} text - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text - * @instance - */ - Text.prototype.text = $util.emptyArray; + (Pages.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Pages; - /** - * Text allowPlaybackInterruption. - * @member {boolean} allowPlaybackInterruption - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text - * @instance - */ - Text.prototype.allowPlaybackInterruption = false; + /** + * Creates new Pages service using the specified rpc implementation. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.Pages + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Pages} RPC service. Useful where requests and/or responses are streamed. + */ + Pages.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; - /** - * Creates a new Text instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IText=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text} Text instance - */ - Text.create = function create(properties) { - return new Text(properties); - }; + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Pages#listPages}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Pages + * @typedef ListPagesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3beta1.ListPagesResponse} [response] ListPagesResponse + */ - /** - * Encodes the specified Text message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IText} message Text message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Text.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.text != null && message.text.length) - for (var i = 0; i < message.text.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.text[i]); - if (message.allowPlaybackInterruption != null && Object.hasOwnProperty.call(message, "allowPlaybackInterruption")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowPlaybackInterruption); - return writer; - }; + /** + * Calls ListPages. + * @function listPages + * @memberof google.cloud.dialogflow.cx.v3beta1.Pages + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IListPagesRequest} request ListPagesRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.Pages.ListPagesCallback} callback Node-style callback called with the error, if any, and ListPagesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Pages.prototype.listPages = function listPages(request, callback) { + return this.rpcCall(listPages, $root.google.cloud.dialogflow.cx.v3beta1.ListPagesRequest, $root.google.cloud.dialogflow.cx.v3beta1.ListPagesResponse, request, callback); + }, "name", { value: "ListPages" }); - /** - * Encodes the specified Text message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IText} message Text message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Text.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Calls ListPages. + * @function listPages + * @memberof google.cloud.dialogflow.cx.v3beta1.Pages + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IListPagesRequest} request ListPagesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Decodes a Text message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text} Text - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Text.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.text && message.text.length)) - message.text = []; - message.text.push(reader.string()); - break; - case 2: - message.allowPlaybackInterruption = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Pages#getPage}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Pages + * @typedef GetPageCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3beta1.Page} [response] Page + */ - /** - * Decodes a Text message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text} Text - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Text.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Calls GetPage. + * @function getPage + * @memberof google.cloud.dialogflow.cx.v3beta1.Pages + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IGetPageRequest} request GetPageRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.Pages.GetPageCallback} callback Node-style callback called with the error, if any, and Page + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Pages.prototype.getPage = function getPage(request, callback) { + return this.rpcCall(getPage, $root.google.cloud.dialogflow.cx.v3beta1.GetPageRequest, $root.google.cloud.dialogflow.cx.v3beta1.Page, request, callback); + }, "name", { value: "GetPage" }); - /** - * Verifies a Text message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Text.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.text != null && message.hasOwnProperty("text")) { - if (!Array.isArray(message.text)) - return "text: array expected"; - for (var i = 0; i < message.text.length; ++i) - if (!$util.isString(message.text[i])) - return "text: string[] expected"; - } - if (message.allowPlaybackInterruption != null && message.hasOwnProperty("allowPlaybackInterruption")) - if (typeof message.allowPlaybackInterruption !== "boolean") - return "allowPlaybackInterruption: boolean expected"; - return null; - }; + /** + * Calls GetPage. + * @function getPage + * @memberof google.cloud.dialogflow.cx.v3beta1.Pages + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IGetPageRequest} request GetPageRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Creates a Text message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text} Text - */ - Text.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text(); - if (object.text) { - if (!Array.isArray(object.text)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text.text: array expected"); - message.text = []; - for (var i = 0; i < object.text.length; ++i) - message.text[i] = String(object.text[i]); - } - if (object.allowPlaybackInterruption != null) - message.allowPlaybackInterruption = Boolean(object.allowPlaybackInterruption); - return message; - }; - - /** - * Creates a plain object from a Text message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text} message Text - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Text.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.text = []; - if (options.defaults) - object.allowPlaybackInterruption = false; - if (message.text && message.text.length) { - object.text = []; - for (var j = 0; j < message.text.length; ++j) - object.text[j] = message.text[j]; - } - if (message.allowPlaybackInterruption != null && message.hasOwnProperty("allowPlaybackInterruption")) - object.allowPlaybackInterruption = message.allowPlaybackInterruption; - return object; - }; + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Pages#createPage}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Pages + * @typedef CreatePageCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3beta1.Page} [response] Page + */ - /** - * Converts this Text to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text - * @instance - * @returns {Object.} JSON object - */ - Text.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Calls CreatePage. + * @function createPage + * @memberof google.cloud.dialogflow.cx.v3beta1.Pages + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.ICreatePageRequest} request CreatePageRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.Pages.CreatePageCallback} callback Node-style callback called with the error, if any, and Page + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Pages.prototype.createPage = function createPage(request, callback) { + return this.rpcCall(createPage, $root.google.cloud.dialogflow.cx.v3beta1.CreatePageRequest, $root.google.cloud.dialogflow.cx.v3beta1.Page, request, callback); + }, "name", { value: "CreatePage" }); - return Text; - })(); + /** + * Calls CreatePage. + * @function createPage + * @memberof google.cloud.dialogflow.cx.v3beta1.Pages + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.ICreatePageRequest} request CreatePageRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - ResponseMessage.LiveAgentHandoff = (function() { + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Pages#updatePage}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Pages + * @typedef UpdatePageCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3beta1.Page} [response] Page + */ - /** - * Properties of a LiveAgentHandoff. - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage - * @interface ILiveAgentHandoff - * @property {google.protobuf.IStruct|null} [metadata] LiveAgentHandoff metadata - */ + /** + * Calls UpdatePage. + * @function updatePage + * @memberof google.cloud.dialogflow.cx.v3beta1.Pages + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdatePageRequest} request UpdatePageRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.Pages.UpdatePageCallback} callback Node-style callback called with the error, if any, and Page + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Pages.prototype.updatePage = function updatePage(request, callback) { + return this.rpcCall(updatePage, $root.google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest, $root.google.cloud.dialogflow.cx.v3beta1.Page, request, callback); + }, "name", { value: "UpdatePage" }); - /** - * Constructs a new LiveAgentHandoff. - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage - * @classdesc Represents a LiveAgentHandoff. - * @implements ILiveAgentHandoff - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ILiveAgentHandoff=} [properties] Properties to set - */ - function LiveAgentHandoff(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Calls UpdatePage. + * @function updatePage + * @memberof google.cloud.dialogflow.cx.v3beta1.Pages + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdatePageRequest} request UpdatePageRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * LiveAgentHandoff metadata. - * @member {google.protobuf.IStruct|null|undefined} metadata - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff - * @instance - */ - LiveAgentHandoff.prototype.metadata = null; + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Pages#deletePage}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Pages + * @typedef DeletePageCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ - /** - * Creates a new LiveAgentHandoff instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ILiveAgentHandoff=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff} LiveAgentHandoff instance - */ - LiveAgentHandoff.create = function create(properties) { - return new LiveAgentHandoff(properties); - }; + /** + * Calls DeletePage. + * @function deletePage + * @memberof google.cloud.dialogflow.cx.v3beta1.Pages + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IDeletePageRequest} request DeletePageRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.Pages.DeletePageCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Pages.prototype.deletePage = function deletePage(request, callback) { + return this.rpcCall(deletePage, $root.google.cloud.dialogflow.cx.v3beta1.DeletePageRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeletePage" }); - /** - * Encodes the specified LiveAgentHandoff message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ILiveAgentHandoff} message LiveAgentHandoff message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LiveAgentHandoff.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - $root.google.protobuf.Struct.encode(message.metadata, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; + /** + * Calls DeletePage. + * @function deletePage + * @memberof google.cloud.dialogflow.cx.v3beta1.Pages + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IDeletePageRequest} request DeletePageRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Encodes the specified LiveAgentHandoff message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ILiveAgentHandoff} message LiveAgentHandoff message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LiveAgentHandoff.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + return Pages; + })(); - /** - * Decodes a LiveAgentHandoff message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff} LiveAgentHandoff - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LiveAgentHandoff.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.metadata = $root.google.protobuf.Struct.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + v3beta1.Page = (function() { - /** - * Decodes a LiveAgentHandoff message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff} LiveAgentHandoff - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LiveAgentHandoff.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Properties of a Page. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @interface IPage + * @property {string|null} [name] Page name + * @property {string|null} [displayName] Page displayName + * @property {google.cloud.dialogflow.cx.v3beta1.IFulfillment|null} [entryFulfillment] Page entryFulfillment + * @property {google.cloud.dialogflow.cx.v3beta1.IForm|null} [form] Page form + * @property {Array.|null} [transitionRouteGroups] Page transitionRouteGroups + * @property {Array.|null} [transitionRoutes] Page transitionRoutes + * @property {Array.|null} [eventHandlers] Page eventHandlers + */ - /** - * Verifies a LiveAgentHandoff message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LiveAgentHandoff.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.metadata != null && message.hasOwnProperty("metadata")) { - var error = $root.google.protobuf.Struct.verify(message.metadata); - if (error) - return "metadata." + error; - } - return null; - }; + /** + * Constructs a new Page. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents a Page. + * @implements IPage + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.IPage=} [properties] Properties to set + */ + function Page(properties) { + this.transitionRouteGroups = []; + this.transitionRoutes = []; + this.eventHandlers = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Creates a LiveAgentHandoff message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff} LiveAgentHandoff - */ - LiveAgentHandoff.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff(); - if (object.metadata != null) { - if (typeof object.metadata !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff.metadata: object expected"); - message.metadata = $root.google.protobuf.Struct.fromObject(object.metadata); - } - return message; - }; + /** + * Page name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3beta1.Page + * @instance + */ + Page.prototype.name = ""; - /** - * Creates a plain object from a LiveAgentHandoff message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff} message LiveAgentHandoff - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LiveAgentHandoff.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.metadata = null; - if (message.metadata != null && message.hasOwnProperty("metadata")) - object.metadata = $root.google.protobuf.Struct.toObject(message.metadata, options); - return object; - }; + /** + * Page displayName. + * @member {string} displayName + * @memberof google.cloud.dialogflow.cx.v3beta1.Page + * @instance + */ + Page.prototype.displayName = ""; - /** - * Converts this LiveAgentHandoff to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff - * @instance - * @returns {Object.} JSON object - */ - LiveAgentHandoff.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Page entryFulfillment. + * @member {google.cloud.dialogflow.cx.v3beta1.IFulfillment|null|undefined} entryFulfillment + * @memberof google.cloud.dialogflow.cx.v3beta1.Page + * @instance + */ + Page.prototype.entryFulfillment = null; - return LiveAgentHandoff; - })(); + /** + * Page form. + * @member {google.cloud.dialogflow.cx.v3beta1.IForm|null|undefined} form + * @memberof google.cloud.dialogflow.cx.v3beta1.Page + * @instance + */ + Page.prototype.form = null; - ResponseMessage.ConversationSuccess = (function() { + /** + * Page transitionRouteGroups. + * @member {Array.} transitionRouteGroups + * @memberof google.cloud.dialogflow.cx.v3beta1.Page + * @instance + */ + Page.prototype.transitionRouteGroups = $util.emptyArray; - /** - * Properties of a ConversationSuccess. - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage - * @interface IConversationSuccess - * @property {google.protobuf.IStruct|null} [metadata] ConversationSuccess metadata - */ + /** + * Page transitionRoutes. + * @member {Array.} transitionRoutes + * @memberof google.cloud.dialogflow.cx.v3beta1.Page + * @instance + */ + Page.prototype.transitionRoutes = $util.emptyArray; - /** - * Constructs a new ConversationSuccess. - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage - * @classdesc Represents a ConversationSuccess. - * @implements IConversationSuccess - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IConversationSuccess=} [properties] Properties to set - */ - function ConversationSuccess(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Page eventHandlers. + * @member {Array.} eventHandlers + * @memberof google.cloud.dialogflow.cx.v3beta1.Page + * @instance + */ + Page.prototype.eventHandlers = $util.emptyArray; - /** - * ConversationSuccess metadata. - * @member {google.protobuf.IStruct|null|undefined} metadata - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess - * @instance - */ - ConversationSuccess.prototype.metadata = null; + /** + * Creates a new Page instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.Page + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IPage=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.Page} Page instance + */ + Page.create = function create(properties) { + return new Page(properties); + }; - /** - * Creates a new ConversationSuccess instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IConversationSuccess=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess} ConversationSuccess instance - */ - ConversationSuccess.create = function create(properties) { - return new ConversationSuccess(properties); - }; + /** + * Encodes the specified Page message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Page.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.Page + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IPage} message Page message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Page.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.form != null && Object.hasOwnProperty.call(message, "form")) + $root.google.cloud.dialogflow.cx.v3beta1.Form.encode(message.form, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.entryFulfillment != null && Object.hasOwnProperty.call(message, "entryFulfillment")) + $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.encode(message.entryFulfillment, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.transitionRoutes != null && message.transitionRoutes.length) + for (var i = 0; i < message.transitionRoutes.length; ++i) + $root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.encode(message.transitionRoutes[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.eventHandlers != null && message.eventHandlers.length) + for (var i = 0; i < message.eventHandlers.length; ++i) + $root.google.cloud.dialogflow.cx.v3beta1.EventHandler.encode(message.eventHandlers[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.transitionRouteGroups != null && message.transitionRouteGroups.length) + for (var i = 0; i < message.transitionRouteGroups.length; ++i) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.transitionRouteGroups[i]); + return writer; + }; - /** - * Encodes the specified ConversationSuccess message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IConversationSuccess} message ConversationSuccess message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConversationSuccess.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - $root.google.protobuf.Struct.encode(message.metadata, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; + /** + * Encodes the specified Page message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Page.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.Page + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IPage} message Page message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Page.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Encodes the specified ConversationSuccess message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IConversationSuccess} message ConversationSuccess message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConversationSuccess.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ConversationSuccess message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess} ConversationSuccess - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConversationSuccess.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.metadata = $root.google.protobuf.Struct.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } + /** + * Decodes a Page message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.Page + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.Page} Page + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Page.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Page(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.displayName = reader.string(); + break; + case 7: + message.entryFulfillment = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.decode(reader, reader.uint32()); + break; + case 4: + message.form = $root.google.cloud.dialogflow.cx.v3beta1.Form.decode(reader, reader.uint32()); + break; + case 11: + if (!(message.transitionRouteGroups && message.transitionRouteGroups.length)) + message.transitionRouteGroups = []; + message.transitionRouteGroups.push(reader.string()); + break; + case 9: + if (!(message.transitionRoutes && message.transitionRoutes.length)) + message.transitionRoutes = []; + message.transitionRoutes.push($root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.decode(reader, reader.uint32())); + break; + case 10: + if (!(message.eventHandlers && message.eventHandlers.length)) + message.eventHandlers = []; + message.eventHandlers.push($root.google.cloud.dialogflow.cx.v3beta1.EventHandler.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } - return message; - }; + } + return message; + }; - /** - * Decodes a ConversationSuccess message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess} ConversationSuccess - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConversationSuccess.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a Page message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.Page + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.Page} Page + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Page.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a ConversationSuccess message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ConversationSuccess.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.metadata != null && message.hasOwnProperty("metadata")) { - var error = $root.google.protobuf.Struct.verify(message.metadata); + /** + * Verifies a Page message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.Page + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Page.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.entryFulfillment != null && message.hasOwnProperty("entryFulfillment")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.verify(message.entryFulfillment); + if (error) + return "entryFulfillment." + error; + } + if (message.form != null && message.hasOwnProperty("form")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.Form.verify(message.form); + if (error) + return "form." + error; + } + if (message.transitionRouteGroups != null && message.hasOwnProperty("transitionRouteGroups")) { + if (!Array.isArray(message.transitionRouteGroups)) + return "transitionRouteGroups: array expected"; + for (var i = 0; i < message.transitionRouteGroups.length; ++i) + if (!$util.isString(message.transitionRouteGroups[i])) + return "transitionRouteGroups: string[] expected"; + } + if (message.transitionRoutes != null && message.hasOwnProperty("transitionRoutes")) { + if (!Array.isArray(message.transitionRoutes)) + return "transitionRoutes: array expected"; + for (var i = 0; i < message.transitionRoutes.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.verify(message.transitionRoutes[i]); if (error) - return "metadata." + error; + return "transitionRoutes." + error; } - return null; - }; - - /** - * Creates a ConversationSuccess message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess} ConversationSuccess - */ - ConversationSuccess.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess(); - if (object.metadata != null) { - if (typeof object.metadata !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess.metadata: object expected"); - message.metadata = $root.google.protobuf.Struct.fromObject(object.metadata); + } + if (message.eventHandlers != null && message.hasOwnProperty("eventHandlers")) { + if (!Array.isArray(message.eventHandlers)) + return "eventHandlers: array expected"; + for (var i = 0; i < message.eventHandlers.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.EventHandler.verify(message.eventHandlers[i]); + if (error) + return "eventHandlers." + error; } - return message; - }; + } + return null; + }; - /** - * Creates a plain object from a ConversationSuccess message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess} message ConversationSuccess - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ConversationSuccess.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.metadata = null; - if (message.metadata != null && message.hasOwnProperty("metadata")) - object.metadata = $root.google.protobuf.Struct.toObject(message.metadata, options); + /** + * Creates a Page message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.Page + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.Page} Page + */ + Page.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Page) return object; - }; - - /** - * Converts this ConversationSuccess to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess - * @instance - * @returns {Object.} JSON object - */ - ConversationSuccess.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ConversationSuccess; - })(); - - ResponseMessage.OutputAudioText = (function() { - - /** - * Properties of an OutputAudioText. - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage - * @interface IOutputAudioText - * @property {string|null} [text] OutputAudioText text - * @property {string|null} [ssml] OutputAudioText ssml - * @property {boolean|null} [allowPlaybackInterruption] OutputAudioText allowPlaybackInterruption - */ + var message = new $root.google.cloud.dialogflow.cx.v3beta1.Page(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.entryFulfillment != null) { + if (typeof object.entryFulfillment !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Page.entryFulfillment: object expected"); + message.entryFulfillment = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.fromObject(object.entryFulfillment); + } + if (object.form != null) { + if (typeof object.form !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Page.form: object expected"); + message.form = $root.google.cloud.dialogflow.cx.v3beta1.Form.fromObject(object.form); + } + if (object.transitionRouteGroups) { + if (!Array.isArray(object.transitionRouteGroups)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Page.transitionRouteGroups: array expected"); + message.transitionRouteGroups = []; + for (var i = 0; i < object.transitionRouteGroups.length; ++i) + message.transitionRouteGroups[i] = String(object.transitionRouteGroups[i]); + } + if (object.transitionRoutes) { + if (!Array.isArray(object.transitionRoutes)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Page.transitionRoutes: array expected"); + message.transitionRoutes = []; + for (var i = 0; i < object.transitionRoutes.length; ++i) { + if (typeof object.transitionRoutes[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Page.transitionRoutes: object expected"); + message.transitionRoutes[i] = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.fromObject(object.transitionRoutes[i]); + } + } + if (object.eventHandlers) { + if (!Array.isArray(object.eventHandlers)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Page.eventHandlers: array expected"); + message.eventHandlers = []; + for (var i = 0; i < object.eventHandlers.length; ++i) { + if (typeof object.eventHandlers[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Page.eventHandlers: object expected"); + message.eventHandlers[i] = $root.google.cloud.dialogflow.cx.v3beta1.EventHandler.fromObject(object.eventHandlers[i]); + } + } + return message; + }; - /** - * Constructs a new OutputAudioText. - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage - * @classdesc Represents an OutputAudioText. - * @implements IOutputAudioText - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IOutputAudioText=} [properties] Properties to set - */ - function OutputAudioText(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Creates a plain object from a Page message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.Page + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Page} message Page + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Page.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.transitionRoutes = []; + object.eventHandlers = []; + object.transitionRouteGroups = []; + } + if (options.defaults) { + object.name = ""; + object.displayName = ""; + object.form = null; + object.entryFulfillment = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.form != null && message.hasOwnProperty("form")) + object.form = $root.google.cloud.dialogflow.cx.v3beta1.Form.toObject(message.form, options); + if (message.entryFulfillment != null && message.hasOwnProperty("entryFulfillment")) + object.entryFulfillment = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.toObject(message.entryFulfillment, options); + if (message.transitionRoutes && message.transitionRoutes.length) { + object.transitionRoutes = []; + for (var j = 0; j < message.transitionRoutes.length; ++j) + object.transitionRoutes[j] = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.toObject(message.transitionRoutes[j], options); + } + if (message.eventHandlers && message.eventHandlers.length) { + object.eventHandlers = []; + for (var j = 0; j < message.eventHandlers.length; ++j) + object.eventHandlers[j] = $root.google.cloud.dialogflow.cx.v3beta1.EventHandler.toObject(message.eventHandlers[j], options); + } + if (message.transitionRouteGroups && message.transitionRouteGroups.length) { + object.transitionRouteGroups = []; + for (var j = 0; j < message.transitionRouteGroups.length; ++j) + object.transitionRouteGroups[j] = message.transitionRouteGroups[j]; } + return object; + }; - /** - * OutputAudioText text. - * @member {string} text - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText - * @instance - */ - OutputAudioText.prototype.text = ""; + /** + * Converts this Page to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.Page + * @instance + * @returns {Object.} JSON object + */ + Page.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * OutputAudioText ssml. - * @member {string} ssml - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText - * @instance - */ - OutputAudioText.prototype.ssml = ""; + return Page; + })(); - /** - * OutputAudioText allowPlaybackInterruption. - * @member {boolean} allowPlaybackInterruption - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText - * @instance - */ - OutputAudioText.prototype.allowPlaybackInterruption = false; + v3beta1.Form = (function() { - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Properties of a Form. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @interface IForm + * @property {Array.|null} [parameters] Form parameters + */ - /** - * OutputAudioText source. - * @member {"text"|"ssml"|undefined} source - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText - * @instance - */ - Object.defineProperty(OutputAudioText.prototype, "source", { - get: $util.oneOfGetter($oneOfFields = ["text", "ssml"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Constructs a new Form. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents a Form. + * @implements IForm + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.IForm=} [properties] Properties to set + */ + function Form(properties) { + this.parameters = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Creates a new OutputAudioText instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IOutputAudioText=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText} OutputAudioText instance - */ - OutputAudioText.create = function create(properties) { - return new OutputAudioText(properties); - }; + /** + * Form parameters. + * @member {Array.} parameters + * @memberof google.cloud.dialogflow.cx.v3beta1.Form + * @instance + */ + Form.prototype.parameters = $util.emptyArray; - /** - * Encodes the specified OutputAudioText message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IOutputAudioText} message OutputAudioText message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OutputAudioText.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.text != null && Object.hasOwnProperty.call(message, "text")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.text); - if (message.ssml != null && Object.hasOwnProperty.call(message, "ssml")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.ssml); - if (message.allowPlaybackInterruption != null && Object.hasOwnProperty.call(message, "allowPlaybackInterruption")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.allowPlaybackInterruption); - return writer; - }; + /** + * Creates a new Form instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.Form + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IForm=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.Form} Form instance + */ + Form.create = function create(properties) { + return new Form(properties); + }; - /** - * Encodes the specified OutputAudioText message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IOutputAudioText} message OutputAudioText message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OutputAudioText.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified Form message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Form.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.Form + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IForm} message Form message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Form.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parameters != null && message.parameters.length) + for (var i = 0; i < message.parameters.length; ++i) + $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.encode(message.parameters[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; - /** - * Decodes an OutputAudioText message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText} OutputAudioText - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OutputAudioText.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.text = reader.string(); - break; - case 2: - message.ssml = reader.string(); - break; - case 3: - message.allowPlaybackInterruption = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } + /** + * Encodes the specified Form message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Form.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.Form + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IForm} message Form message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Form.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Form message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.Form + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.Form} Form + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Form.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Form(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.parameters && message.parameters.length)) + message.parameters = []; + message.parameters.push($root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } - return message; - }; + } + return message; + }; - /** - * Decodes an OutputAudioText message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText} OutputAudioText - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OutputAudioText.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a Form message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.Form + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.Form} Form + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Form.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies an OutputAudioText message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OutputAudioText.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.text != null && message.hasOwnProperty("text")) { - properties.source = 1; - if (!$util.isString(message.text)) - return "text: string expected"; + /** + * Verifies a Form message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.Form + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Form.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parameters != null && message.hasOwnProperty("parameters")) { + if (!Array.isArray(message.parameters)) + return "parameters: array expected"; + for (var i = 0; i < message.parameters.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.verify(message.parameters[i]); + if (error) + return "parameters." + error; } - if (message.ssml != null && message.hasOwnProperty("ssml")) { - if (properties.source === 1) - return "source: multiple values"; - properties.source = 1; - if (!$util.isString(message.ssml)) - return "ssml: string expected"; + } + return null; + }; + + /** + * Creates a Form message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.Form + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.Form} Form + */ + Form.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Form) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.Form(); + if (object.parameters) { + if (!Array.isArray(object.parameters)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Form.parameters: array expected"); + message.parameters = []; + for (var i = 0; i < object.parameters.length; ++i) { + if (typeof object.parameters[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Form.parameters: object expected"); + message.parameters[i] = $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.fromObject(object.parameters[i]); } - if (message.allowPlaybackInterruption != null && message.hasOwnProperty("allowPlaybackInterruption")) - if (typeof message.allowPlaybackInterruption !== "boolean") - return "allowPlaybackInterruption: boolean expected"; - return null; - }; + } + return message; + }; + + /** + * Creates a plain object from a Form message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.Form + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Form} message Form + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Form.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.parameters = []; + if (message.parameters && message.parameters.length) { + object.parameters = []; + for (var j = 0; j < message.parameters.length; ++j) + object.parameters[j] = $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.toObject(message.parameters[j], options); + } + return object; + }; + + /** + * Converts this Form to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.Form + * @instance + * @returns {Object.} JSON object + */ + Form.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + Form.Parameter = (function() { /** - * Creates an OutputAudioText message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText} OutputAudioText + * Properties of a Parameter. + * @memberof google.cloud.dialogflow.cx.v3beta1.Form + * @interface IParameter + * @property {string|null} [displayName] Parameter displayName + * @property {boolean|null} [required] Parameter required + * @property {string|null} [entityType] Parameter entityType + * @property {boolean|null} [isList] Parameter isList + * @property {google.cloud.dialogflow.cx.v3beta1.Form.Parameter.IFillBehavior|null} [fillBehavior] Parameter fillBehavior + * @property {google.protobuf.IValue|null} [defaultValue] Parameter defaultValue + * @property {boolean|null} [redact] Parameter redact */ - OutputAudioText.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText(); - if (object.text != null) - message.text = String(object.text); - if (object.ssml != null) - message.ssml = String(object.ssml); - if (object.allowPlaybackInterruption != null) - message.allowPlaybackInterruption = Boolean(object.allowPlaybackInterruption); - return message; - }; /** - * Creates a plain object from an OutputAudioText message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText} message OutputAudioText - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Constructs a new Parameter. + * @memberof google.cloud.dialogflow.cx.v3beta1.Form + * @classdesc Represents a Parameter. + * @implements IParameter + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.Form.IParameter=} [properties] Properties to set */ - OutputAudioText.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.allowPlaybackInterruption = false; - if (message.text != null && message.hasOwnProperty("text")) { - object.text = message.text; - if (options.oneofs) - object.source = "text"; - } - if (message.ssml != null && message.hasOwnProperty("ssml")) { - object.ssml = message.ssml; - if (options.oneofs) - object.source = "ssml"; - } - if (message.allowPlaybackInterruption != null && message.hasOwnProperty("allowPlaybackInterruption")) - object.allowPlaybackInterruption = message.allowPlaybackInterruption; - return object; - }; + function Parameter(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Converts this OutputAudioText to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText + * Parameter displayName. + * @member {string} displayName + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter * @instance - * @returns {Object.} JSON object */ - OutputAudioText.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + Parameter.prototype.displayName = ""; - return OutputAudioText; - })(); + /** + * Parameter required. + * @member {boolean} required + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter + * @instance + */ + Parameter.prototype.required = false; - ResponseMessage.PlayAudio = (function() { + /** + * Parameter entityType. + * @member {string} entityType + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter + * @instance + */ + Parameter.prototype.entityType = ""; /** - * Properties of a PlayAudio. - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage - * @interface IPlayAudio - * @property {string|null} [audioUri] PlayAudio audioUri - * @property {boolean|null} [allowPlaybackInterruption] PlayAudio allowPlaybackInterruption + * Parameter isList. + * @member {boolean} isList + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter + * @instance */ + Parameter.prototype.isList = false; /** - * Constructs a new PlayAudio. - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage - * @classdesc Represents a PlayAudio. - * @implements IPlayAudio - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IPlayAudio=} [properties] Properties to set + * Parameter fillBehavior. + * @member {google.cloud.dialogflow.cx.v3beta1.Form.Parameter.IFillBehavior|null|undefined} fillBehavior + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter + * @instance */ - function PlayAudio(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + Parameter.prototype.fillBehavior = null; /** - * PlayAudio audioUri. - * @member {string} audioUri - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio + * Parameter defaultValue. + * @member {google.protobuf.IValue|null|undefined} defaultValue + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter * @instance */ - PlayAudio.prototype.audioUri = ""; + Parameter.prototype.defaultValue = null; /** - * PlayAudio allowPlaybackInterruption. - * @member {boolean} allowPlaybackInterruption - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio + * Parameter redact. + * @member {boolean} redact + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter * @instance */ - PlayAudio.prototype.allowPlaybackInterruption = false; + Parameter.prototype.redact = false; /** - * Creates a new PlayAudio instance using the specified properties. + * Creates a new Parameter instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IPlayAudio=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio} PlayAudio instance + * @param {google.cloud.dialogflow.cx.v3beta1.Form.IParameter=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.Form.Parameter} Parameter instance */ - PlayAudio.create = function create(properties) { - return new PlayAudio(properties); + Parameter.create = function create(properties) { + return new Parameter(properties); }; /** - * Encodes the specified PlayAudio message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio.verify|verify} messages. + * Encodes the specified Parameter message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Form.Parameter.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IPlayAudio} message PlayAudio message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.Form.IParameter} message Parameter message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PlayAudio.encode = function encode(message, writer) { + Parameter.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.audioUri != null && Object.hasOwnProperty.call(message, "audioUri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.audioUri); - if (message.allowPlaybackInterruption != null && Object.hasOwnProperty.call(message, "allowPlaybackInterruption")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowPlaybackInterruption); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.required != null && Object.hasOwnProperty.call(message, "required")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.required); + if (message.entityType != null && Object.hasOwnProperty.call(message, "entityType")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.entityType); + if (message.isList != null && Object.hasOwnProperty.call(message, "isList")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.isList); + if (message.fillBehavior != null && Object.hasOwnProperty.call(message, "fillBehavior")) + $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.encode(message.fillBehavior, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) + $root.google.protobuf.Value.encode(message.defaultValue, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.redact != null && Object.hasOwnProperty.call(message, "redact")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.redact); return writer; }; /** - * Encodes the specified PlayAudio message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio.verify|verify} messages. + * Encodes the specified Parameter message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Form.Parameter.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IPlayAudio} message PlayAudio message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.Form.IParameter} message Parameter message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PlayAudio.encodeDelimited = function encodeDelimited(message, writer) { + Parameter.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PlayAudio message from the specified reader or buffer. + * Decodes a Parameter message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio} PlayAudio + * @returns {google.cloud.dialogflow.cx.v3beta1.Form.Parameter} Parameter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PlayAudio.decode = function decode(reader, length) { + Parameter.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.audioUri = reader.string(); + message.displayName = reader.string(); break; case 2: - message.allowPlaybackInterruption = reader.bool(); + message.required = reader.bool(); + break; + case 3: + message.entityType = reader.string(); + break; + case 4: + message.isList = reader.bool(); + break; + case 7: + message.fillBehavior = $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.decode(reader, reader.uint32()); + break; + case 9: + message.defaultValue = $root.google.protobuf.Value.decode(reader, reader.uint32()); + break; + case 11: + message.redact = reader.bool(); break; default: reader.skipType(tag & 7); @@ -50773,323 +50170,165 @@ }; /** - * Decodes a PlayAudio message from the specified reader or buffer, length delimited. + * Decodes a Parameter message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio} PlayAudio + * @returns {google.cloud.dialogflow.cx.v3beta1.Form.Parameter} Parameter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PlayAudio.decodeDelimited = function decodeDelimited(reader) { + Parameter.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PlayAudio message. + * Verifies a Parameter message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PlayAudio.verify = function verify(message) { + Parameter.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.audioUri != null && message.hasOwnProperty("audioUri")) - if (!$util.isString(message.audioUri)) - return "audioUri: string expected"; - if (message.allowPlaybackInterruption != null && message.hasOwnProperty("allowPlaybackInterruption")) - if (typeof message.allowPlaybackInterruption !== "boolean") - return "allowPlaybackInterruption: boolean expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.required != null && message.hasOwnProperty("required")) + if (typeof message.required !== "boolean") + return "required: boolean expected"; + if (message.entityType != null && message.hasOwnProperty("entityType")) + if (!$util.isString(message.entityType)) + return "entityType: string expected"; + if (message.isList != null && message.hasOwnProperty("isList")) + if (typeof message.isList !== "boolean") + return "isList: boolean expected"; + if (message.fillBehavior != null && message.hasOwnProperty("fillBehavior")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.verify(message.fillBehavior); + if (error) + return "fillBehavior." + error; + } + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) { + var error = $root.google.protobuf.Value.verify(message.defaultValue); + if (error) + return "defaultValue." + error; + } + if (message.redact != null && message.hasOwnProperty("redact")) + if (typeof message.redact !== "boolean") + return "redact: boolean expected"; return null; }; /** - * Creates a PlayAudio message from a plain object. Also converts values to their respective internal types. + * Creates a Parameter message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio} PlayAudio + * @returns {google.cloud.dialogflow.cx.v3beta1.Form.Parameter} Parameter */ - PlayAudio.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio) + Parameter.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio(); - if (object.audioUri != null) - message.audioUri = String(object.audioUri); - if (object.allowPlaybackInterruption != null) - message.allowPlaybackInterruption = Boolean(object.allowPlaybackInterruption); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.required != null) + message.required = Boolean(object.required); + if (object.entityType != null) + message.entityType = String(object.entityType); + if (object.isList != null) + message.isList = Boolean(object.isList); + if (object.fillBehavior != null) { + if (typeof object.fillBehavior !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Form.Parameter.fillBehavior: object expected"); + message.fillBehavior = $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.fromObject(object.fillBehavior); + } + if (object.defaultValue != null) { + if (typeof object.defaultValue !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Form.Parameter.defaultValue: object expected"); + message.defaultValue = $root.google.protobuf.Value.fromObject(object.defaultValue); + } + if (object.redact != null) + message.redact = Boolean(object.redact); return message; }; /** - * Creates a plain object from a PlayAudio message. Also converts values to other types if specified. + * Creates a plain object from a Parameter message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio} message PlayAudio + * @param {google.cloud.dialogflow.cx.v3beta1.Form.Parameter} message Parameter * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PlayAudio.toObject = function toObject(message, options) { + Parameter.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.audioUri = ""; - object.allowPlaybackInterruption = false; - } - if (message.audioUri != null && message.hasOwnProperty("audioUri")) - object.audioUri = message.audioUri; - if (message.allowPlaybackInterruption != null && message.hasOwnProperty("allowPlaybackInterruption")) - object.allowPlaybackInterruption = message.allowPlaybackInterruption; - return object; - }; - - /** - * Converts this PlayAudio to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio - * @instance - * @returns {Object.} JSON object - */ - PlayAudio.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return PlayAudio; - })(); - - ResponseMessage.MixedAudio = (function() { - - /** - * Properties of a MixedAudio. - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage - * @interface IMixedAudio - * @property {Array.|null} [segments] MixedAudio segments - */ - - /** - * Constructs a new MixedAudio. - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage - * @classdesc Represents a MixedAudio. - * @implements IMixedAudio - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IMixedAudio=} [properties] Properties to set - */ - function MixedAudio(properties) { - this.segments = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MixedAudio segments. - * @member {Array.} segments - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio - * @instance - */ - MixedAudio.prototype.segments = $util.emptyArray; - - /** - * Creates a new MixedAudio instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IMixedAudio=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio} MixedAudio instance - */ - MixedAudio.create = function create(properties) { - return new MixedAudio(properties); - }; - - /** - * Encodes the specified MixedAudio message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IMixedAudio} message MixedAudio message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MixedAudio.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.segments != null && message.segments.length) - for (var i = 0; i < message.segments.length; ++i) - $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment.encode(message.segments[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MixedAudio message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IMixedAudio} message MixedAudio message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MixedAudio.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MixedAudio message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio} MixedAudio - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MixedAudio.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.segments && message.segments.length)) - message.segments = []; - message.segments.push($root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MixedAudio message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio} MixedAudio - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MixedAudio.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MixedAudio message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MixedAudio.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.segments != null && message.hasOwnProperty("segments")) { - if (!Array.isArray(message.segments)) - return "segments: array expected"; - for (var i = 0; i < message.segments.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment.verify(message.segments[i]); - if (error) - return "segments." + error; - } - } - return null; - }; - - /** - * Creates a MixedAudio message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio} MixedAudio - */ - MixedAudio.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio(); - if (object.segments) { - if (!Array.isArray(object.segments)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.segments: array expected"); - message.segments = []; - for (var i = 0; i < object.segments.length; ++i) { - if (typeof object.segments[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.segments: object expected"); - message.segments[i] = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment.fromObject(object.segments[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a MixedAudio message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio} message MixedAudio - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MixedAudio.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.segments = []; - if (message.segments && message.segments.length) { - object.segments = []; - for (var j = 0; j < message.segments.length; ++j) - object.segments[j] = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment.toObject(message.segments[j], options); + object.displayName = ""; + object.required = false; + object.entityType = ""; + object.isList = false; + object.fillBehavior = null; + object.defaultValue = null; + object.redact = false; } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.required != null && message.hasOwnProperty("required")) + object.required = message.required; + if (message.entityType != null && message.hasOwnProperty("entityType")) + object.entityType = message.entityType; + if (message.isList != null && message.hasOwnProperty("isList")) + object.isList = message.isList; + if (message.fillBehavior != null && message.hasOwnProperty("fillBehavior")) + object.fillBehavior = $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.toObject(message.fillBehavior, options); + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + object.defaultValue = $root.google.protobuf.Value.toObject(message.defaultValue, options); + if (message.redact != null && message.hasOwnProperty("redact")) + object.redact = message.redact; return object; }; /** - * Converts this MixedAudio to JSON. + * Converts this Parameter to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter * @instance * @returns {Object.} JSON object */ - MixedAudio.prototype.toJSON = function toJSON() { + Parameter.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - MixedAudio.Segment = (function() { + Parameter.FillBehavior = (function() { /** - * Properties of a Segment. - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio - * @interface ISegment - * @property {Uint8Array|null} [audio] Segment audio - * @property {string|null} [uri] Segment uri - * @property {boolean|null} [allowPlaybackInterruption] Segment allowPlaybackInterruption + * Properties of a FillBehavior. + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter + * @interface IFillBehavior + * @property {google.cloud.dialogflow.cx.v3beta1.IFulfillment|null} [initialPromptFulfillment] FillBehavior initialPromptFulfillment + * @property {Array.|null} [repromptEventHandlers] FillBehavior repromptEventHandlers */ /** - * Constructs a new Segment. - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio - * @classdesc Represents a Segment. - * @implements ISegment + * Constructs a new FillBehavior. + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter + * @classdesc Represents a FillBehavior. + * @implements IFillBehavior * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.ISegment=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.Form.Parameter.IFillBehavior=} [properties] Properties to set */ - function Segment(properties) { + function FillBehavior(properties) { + this.repromptEventHandlers = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -51097,115 +50336,91 @@ } /** - * Segment audio. - * @member {Uint8Array} audio - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment - * @instance - */ - Segment.prototype.audio = $util.newBuffer([]); - - /** - * Segment uri. - * @member {string} uri - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment - * @instance - */ - Segment.prototype.uri = ""; - - /** - * Segment allowPlaybackInterruption. - * @member {boolean} allowPlaybackInterruption - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment + * FillBehavior initialPromptFulfillment. + * @member {google.cloud.dialogflow.cx.v3beta1.IFulfillment|null|undefined} initialPromptFulfillment + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior * @instance */ - Segment.prototype.allowPlaybackInterruption = false; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + FillBehavior.prototype.initialPromptFulfillment = null; /** - * Segment content. - * @member {"audio"|"uri"|undefined} content - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment + * FillBehavior repromptEventHandlers. + * @member {Array.} repromptEventHandlers + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior * @instance */ - Object.defineProperty(Segment.prototype, "content", { - get: $util.oneOfGetter($oneOfFields = ["audio", "uri"]), - set: $util.oneOfSetter($oneOfFields) - }); + FillBehavior.prototype.repromptEventHandlers = $util.emptyArray; /** - * Creates a new Segment instance using the specified properties. + * Creates a new FillBehavior instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.ISegment=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment} Segment instance + * @param {google.cloud.dialogflow.cx.v3beta1.Form.Parameter.IFillBehavior=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior} FillBehavior instance */ - Segment.create = function create(properties) { - return new Segment(properties); + FillBehavior.create = function create(properties) { + return new FillBehavior(properties); }; /** - * Encodes the specified Segment message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment.verify|verify} messages. + * Encodes the specified FillBehavior message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.ISegment} message Segment message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.Form.Parameter.IFillBehavior} message FillBehavior message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Segment.encode = function encode(message, writer) { + FillBehavior.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.audio != null && Object.hasOwnProperty.call(message, "audio")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.audio); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); - if (message.allowPlaybackInterruption != null && Object.hasOwnProperty.call(message, "allowPlaybackInterruption")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.allowPlaybackInterruption); + if (message.initialPromptFulfillment != null && Object.hasOwnProperty.call(message, "initialPromptFulfillment")) + $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.encode(message.initialPromptFulfillment, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.repromptEventHandlers != null && message.repromptEventHandlers.length) + for (var i = 0; i < message.repromptEventHandlers.length; ++i) + $root.google.cloud.dialogflow.cx.v3beta1.EventHandler.encode(message.repromptEventHandlers[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; /** - * Encodes the specified Segment message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment.verify|verify} messages. + * Encodes the specified FillBehavior message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.ISegment} message Segment message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.Form.Parameter.IFillBehavior} message FillBehavior message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Segment.encodeDelimited = function encodeDelimited(message, writer) { + FillBehavior.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Segment message from the specified reader or buffer. + * Decodes a FillBehavior message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment} Segment + * @returns {google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior} FillBehavior * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Segment.decode = function decode(reader, length) { + FillBehavior.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.audio = reader.bytes(); - break; - case 2: - message.uri = reader.string(); - break; case 3: - message.allowPlaybackInterruption = reader.bool(); + message.initialPromptFulfillment = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.decode(reader, reader.uint32()); + break; + case 5: + if (!(message.repromptEventHandlers && message.repromptEventHandlers.length)) + message.repromptEventHandlers = []; + message.repromptEventHandlers.push($root.google.cloud.dialogflow.cx.v3beta1.EventHandler.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -51216,503 +50431,8735 @@ }; /** - * Decodes a Segment message from the specified reader or buffer, length delimited. + * Decodes a FillBehavior message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment} Segment + * @returns {google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior} FillBehavior * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Segment.decodeDelimited = function decodeDelimited(reader) { + FillBehavior.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Segment message. + * Verifies a FillBehavior message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Segment.verify = function verify(message) { + FillBehavior.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.audio != null && message.hasOwnProperty("audio")) { - properties.content = 1; - if (!(message.audio && typeof message.audio.length === "number" || $util.isString(message.audio))) - return "audio: buffer expected"; + if (message.initialPromptFulfillment != null && message.hasOwnProperty("initialPromptFulfillment")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.verify(message.initialPromptFulfillment); + if (error) + return "initialPromptFulfillment." + error; } - if (message.uri != null && message.hasOwnProperty("uri")) { - if (properties.content === 1) - return "content: multiple values"; - properties.content = 1; - if (!$util.isString(message.uri)) - return "uri: string expected"; + if (message.repromptEventHandlers != null && message.hasOwnProperty("repromptEventHandlers")) { + if (!Array.isArray(message.repromptEventHandlers)) + return "repromptEventHandlers: array expected"; + for (var i = 0; i < message.repromptEventHandlers.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.EventHandler.verify(message.repromptEventHandlers[i]); + if (error) + return "repromptEventHandlers." + error; + } } - if (message.allowPlaybackInterruption != null && message.hasOwnProperty("allowPlaybackInterruption")) - if (typeof message.allowPlaybackInterruption !== "boolean") - return "allowPlaybackInterruption: boolean expected"; return null; }; /** - * Creates a Segment message from a plain object. Also converts values to their respective internal types. + * Creates a FillBehavior message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment} Segment + * @returns {google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior} FillBehavior */ - Segment.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment) + FillBehavior.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment(); - if (object.audio != null) - if (typeof object.audio === "string") - $util.base64.decode(object.audio, message.audio = $util.newBuffer($util.base64.length(object.audio)), 0); - else if (object.audio.length) - message.audio = object.audio; - if (object.uri != null) - message.uri = String(object.uri); - if (object.allowPlaybackInterruption != null) - message.allowPlaybackInterruption = Boolean(object.allowPlaybackInterruption); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior(); + if (object.initialPromptFulfillment != null) { + if (typeof object.initialPromptFulfillment !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.initialPromptFulfillment: object expected"); + message.initialPromptFulfillment = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.fromObject(object.initialPromptFulfillment); + } + if (object.repromptEventHandlers) { + if (!Array.isArray(object.repromptEventHandlers)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.repromptEventHandlers: array expected"); + message.repromptEventHandlers = []; + for (var i = 0; i < object.repromptEventHandlers.length; ++i) { + if (typeof object.repromptEventHandlers[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.repromptEventHandlers: object expected"); + message.repromptEventHandlers[i] = $root.google.cloud.dialogflow.cx.v3beta1.EventHandler.fromObject(object.repromptEventHandlers[i]); + } + } return message; }; /** - * Creates a plain object from a Segment message. Also converts values to other types if specified. + * Creates a plain object from a FillBehavior message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment} message Segment + * @param {google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior} message FillBehavior * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Segment.toObject = function toObject(message, options) { + FillBehavior.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.repromptEventHandlers = []; if (options.defaults) - object.allowPlaybackInterruption = false; - if (message.audio != null && message.hasOwnProperty("audio")) { - object.audio = options.bytes === String ? $util.base64.encode(message.audio, 0, message.audio.length) : options.bytes === Array ? Array.prototype.slice.call(message.audio) : message.audio; - if (options.oneofs) - object.content = "audio"; - } - if (message.uri != null && message.hasOwnProperty("uri")) { - object.uri = message.uri; - if (options.oneofs) - object.content = "uri"; + object.initialPromptFulfillment = null; + if (message.initialPromptFulfillment != null && message.hasOwnProperty("initialPromptFulfillment")) + object.initialPromptFulfillment = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.toObject(message.initialPromptFulfillment, options); + if (message.repromptEventHandlers && message.repromptEventHandlers.length) { + object.repromptEventHandlers = []; + for (var j = 0; j < message.repromptEventHandlers.length; ++j) + object.repromptEventHandlers[j] = $root.google.cloud.dialogflow.cx.v3beta1.EventHandler.toObject(message.repromptEventHandlers[j], options); } - if (message.allowPlaybackInterruption != null && message.hasOwnProperty("allowPlaybackInterruption")) - object.allowPlaybackInterruption = message.allowPlaybackInterruption; return object; }; /** - * Converts this Segment to JSON. + * Converts this FillBehavior to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior * @instance * @returns {Object.} JSON object */ - Segment.prototype.toJSON = function toJSON() { + FillBehavior.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Segment; + return FillBehavior; })(); - return MixedAudio; + return Parameter; })(); - ResponseMessage.EndInteraction = (function() { + return Form; + })(); - /** - * Properties of an EndInteraction. - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage - * @interface IEndInteraction - */ + v3beta1.EventHandler = (function() { - /** - * Constructs a new EndInteraction. - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage - * @classdesc Represents an EndInteraction. - * @implements IEndInteraction - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IEndInteraction=} [properties] Properties to set - */ - function EndInteraction(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of an EventHandler. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @interface IEventHandler + * @property {string|null} [name] EventHandler name + * @property {string|null} [event] EventHandler event + * @property {google.cloud.dialogflow.cx.v3beta1.IFulfillment|null} [triggerFulfillment] EventHandler triggerFulfillment + * @property {string|null} [targetPage] EventHandler targetPage + * @property {string|null} [targetFlow] EventHandler targetFlow + */ - /** + /** + * Constructs a new EventHandler. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents an EventHandler. + * @implements IEventHandler + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.IEventHandler=} [properties] Properties to set + */ + function EventHandler(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EventHandler name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler + * @instance + */ + EventHandler.prototype.name = ""; + + /** + * EventHandler event. + * @member {string} event + * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler + * @instance + */ + EventHandler.prototype.event = ""; + + /** + * EventHandler triggerFulfillment. + * @member {google.cloud.dialogflow.cx.v3beta1.IFulfillment|null|undefined} triggerFulfillment + * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler + * @instance + */ + EventHandler.prototype.triggerFulfillment = null; + + /** + * EventHandler targetPage. + * @member {string} targetPage + * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler + * @instance + */ + EventHandler.prototype.targetPage = ""; + + /** + * EventHandler targetFlow. + * @member {string} targetFlow + * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler + * @instance + */ + EventHandler.prototype.targetFlow = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * EventHandler target. + * @member {"targetPage"|"targetFlow"|undefined} target + * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler + * @instance + */ + Object.defineProperty(EventHandler.prototype, "target", { + get: $util.oneOfGetter($oneOfFields = ["targetPage", "targetFlow"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new EventHandler instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IEventHandler=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.EventHandler} EventHandler instance + */ + EventHandler.create = function create(properties) { + return new EventHandler(properties); + }; + + /** + * Encodes the specified EventHandler message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.EventHandler.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IEventHandler} message EventHandler message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EventHandler.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.targetPage != null && Object.hasOwnProperty.call(message, "targetPage")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.targetPage); + if (message.targetFlow != null && Object.hasOwnProperty.call(message, "targetFlow")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.targetFlow); + if (message.event != null && Object.hasOwnProperty.call(message, "event")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.event); + if (message.triggerFulfillment != null && Object.hasOwnProperty.call(message, "triggerFulfillment")) + $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.encode(message.triggerFulfillment, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); + return writer; + }; + + /** + * Encodes the specified EventHandler message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.EventHandler.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IEventHandler} message EventHandler message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EventHandler.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EventHandler message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.EventHandler} EventHandler + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EventHandler.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.EventHandler(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 6: + message.name = reader.string(); + break; + case 4: + message.event = reader.string(); + break; + case 5: + message.triggerFulfillment = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.decode(reader, reader.uint32()); + break; + case 2: + message.targetPage = reader.string(); + break; + case 3: + message.targetFlow = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EventHandler message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.EventHandler} EventHandler + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EventHandler.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EventHandler message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EventHandler.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.event != null && message.hasOwnProperty("event")) + if (!$util.isString(message.event)) + return "event: string expected"; + if (message.triggerFulfillment != null && message.hasOwnProperty("triggerFulfillment")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.verify(message.triggerFulfillment); + if (error) + return "triggerFulfillment." + error; + } + if (message.targetPage != null && message.hasOwnProperty("targetPage")) { + properties.target = 1; + if (!$util.isString(message.targetPage)) + return "targetPage: string expected"; + } + if (message.targetFlow != null && message.hasOwnProperty("targetFlow")) { + if (properties.target === 1) + return "target: multiple values"; + properties.target = 1; + if (!$util.isString(message.targetFlow)) + return "targetFlow: string expected"; + } + return null; + }; + + /** + * Creates an EventHandler message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.EventHandler} EventHandler + */ + EventHandler.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.EventHandler) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.EventHandler(); + if (object.name != null) + message.name = String(object.name); + if (object.event != null) + message.event = String(object.event); + if (object.triggerFulfillment != null) { + if (typeof object.triggerFulfillment !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.EventHandler.triggerFulfillment: object expected"); + message.triggerFulfillment = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.fromObject(object.triggerFulfillment); + } + if (object.targetPage != null) + message.targetPage = String(object.targetPage); + if (object.targetFlow != null) + message.targetFlow = String(object.targetFlow); + return message; + }; + + /** + * Creates a plain object from an EventHandler message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.EventHandler} message EventHandler + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EventHandler.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.event = ""; + object.triggerFulfillment = null; + object.name = ""; + } + if (message.targetPage != null && message.hasOwnProperty("targetPage")) { + object.targetPage = message.targetPage; + if (options.oneofs) + object.target = "targetPage"; + } + if (message.targetFlow != null && message.hasOwnProperty("targetFlow")) { + object.targetFlow = message.targetFlow; + if (options.oneofs) + object.target = "targetFlow"; + } + if (message.event != null && message.hasOwnProperty("event")) + object.event = message.event; + if (message.triggerFulfillment != null && message.hasOwnProperty("triggerFulfillment")) + object.triggerFulfillment = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.toObject(message.triggerFulfillment, options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this EventHandler to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler + * @instance + * @returns {Object.} JSON object + */ + EventHandler.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EventHandler; + })(); + + v3beta1.TransitionRoute = (function() { + + /** + * Properties of a TransitionRoute. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @interface ITransitionRoute + * @property {string|null} [name] TransitionRoute name + * @property {string|null} [intent] TransitionRoute intent + * @property {string|null} [condition] TransitionRoute condition + * @property {google.cloud.dialogflow.cx.v3beta1.IFulfillment|null} [triggerFulfillment] TransitionRoute triggerFulfillment + * @property {string|null} [targetPage] TransitionRoute targetPage + * @property {string|null} [targetFlow] TransitionRoute targetFlow + */ + + /** + * Constructs a new TransitionRoute. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents a TransitionRoute. + * @implements ITransitionRoute + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.ITransitionRoute=} [properties] Properties to set + */ + function TransitionRoute(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TransitionRoute name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute + * @instance + */ + TransitionRoute.prototype.name = ""; + + /** + * TransitionRoute intent. + * @member {string} intent + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute + * @instance + */ + TransitionRoute.prototype.intent = ""; + + /** + * TransitionRoute condition. + * @member {string} condition + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute + * @instance + */ + TransitionRoute.prototype.condition = ""; + + /** + * TransitionRoute triggerFulfillment. + * @member {google.cloud.dialogflow.cx.v3beta1.IFulfillment|null|undefined} triggerFulfillment + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute + * @instance + */ + TransitionRoute.prototype.triggerFulfillment = null; + + /** + * TransitionRoute targetPage. + * @member {string} targetPage + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute + * @instance + */ + TransitionRoute.prototype.targetPage = ""; + + /** + * TransitionRoute targetFlow. + * @member {string} targetFlow + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute + * @instance + */ + TransitionRoute.prototype.targetFlow = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * TransitionRoute target. + * @member {"targetPage"|"targetFlow"|undefined} target + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute + * @instance + */ + Object.defineProperty(TransitionRoute.prototype, "target", { + get: $util.oneOfGetter($oneOfFields = ["targetPage", "targetFlow"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new TransitionRoute instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ITransitionRoute=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.TransitionRoute} TransitionRoute instance + */ + TransitionRoute.create = function create(properties) { + return new TransitionRoute(properties); + }; + + /** + * Encodes the specified TransitionRoute message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TransitionRoute.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ITransitionRoute} message TransitionRoute message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TransitionRoute.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.intent != null && Object.hasOwnProperty.call(message, "intent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.intent); + if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.condition); + if (message.triggerFulfillment != null && Object.hasOwnProperty.call(message, "triggerFulfillment")) + $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.encode(message.triggerFulfillment, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.targetPage != null && Object.hasOwnProperty.call(message, "targetPage")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.targetPage); + if (message.targetFlow != null && Object.hasOwnProperty.call(message, "targetFlow")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.targetFlow); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); + return writer; + }; + + /** + * Encodes the specified TransitionRoute message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TransitionRoute.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ITransitionRoute} message TransitionRoute message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TransitionRoute.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TransitionRoute message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.TransitionRoute} TransitionRoute + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TransitionRoute.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 6: + message.name = reader.string(); + break; + case 1: + message.intent = reader.string(); + break; + case 2: + message.condition = reader.string(); + break; + case 3: + message.triggerFulfillment = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.decode(reader, reader.uint32()); + break; + case 4: + message.targetPage = reader.string(); + break; + case 5: + message.targetFlow = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TransitionRoute message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.TransitionRoute} TransitionRoute + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TransitionRoute.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TransitionRoute message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TransitionRoute.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.intent != null && message.hasOwnProperty("intent")) + if (!$util.isString(message.intent)) + return "intent: string expected"; + if (message.condition != null && message.hasOwnProperty("condition")) + if (!$util.isString(message.condition)) + return "condition: string expected"; + if (message.triggerFulfillment != null && message.hasOwnProperty("triggerFulfillment")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.verify(message.triggerFulfillment); + if (error) + return "triggerFulfillment." + error; + } + if (message.targetPage != null && message.hasOwnProperty("targetPage")) { + properties.target = 1; + if (!$util.isString(message.targetPage)) + return "targetPage: string expected"; + } + if (message.targetFlow != null && message.hasOwnProperty("targetFlow")) { + if (properties.target === 1) + return "target: multiple values"; + properties.target = 1; + if (!$util.isString(message.targetFlow)) + return "targetFlow: string expected"; + } + return null; + }; + + /** + * Creates a TransitionRoute message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.TransitionRoute} TransitionRoute + */ + TransitionRoute.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute(); + if (object.name != null) + message.name = String(object.name); + if (object.intent != null) + message.intent = String(object.intent); + if (object.condition != null) + message.condition = String(object.condition); + if (object.triggerFulfillment != null) { + if (typeof object.triggerFulfillment !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.TransitionRoute.triggerFulfillment: object expected"); + message.triggerFulfillment = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.fromObject(object.triggerFulfillment); + } + if (object.targetPage != null) + message.targetPage = String(object.targetPage); + if (object.targetFlow != null) + message.targetFlow = String(object.targetFlow); + return message; + }; + + /** + * Creates a plain object from a TransitionRoute message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.TransitionRoute} message TransitionRoute + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TransitionRoute.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.intent = ""; + object.condition = ""; + object.triggerFulfillment = null; + object.name = ""; + } + if (message.intent != null && message.hasOwnProperty("intent")) + object.intent = message.intent; + if (message.condition != null && message.hasOwnProperty("condition")) + object.condition = message.condition; + if (message.triggerFulfillment != null && message.hasOwnProperty("triggerFulfillment")) + object.triggerFulfillment = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.toObject(message.triggerFulfillment, options); + if (message.targetPage != null && message.hasOwnProperty("targetPage")) { + object.targetPage = message.targetPage; + if (options.oneofs) + object.target = "targetPage"; + } + if (message.targetFlow != null && message.hasOwnProperty("targetFlow")) { + object.targetFlow = message.targetFlow; + if (options.oneofs) + object.target = "targetFlow"; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this TransitionRoute to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute + * @instance + * @returns {Object.} JSON object + */ + TransitionRoute.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TransitionRoute; + })(); + + v3beta1.ListPagesRequest = (function() { + + /** + * Properties of a ListPagesRequest. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @interface IListPagesRequest + * @property {string|null} [parent] ListPagesRequest parent + * @property {string|null} [languageCode] ListPagesRequest languageCode + * @property {number|null} [pageSize] ListPagesRequest pageSize + * @property {string|null} [pageToken] ListPagesRequest pageToken + */ + + /** + * Constructs a new ListPagesRequest. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents a ListPagesRequest. + * @implements IListPagesRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.IListPagesRequest=} [properties] Properties to set + */ + function ListPagesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListPagesRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesRequest + * @instance + */ + ListPagesRequest.prototype.parent = ""; + + /** + * ListPagesRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesRequest + * @instance + */ + ListPagesRequest.prototype.languageCode = ""; + + /** + * ListPagesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesRequest + * @instance + */ + ListPagesRequest.prototype.pageSize = 0; + + /** + * ListPagesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesRequest + * @instance + */ + ListPagesRequest.prototype.pageToken = ""; + + /** + * Creates a new ListPagesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IListPagesRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ListPagesRequest} ListPagesRequest instance + */ + ListPagesRequest.create = function create(properties) { + return new ListPagesRequest(properties); + }; + + /** + * Encodes the specified ListPagesRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListPagesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IListPagesRequest} message ListPagesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPagesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListPagesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListPagesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IListPagesRequest} message ListPagesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPagesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListPagesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.ListPagesRequest} ListPagesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPagesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ListPagesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.languageCode = reader.string(); + break; + case 3: + message.pageSize = reader.int32(); + break; + case 4: + message.pageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListPagesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.ListPagesRequest} ListPagesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPagesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListPagesRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListPagesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListPagesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.ListPagesRequest} ListPagesRequest + */ + ListPagesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ListPagesRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.ListPagesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.languageCode != null) + message.languageCode = String(object.languageCode); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListPagesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ListPagesRequest} message ListPagesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListPagesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.languageCode = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListPagesRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesRequest + * @instance + * @returns {Object.} JSON object + */ + ListPagesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListPagesRequest; + })(); + + v3beta1.ListPagesResponse = (function() { + + /** + * Properties of a ListPagesResponse. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @interface IListPagesResponse + * @property {Array.|null} [pages] ListPagesResponse pages + * @property {string|null} [nextPageToken] ListPagesResponse nextPageToken + */ + + /** + * Constructs a new ListPagesResponse. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents a ListPagesResponse. + * @implements IListPagesResponse + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.IListPagesResponse=} [properties] Properties to set + */ + function ListPagesResponse(properties) { + this.pages = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListPagesResponse pages. + * @member {Array.} pages + * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesResponse + * @instance + */ + ListPagesResponse.prototype.pages = $util.emptyArray; + + /** + * ListPagesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesResponse + * @instance + */ + ListPagesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListPagesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesResponse + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IListPagesResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ListPagesResponse} ListPagesResponse instance + */ + ListPagesResponse.create = function create(properties) { + return new ListPagesResponse(properties); + }; + + /** + * Encodes the specified ListPagesResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListPagesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesResponse + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IListPagesResponse} message ListPagesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPagesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pages != null && message.pages.length) + for (var i = 0; i < message.pages.length; ++i) + $root.google.cloud.dialogflow.cx.v3beta1.Page.encode(message.pages[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListPagesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListPagesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesResponse + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IListPagesResponse} message ListPagesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPagesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListPagesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.ListPagesResponse} ListPagesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPagesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ListPagesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.pages && message.pages.length)) + message.pages = []; + message.pages.push($root.google.cloud.dialogflow.cx.v3beta1.Page.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListPagesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.ListPagesResponse} ListPagesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPagesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListPagesResponse message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListPagesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.pages != null && message.hasOwnProperty("pages")) { + if (!Array.isArray(message.pages)) + return "pages: array expected"; + for (var i = 0; i < message.pages.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.Page.verify(message.pages[i]); + if (error) + return "pages." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListPagesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.ListPagesResponse} ListPagesResponse + */ + ListPagesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ListPagesResponse) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.ListPagesResponse(); + if (object.pages) { + if (!Array.isArray(object.pages)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ListPagesResponse.pages: array expected"); + message.pages = []; + for (var i = 0; i < object.pages.length; ++i) { + if (typeof object.pages[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ListPagesResponse.pages: object expected"); + message.pages[i] = $root.google.cloud.dialogflow.cx.v3beta1.Page.fromObject(object.pages[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListPagesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesResponse + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ListPagesResponse} message ListPagesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListPagesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.pages = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.pages && message.pages.length) { + object.pages = []; + for (var j = 0; j < message.pages.length; ++j) + object.pages[j] = $root.google.cloud.dialogflow.cx.v3beta1.Page.toObject(message.pages[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListPagesResponse to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesResponse + * @instance + * @returns {Object.} JSON object + */ + ListPagesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListPagesResponse; + })(); + + v3beta1.GetPageRequest = (function() { + + /** + * Properties of a GetPageRequest. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @interface IGetPageRequest + * @property {string|null} [name] GetPageRequest name + * @property {string|null} [languageCode] GetPageRequest languageCode + */ + + /** + * Constructs a new GetPageRequest. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents a GetPageRequest. + * @implements IGetPageRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.IGetPageRequest=} [properties] Properties to set + */ + function GetPageRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetPageRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3beta1.GetPageRequest + * @instance + */ + GetPageRequest.prototype.name = ""; + + /** + * GetPageRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3beta1.GetPageRequest + * @instance + */ + GetPageRequest.prototype.languageCode = ""; + + /** + * Creates a new GetPageRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.GetPageRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IGetPageRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.GetPageRequest} GetPageRequest instance + */ + GetPageRequest.create = function create(properties) { + return new GetPageRequest(properties); + }; + + /** + * Encodes the specified GetPageRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetPageRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.GetPageRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IGetPageRequest} message GetPageRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetPageRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); + return writer; + }; + + /** + * Encodes the specified GetPageRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetPageRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.GetPageRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IGetPageRequest} message GetPageRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetPageRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetPageRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.GetPageRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.GetPageRequest} GetPageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetPageRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.GetPageRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.languageCode = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetPageRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.GetPageRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.GetPageRequest} GetPageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetPageRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetPageRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.GetPageRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetPageRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; + return null; + }; + + /** + * Creates a GetPageRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.GetPageRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.GetPageRequest} GetPageRequest + */ + GetPageRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.GetPageRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.GetPageRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.languageCode != null) + message.languageCode = String(object.languageCode); + return message; + }; + + /** + * Creates a plain object from a GetPageRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.GetPageRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.GetPageRequest} message GetPageRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetPageRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.languageCode = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; + return object; + }; + + /** + * Converts this GetPageRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.GetPageRequest + * @instance + * @returns {Object.} JSON object + */ + GetPageRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetPageRequest; + })(); + + v3beta1.CreatePageRequest = (function() { + + /** + * Properties of a CreatePageRequest. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @interface ICreatePageRequest + * @property {string|null} [parent] CreatePageRequest parent + * @property {google.cloud.dialogflow.cx.v3beta1.IPage|null} [page] CreatePageRequest page + * @property {string|null} [languageCode] CreatePageRequest languageCode + */ + + /** + * Constructs a new CreatePageRequest. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents a CreatePageRequest. + * @implements ICreatePageRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.ICreatePageRequest=} [properties] Properties to set + */ + function CreatePageRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreatePageRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3beta1.CreatePageRequest + * @instance + */ + CreatePageRequest.prototype.parent = ""; + + /** + * CreatePageRequest page. + * @member {google.cloud.dialogflow.cx.v3beta1.IPage|null|undefined} page + * @memberof google.cloud.dialogflow.cx.v3beta1.CreatePageRequest + * @instance + */ + CreatePageRequest.prototype.page = null; + + /** + * CreatePageRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3beta1.CreatePageRequest + * @instance + */ + CreatePageRequest.prototype.languageCode = ""; + + /** + * Creates a new CreatePageRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.CreatePageRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ICreatePageRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.CreatePageRequest} CreatePageRequest instance + */ + CreatePageRequest.create = function create(properties) { + return new CreatePageRequest(properties); + }; + + /** + * Encodes the specified CreatePageRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreatePageRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.CreatePageRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ICreatePageRequest} message CreatePageRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreatePageRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.page != null && Object.hasOwnProperty.call(message, "page")) + $root.google.cloud.dialogflow.cx.v3beta1.Page.encode(message.page, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.languageCode); + return writer; + }; + + /** + * Encodes the specified CreatePageRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreatePageRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.CreatePageRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ICreatePageRequest} message CreatePageRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreatePageRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreatePageRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.CreatePageRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.CreatePageRequest} CreatePageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreatePageRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.CreatePageRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.page = $root.google.cloud.dialogflow.cx.v3beta1.Page.decode(reader, reader.uint32()); + break; + case 3: + message.languageCode = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreatePageRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.CreatePageRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.CreatePageRequest} CreatePageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreatePageRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreatePageRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.CreatePageRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreatePageRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.page != null && message.hasOwnProperty("page")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.Page.verify(message.page); + if (error) + return "page." + error; + } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; + return null; + }; + + /** + * Creates a CreatePageRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.CreatePageRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.CreatePageRequest} CreatePageRequest + */ + CreatePageRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.CreatePageRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.CreatePageRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.page != null) { + if (typeof object.page !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.CreatePageRequest.page: object expected"); + message.page = $root.google.cloud.dialogflow.cx.v3beta1.Page.fromObject(object.page); + } + if (object.languageCode != null) + message.languageCode = String(object.languageCode); + return message; + }; + + /** + * Creates a plain object from a CreatePageRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.CreatePageRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.CreatePageRequest} message CreatePageRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreatePageRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.page = null; + object.languageCode = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.page != null && message.hasOwnProperty("page")) + object.page = $root.google.cloud.dialogflow.cx.v3beta1.Page.toObject(message.page, options); + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; + return object; + }; + + /** + * Converts this CreatePageRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.CreatePageRequest + * @instance + * @returns {Object.} JSON object + */ + CreatePageRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreatePageRequest; + })(); + + v3beta1.UpdatePageRequest = (function() { + + /** + * Properties of an UpdatePageRequest. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @interface IUpdatePageRequest + * @property {google.cloud.dialogflow.cx.v3beta1.IPage|null} [page] UpdatePageRequest page + * @property {string|null} [languageCode] UpdatePageRequest languageCode + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdatePageRequest updateMask + */ + + /** + * Constructs a new UpdatePageRequest. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents an UpdatePageRequest. + * @implements IUpdatePageRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdatePageRequest=} [properties] Properties to set + */ + function UpdatePageRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdatePageRequest page. + * @member {google.cloud.dialogflow.cx.v3beta1.IPage|null|undefined} page + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest + * @instance + */ + UpdatePageRequest.prototype.page = null; + + /** + * UpdatePageRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest + * @instance + */ + UpdatePageRequest.prototype.languageCode = ""; + + /** + * UpdatePageRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest + * @instance + */ + UpdatePageRequest.prototype.updateMask = null; + + /** + * Creates a new UpdatePageRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdatePageRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest} UpdatePageRequest instance + */ + UpdatePageRequest.create = function create(properties) { + return new UpdatePageRequest(properties); + }; + + /** + * Encodes the specified UpdatePageRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdatePageRequest} message UpdatePageRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdatePageRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.page != null && Object.hasOwnProperty.call(message, "page")) + $root.google.cloud.dialogflow.cx.v3beta1.Page.encode(message.page, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdatePageRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdatePageRequest} message UpdatePageRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdatePageRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdatePageRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest} UpdatePageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdatePageRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.page = $root.google.cloud.dialogflow.cx.v3beta1.Page.decode(reader, reader.uint32()); + break; + case 2: + message.languageCode = reader.string(); + break; + case 3: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdatePageRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest} UpdatePageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdatePageRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdatePageRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdatePageRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.page != null && message.hasOwnProperty("page")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.Page.verify(message.page); + if (error) + return "page." + error; + } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + return null; + }; + + /** + * Creates an UpdatePageRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest} UpdatePageRequest + */ + UpdatePageRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest(); + if (object.page != null) { + if (typeof object.page !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest.page: object expected"); + message.page = $root.google.cloud.dialogflow.cx.v3beta1.Page.fromObject(object.page); + } + if (object.languageCode != null) + message.languageCode = String(object.languageCode); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdatePageRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest} message UpdatePageRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdatePageRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.page = null; + object.languageCode = ""; + object.updateMask = null; + } + if (message.page != null && message.hasOwnProperty("page")) + object.page = $root.google.cloud.dialogflow.cx.v3beta1.Page.toObject(message.page, options); + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdatePageRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest + * @instance + * @returns {Object.} JSON object + */ + UpdatePageRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UpdatePageRequest; + })(); + + v3beta1.DeletePageRequest = (function() { + + /** + * Properties of a DeletePageRequest. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @interface IDeletePageRequest + * @property {string|null} [name] DeletePageRequest name + * @property {boolean|null} [force] DeletePageRequest force + */ + + /** + * Constructs a new DeletePageRequest. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents a DeletePageRequest. + * @implements IDeletePageRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.IDeletePageRequest=} [properties] Properties to set + */ + function DeletePageRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeletePageRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3beta1.DeletePageRequest + * @instance + */ + DeletePageRequest.prototype.name = ""; + + /** + * DeletePageRequest force. + * @member {boolean} force + * @memberof google.cloud.dialogflow.cx.v3beta1.DeletePageRequest + * @instance + */ + DeletePageRequest.prototype.force = false; + + /** + * Creates a new DeletePageRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.DeletePageRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IDeletePageRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.DeletePageRequest} DeletePageRequest instance + */ + DeletePageRequest.create = function create(properties) { + return new DeletePageRequest(properties); + }; + + /** + * Encodes the specified DeletePageRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeletePageRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.DeletePageRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IDeletePageRequest} message DeletePageRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeletePageRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.force != null && Object.hasOwnProperty.call(message, "force")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.force); + return writer; + }; + + /** + * Encodes the specified DeletePageRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeletePageRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.DeletePageRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IDeletePageRequest} message DeletePageRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeletePageRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeletePageRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.DeletePageRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.DeletePageRequest} DeletePageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeletePageRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.DeletePageRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.force = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeletePageRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.DeletePageRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.DeletePageRequest} DeletePageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeletePageRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeletePageRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.DeletePageRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeletePageRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.force != null && message.hasOwnProperty("force")) + if (typeof message.force !== "boolean") + return "force: boolean expected"; + return null; + }; + + /** + * Creates a DeletePageRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.DeletePageRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.DeletePageRequest} DeletePageRequest + */ + DeletePageRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.DeletePageRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.DeletePageRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.force != null) + message.force = Boolean(object.force); + return message; + }; + + /** + * Creates a plain object from a DeletePageRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.DeletePageRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.DeletePageRequest} message DeletePageRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeletePageRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.force = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.force != null && message.hasOwnProperty("force")) + object.force = message.force; + return object; + }; + + /** + * Converts this DeletePageRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.DeletePageRequest + * @instance + * @returns {Object.} JSON object + */ + DeletePageRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeletePageRequest; + })(); + + v3beta1.Fulfillment = (function() { + + /** + * Properties of a Fulfillment. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @interface IFulfillment + * @property {Array.|null} [messages] Fulfillment messages + * @property {string|null} [webhook] Fulfillment webhook + * @property {string|null} [tag] Fulfillment tag + * @property {Array.|null} [setParameterActions] Fulfillment setParameterActions + * @property {Array.|null} [conditionalCases] Fulfillment conditionalCases + */ + + /** + * Constructs a new Fulfillment. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents a Fulfillment. + * @implements IFulfillment + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.IFulfillment=} [properties] Properties to set + */ + function Fulfillment(properties) { + this.messages = []; + this.setParameterActions = []; + this.conditionalCases = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Fulfillment messages. + * @member {Array.} messages + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * @instance + */ + Fulfillment.prototype.messages = $util.emptyArray; + + /** + * Fulfillment webhook. + * @member {string} webhook + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * @instance + */ + Fulfillment.prototype.webhook = ""; + + /** + * Fulfillment tag. + * @member {string} tag + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * @instance + */ + Fulfillment.prototype.tag = ""; + + /** + * Fulfillment setParameterActions. + * @member {Array.} setParameterActions + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * @instance + */ + Fulfillment.prototype.setParameterActions = $util.emptyArray; + + /** + * Fulfillment conditionalCases. + * @member {Array.} conditionalCases + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * @instance + */ + Fulfillment.prototype.conditionalCases = $util.emptyArray; + + /** + * Creates a new Fulfillment instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IFulfillment=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment} Fulfillment instance + */ + Fulfillment.create = function create(properties) { + return new Fulfillment(properties); + }; + + /** + * Encodes the specified Fulfillment message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IFulfillment} message Fulfillment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Fulfillment.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.messages != null && message.messages.length) + for (var i = 0; i < message.messages.length; ++i) + $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.encode(message.messages[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.webhook != null && Object.hasOwnProperty.call(message, "webhook")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.webhook); + if (message.tag != null && Object.hasOwnProperty.call(message, "tag")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.tag); + if (message.setParameterActions != null && message.setParameterActions.length) + for (var i = 0; i < message.setParameterActions.length; ++i) + $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction.encode(message.setParameterActions[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.conditionalCases != null && message.conditionalCases.length) + for (var i = 0; i < message.conditionalCases.length; ++i) + $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.encode(message.conditionalCases[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Fulfillment message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IFulfillment} message Fulfillment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Fulfillment.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Fulfillment message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment} Fulfillment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Fulfillment.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.messages && message.messages.length)) + message.messages = []; + message.messages.push($root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.decode(reader, reader.uint32())); + break; + case 2: + message.webhook = reader.string(); + break; + case 3: + message.tag = reader.string(); + break; + case 4: + if (!(message.setParameterActions && message.setParameterActions.length)) + message.setParameterActions = []; + message.setParameterActions.push($root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction.decode(reader, reader.uint32())); + break; + case 5: + if (!(message.conditionalCases && message.conditionalCases.length)) + message.conditionalCases = []; + message.conditionalCases.push($root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Fulfillment message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment} Fulfillment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Fulfillment.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Fulfillment message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Fulfillment.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.messages != null && message.hasOwnProperty("messages")) { + if (!Array.isArray(message.messages)) + return "messages: array expected"; + for (var i = 0; i < message.messages.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.verify(message.messages[i]); + if (error) + return "messages." + error; + } + } + if (message.webhook != null && message.hasOwnProperty("webhook")) + if (!$util.isString(message.webhook)) + return "webhook: string expected"; + if (message.tag != null && message.hasOwnProperty("tag")) + if (!$util.isString(message.tag)) + return "tag: string expected"; + if (message.setParameterActions != null && message.hasOwnProperty("setParameterActions")) { + if (!Array.isArray(message.setParameterActions)) + return "setParameterActions: array expected"; + for (var i = 0; i < message.setParameterActions.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction.verify(message.setParameterActions[i]); + if (error) + return "setParameterActions." + error; + } + } + if (message.conditionalCases != null && message.hasOwnProperty("conditionalCases")) { + if (!Array.isArray(message.conditionalCases)) + return "conditionalCases: array expected"; + for (var i = 0; i < message.conditionalCases.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.verify(message.conditionalCases[i]); + if (error) + return "conditionalCases." + error; + } + } + return null; + }; + + /** + * Creates a Fulfillment message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment} Fulfillment + */ + Fulfillment.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment(); + if (object.messages) { + if (!Array.isArray(object.messages)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Fulfillment.messages: array expected"); + message.messages = []; + for (var i = 0; i < object.messages.length; ++i) { + if (typeof object.messages[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Fulfillment.messages: object expected"); + message.messages[i] = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.fromObject(object.messages[i]); + } + } + if (object.webhook != null) + message.webhook = String(object.webhook); + if (object.tag != null) + message.tag = String(object.tag); + if (object.setParameterActions) { + if (!Array.isArray(object.setParameterActions)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Fulfillment.setParameterActions: array expected"); + message.setParameterActions = []; + for (var i = 0; i < object.setParameterActions.length; ++i) { + if (typeof object.setParameterActions[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Fulfillment.setParameterActions: object expected"); + message.setParameterActions[i] = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction.fromObject(object.setParameterActions[i]); + } + } + if (object.conditionalCases) { + if (!Array.isArray(object.conditionalCases)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Fulfillment.conditionalCases: array expected"); + message.conditionalCases = []; + for (var i = 0; i < object.conditionalCases.length; ++i) { + if (typeof object.conditionalCases[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Fulfillment.conditionalCases: object expected"); + message.conditionalCases[i] = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.fromObject(object.conditionalCases[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Fulfillment message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment} message Fulfillment + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Fulfillment.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.messages = []; + object.setParameterActions = []; + object.conditionalCases = []; + } + if (options.defaults) { + object.webhook = ""; + object.tag = ""; + } + if (message.messages && message.messages.length) { + object.messages = []; + for (var j = 0; j < message.messages.length; ++j) + object.messages[j] = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.toObject(message.messages[j], options); + } + if (message.webhook != null && message.hasOwnProperty("webhook")) + object.webhook = message.webhook; + if (message.tag != null && message.hasOwnProperty("tag")) + object.tag = message.tag; + if (message.setParameterActions && message.setParameterActions.length) { + object.setParameterActions = []; + for (var j = 0; j < message.setParameterActions.length; ++j) + object.setParameterActions[j] = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction.toObject(message.setParameterActions[j], options); + } + if (message.conditionalCases && message.conditionalCases.length) { + object.conditionalCases = []; + for (var j = 0; j < message.conditionalCases.length; ++j) + object.conditionalCases[j] = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.toObject(message.conditionalCases[j], options); + } + return object; + }; + + /** + * Converts this Fulfillment to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * @instance + * @returns {Object.} JSON object + */ + Fulfillment.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + Fulfillment.SetParameterAction = (function() { + + /** + * Properties of a SetParameterAction. + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * @interface ISetParameterAction + * @property {string|null} [parameter] SetParameterAction parameter + * @property {google.protobuf.IValue|null} [value] SetParameterAction value + */ + + /** + * Constructs a new SetParameterAction. + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * @classdesc Represents a SetParameterAction. + * @implements ISetParameterAction + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ISetParameterAction=} [properties] Properties to set + */ + function SetParameterAction(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SetParameterAction parameter. + * @member {string} parameter + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction + * @instance + */ + SetParameterAction.prototype.parameter = ""; + + /** + * SetParameterAction value. + * @member {google.protobuf.IValue|null|undefined} value + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction + * @instance + */ + SetParameterAction.prototype.value = null; + + /** + * Creates a new SetParameterAction instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ISetParameterAction=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction} SetParameterAction instance + */ + SetParameterAction.create = function create(properties) { + return new SetParameterAction(properties); + }; + + /** + * Encodes the specified SetParameterAction message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ISetParameterAction} message SetParameterAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetParameterAction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parameter != null && Object.hasOwnProperty.call(message, "parameter")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parameter); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + $root.google.protobuf.Value.encode(message.value, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SetParameterAction message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ISetParameterAction} message SetParameterAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetParameterAction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SetParameterAction message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction} SetParameterAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetParameterAction.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parameter = reader.string(); + break; + case 2: + message.value = $root.google.protobuf.Value.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SetParameterAction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction} SetParameterAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetParameterAction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SetParameterAction message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SetParameterAction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parameter != null && message.hasOwnProperty("parameter")) + if (!$util.isString(message.parameter)) + return "parameter: string expected"; + if (message.value != null && message.hasOwnProperty("value")) { + var error = $root.google.protobuf.Value.verify(message.value); + if (error) + return "value." + error; + } + return null; + }; + + /** + * Creates a SetParameterAction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction} SetParameterAction + */ + SetParameterAction.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction(); + if (object.parameter != null) + message.parameter = String(object.parameter); + if (object.value != null) { + if (typeof object.value !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction.value: object expected"); + message.value = $root.google.protobuf.Value.fromObject(object.value); + } + return message; + }; + + /** + * Creates a plain object from a SetParameterAction message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction} message SetParameterAction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SetParameterAction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parameter = ""; + object.value = null; + } + if (message.parameter != null && message.hasOwnProperty("parameter")) + object.parameter = message.parameter; + if (message.value != null && message.hasOwnProperty("value")) + object.value = $root.google.protobuf.Value.toObject(message.value, options); + return object; + }; + + /** + * Converts this SetParameterAction to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction + * @instance + * @returns {Object.} JSON object + */ + SetParameterAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SetParameterAction; + })(); + + Fulfillment.ConditionalCases = (function() { + + /** + * Properties of a ConditionalCases. + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * @interface IConditionalCases + * @property {Array.|null} [cases] ConditionalCases cases + */ + + /** + * Constructs a new ConditionalCases. + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * @classdesc Represents a ConditionalCases. + * @implements IConditionalCases + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.IConditionalCases=} [properties] Properties to set + */ + function ConditionalCases(properties) { + this.cases = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ConditionalCases cases. + * @member {Array.} cases + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases + * @instance + */ + ConditionalCases.prototype.cases = $util.emptyArray; + + /** + * Creates a new ConditionalCases instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.IConditionalCases=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases} ConditionalCases instance + */ + ConditionalCases.create = function create(properties) { + return new ConditionalCases(properties); + }; + + /** + * Encodes the specified ConditionalCases message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.IConditionalCases} message ConditionalCases message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConditionalCases.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cases != null && message.cases.length) + for (var i = 0; i < message.cases.length; ++i) + $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.encode(message.cases[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ConditionalCases message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.IConditionalCases} message ConditionalCases message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConditionalCases.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConditionalCases message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases} ConditionalCases + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConditionalCases.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.cases && message.cases.length)) + message.cases = []; + message.cases.push($root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConditionalCases message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases} ConditionalCases + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConditionalCases.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConditionalCases message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConditionalCases.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.cases != null && message.hasOwnProperty("cases")) { + if (!Array.isArray(message.cases)) + return "cases: array expected"; + for (var i = 0; i < message.cases.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.verify(message.cases[i]); + if (error) + return "cases." + error; + } + } + return null; + }; + + /** + * Creates a ConditionalCases message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases} ConditionalCases + */ + ConditionalCases.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases(); + if (object.cases) { + if (!Array.isArray(object.cases)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.cases: array expected"); + message.cases = []; + for (var i = 0; i < object.cases.length; ++i) { + if (typeof object.cases[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.cases: object expected"); + message.cases[i] = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.fromObject(object.cases[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ConditionalCases message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases} message ConditionalCases + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConditionalCases.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.cases = []; + if (message.cases && message.cases.length) { + object.cases = []; + for (var j = 0; j < message.cases.length; ++j) + object.cases[j] = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.toObject(message.cases[j], options); + } + return object; + }; + + /** + * Converts this ConditionalCases to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases + * @instance + * @returns {Object.} JSON object + */ + ConditionalCases.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + ConditionalCases.Case = (function() { + + /** + * Properties of a Case. + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases + * @interface ICase + * @property {string|null} [condition] Case condition + * @property {Array.|null} [caseContent] Case caseContent + */ + + /** + * Constructs a new Case. + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases + * @classdesc Represents a Case. + * @implements ICase + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.ICase=} [properties] Properties to set + */ + function Case(properties) { + this.caseContent = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Case condition. + * @member {string} condition + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case + * @instance + */ + Case.prototype.condition = ""; + + /** + * Case caseContent. + * @member {Array.} caseContent + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case + * @instance + */ + Case.prototype.caseContent = $util.emptyArray; + + /** + * Creates a new Case instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.ICase=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case} Case instance + */ + Case.create = function create(properties) { + return new Case(properties); + }; + + /** + * Encodes the specified Case message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.ICase} message Case message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Case.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.condition); + if (message.caseContent != null && message.caseContent.length) + for (var i = 0; i < message.caseContent.length; ++i) + $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent.encode(message.caseContent[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Case message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.ICase} message Case message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Case.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Case message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case} Case + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Case.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.condition = reader.string(); + break; + case 2: + if (!(message.caseContent && message.caseContent.length)) + message.caseContent = []; + message.caseContent.push($root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Case message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case} Case + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Case.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Case message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Case.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.condition != null && message.hasOwnProperty("condition")) + if (!$util.isString(message.condition)) + return "condition: string expected"; + if (message.caseContent != null && message.hasOwnProperty("caseContent")) { + if (!Array.isArray(message.caseContent)) + return "caseContent: array expected"; + for (var i = 0; i < message.caseContent.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent.verify(message.caseContent[i]); + if (error) + return "caseContent." + error; + } + } + return null; + }; + + /** + * Creates a Case message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case} Case + */ + Case.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case(); + if (object.condition != null) + message.condition = String(object.condition); + if (object.caseContent) { + if (!Array.isArray(object.caseContent)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.caseContent: array expected"); + message.caseContent = []; + for (var i = 0; i < object.caseContent.length; ++i) { + if (typeof object.caseContent[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.caseContent: object expected"); + message.caseContent[i] = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent.fromObject(object.caseContent[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Case message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case} message Case + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Case.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.caseContent = []; + if (options.defaults) + object.condition = ""; + if (message.condition != null && message.hasOwnProperty("condition")) + object.condition = message.condition; + if (message.caseContent && message.caseContent.length) { + object.caseContent = []; + for (var j = 0; j < message.caseContent.length; ++j) + object.caseContent[j] = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent.toObject(message.caseContent[j], options); + } + return object; + }; + + /** + * Converts this Case to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case + * @instance + * @returns {Object.} JSON object + */ + Case.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + Case.CaseContent = (function() { + + /** + * Properties of a CaseContent. + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case + * @interface ICaseContent + * @property {google.cloud.dialogflow.cx.v3beta1.IResponseMessage|null} [message] CaseContent message + * @property {google.cloud.dialogflow.cx.v3beta1.Fulfillment.IConditionalCases|null} [additionalCases] CaseContent additionalCases + */ + + /** + * Constructs a new CaseContent. + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case + * @classdesc Represents a CaseContent. + * @implements ICaseContent + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.ICaseContent=} [properties] Properties to set + */ + function CaseContent(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CaseContent message. + * @member {google.cloud.dialogflow.cx.v3beta1.IResponseMessage|null|undefined} message + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent + * @instance + */ + CaseContent.prototype.message = null; + + /** + * CaseContent additionalCases. + * @member {google.cloud.dialogflow.cx.v3beta1.Fulfillment.IConditionalCases|null|undefined} additionalCases + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent + * @instance + */ + CaseContent.prototype.additionalCases = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * CaseContent casesOrMessage. + * @member {"message"|"additionalCases"|undefined} casesOrMessage + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent + * @instance + */ + Object.defineProperty(CaseContent.prototype, "casesOrMessage", { + get: $util.oneOfGetter($oneOfFields = ["message", "additionalCases"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CaseContent instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.ICaseContent=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent} CaseContent instance + */ + CaseContent.create = function create(properties) { + return new CaseContent(properties); + }; + + /** + * Encodes the specified CaseContent message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.ICaseContent} message CaseContent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CaseContent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.encode(message.message, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.additionalCases != null && Object.hasOwnProperty.call(message, "additionalCases")) + $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.encode(message.additionalCases, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CaseContent message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.ICaseContent} message CaseContent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CaseContent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CaseContent message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent} CaseContent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CaseContent.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.message = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.decode(reader, reader.uint32()); + break; + case 2: + message.additionalCases = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CaseContent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent} CaseContent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CaseContent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CaseContent message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CaseContent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.message != null && message.hasOwnProperty("message")) { + properties.casesOrMessage = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.verify(message.message); + if (error) + return "message." + error; + } + } + if (message.additionalCases != null && message.hasOwnProperty("additionalCases")) { + if (properties.casesOrMessage === 1) + return "casesOrMessage: multiple values"; + properties.casesOrMessage = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.verify(message.additionalCases); + if (error) + return "additionalCases." + error; + } + } + return null; + }; + + /** + * Creates a CaseContent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent} CaseContent + */ + CaseContent.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent(); + if (object.message != null) { + if (typeof object.message !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent.message: object expected"); + message.message = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.fromObject(object.message); + } + if (object.additionalCases != null) { + if (typeof object.additionalCases !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent.additionalCases: object expected"); + message.additionalCases = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.fromObject(object.additionalCases); + } + return message; + }; + + /** + * Creates a plain object from a CaseContent message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent} message CaseContent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CaseContent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.message != null && message.hasOwnProperty("message")) { + object.message = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.toObject(message.message, options); + if (options.oneofs) + object.casesOrMessage = "message"; + } + if (message.additionalCases != null && message.hasOwnProperty("additionalCases")) { + object.additionalCases = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.toObject(message.additionalCases, options); + if (options.oneofs) + object.casesOrMessage = "additionalCases"; + } + return object; + }; + + /** + * Converts this CaseContent to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent + * @instance + * @returns {Object.} JSON object + */ + CaseContent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CaseContent; + })(); + + return Case; + })(); + + return ConditionalCases; + })(); + + return Fulfillment; + })(); + + v3beta1.ResponseMessage = (function() { + + /** + * Properties of a ResponseMessage. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @interface IResponseMessage + * @property {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IText|null} [text] ResponseMessage text + * @property {google.protobuf.IStruct|null} [payload] ResponseMessage payload + * @property {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IConversationSuccess|null} [conversationSuccess] ResponseMessage conversationSuccess + * @property {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IOutputAudioText|null} [outputAudioText] ResponseMessage outputAudioText + * @property {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ILiveAgentHandoff|null} [liveAgentHandoff] ResponseMessage liveAgentHandoff + * @property {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IEndInteraction|null} [endInteraction] ResponseMessage endInteraction + * @property {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IPlayAudio|null} [playAudio] ResponseMessage playAudio + * @property {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IMixedAudio|null} [mixedAudio] ResponseMessage mixedAudio + */ + + /** + * Constructs a new ResponseMessage. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents a ResponseMessage. + * @implements IResponseMessage + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.IResponseMessage=} [properties] Properties to set + */ + function ResponseMessage(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResponseMessage text. + * @member {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IText|null|undefined} text + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @instance + */ + ResponseMessage.prototype.text = null; + + /** + * ResponseMessage payload. + * @member {google.protobuf.IStruct|null|undefined} payload + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @instance + */ + ResponseMessage.prototype.payload = null; + + /** + * ResponseMessage conversationSuccess. + * @member {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IConversationSuccess|null|undefined} conversationSuccess + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @instance + */ + ResponseMessage.prototype.conversationSuccess = null; + + /** + * ResponseMessage outputAudioText. + * @member {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IOutputAudioText|null|undefined} outputAudioText + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @instance + */ + ResponseMessage.prototype.outputAudioText = null; + + /** + * ResponseMessage liveAgentHandoff. + * @member {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ILiveAgentHandoff|null|undefined} liveAgentHandoff + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @instance + */ + ResponseMessage.prototype.liveAgentHandoff = null; + + /** + * ResponseMessage endInteraction. + * @member {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IEndInteraction|null|undefined} endInteraction + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @instance + */ + ResponseMessage.prototype.endInteraction = null; + + /** + * ResponseMessage playAudio. + * @member {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IPlayAudio|null|undefined} playAudio + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @instance + */ + ResponseMessage.prototype.playAudio = null; + + /** + * ResponseMessage mixedAudio. + * @member {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IMixedAudio|null|undefined} mixedAudio + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @instance + */ + ResponseMessage.prototype.mixedAudio = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ResponseMessage message. + * @member {"text"|"payload"|"conversationSuccess"|"outputAudioText"|"liveAgentHandoff"|"endInteraction"|"playAudio"|"mixedAudio"|undefined} message + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @instance + */ + Object.defineProperty(ResponseMessage.prototype, "message", { + get: $util.oneOfGetter($oneOfFields = ["text", "payload", "conversationSuccess", "outputAudioText", "liveAgentHandoff", "endInteraction", "playAudio", "mixedAudio"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ResponseMessage instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IResponseMessage=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage} ResponseMessage instance + */ + ResponseMessage.create = function create(properties) { + return new ResponseMessage(properties); + }; + + /** + * Encodes the specified ResponseMessage message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IResponseMessage} message ResponseMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.text != null && Object.hasOwnProperty.call(message, "text")) + $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text.encode(message.text, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.payload != null && Object.hasOwnProperty.call(message, "payload")) + $root.google.protobuf.Struct.encode(message.payload, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.outputAudioText != null && Object.hasOwnProperty.call(message, "outputAudioText")) + $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText.encode(message.outputAudioText, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.conversationSuccess != null && Object.hasOwnProperty.call(message, "conversationSuccess")) + $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess.encode(message.conversationSuccess, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.liveAgentHandoff != null && Object.hasOwnProperty.call(message, "liveAgentHandoff")) + $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff.encode(message.liveAgentHandoff, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.endInteraction != null && Object.hasOwnProperty.call(message, "endInteraction")) + $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction.encode(message.endInteraction, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.playAudio != null && Object.hasOwnProperty.call(message, "playAudio")) + $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio.encode(message.playAudio, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.mixedAudio != null && Object.hasOwnProperty.call(message, "mixedAudio")) + $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.encode(message.mixedAudio, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ResponseMessage message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IResponseMessage} message ResponseMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResponseMessage message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage} ResponseMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseMessage.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.text = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text.decode(reader, reader.uint32()); + break; + case 2: + message.payload = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + case 9: + message.conversationSuccess = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess.decode(reader, reader.uint32()); + break; + case 8: + message.outputAudioText = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText.decode(reader, reader.uint32()); + break; + case 10: + message.liveAgentHandoff = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff.decode(reader, reader.uint32()); + break; + case 11: + message.endInteraction = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction.decode(reader, reader.uint32()); + break; + case 12: + message.playAudio = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio.decode(reader, reader.uint32()); + break; + case 13: + message.mixedAudio = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResponseMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage} ResponseMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResponseMessage message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResponseMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.text != null && message.hasOwnProperty("text")) { + properties.message = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text.verify(message.text); + if (error) + return "text." + error; + } + } + if (message.payload != null && message.hasOwnProperty("payload")) { + if (properties.message === 1) + return "message: multiple values"; + properties.message = 1; + { + var error = $root.google.protobuf.Struct.verify(message.payload); + if (error) + return "payload." + error; + } + } + if (message.conversationSuccess != null && message.hasOwnProperty("conversationSuccess")) { + if (properties.message === 1) + return "message: multiple values"; + properties.message = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess.verify(message.conversationSuccess); + if (error) + return "conversationSuccess." + error; + } + } + if (message.outputAudioText != null && message.hasOwnProperty("outputAudioText")) { + if (properties.message === 1) + return "message: multiple values"; + properties.message = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText.verify(message.outputAudioText); + if (error) + return "outputAudioText." + error; + } + } + if (message.liveAgentHandoff != null && message.hasOwnProperty("liveAgentHandoff")) { + if (properties.message === 1) + return "message: multiple values"; + properties.message = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff.verify(message.liveAgentHandoff); + if (error) + return "liveAgentHandoff." + error; + } + } + if (message.endInteraction != null && message.hasOwnProperty("endInteraction")) { + if (properties.message === 1) + return "message: multiple values"; + properties.message = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction.verify(message.endInteraction); + if (error) + return "endInteraction." + error; + } + } + if (message.playAudio != null && message.hasOwnProperty("playAudio")) { + if (properties.message === 1) + return "message: multiple values"; + properties.message = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio.verify(message.playAudio); + if (error) + return "playAudio." + error; + } + } + if (message.mixedAudio != null && message.hasOwnProperty("mixedAudio")) { + if (properties.message === 1) + return "message: multiple values"; + properties.message = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.verify(message.mixedAudio); + if (error) + return "mixedAudio." + error; + } + } + return null; + }; + + /** + * Creates a ResponseMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage} ResponseMessage + */ + ResponseMessage.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage(); + if (object.text != null) { + if (typeof object.text !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ResponseMessage.text: object expected"); + message.text = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text.fromObject(object.text); + } + if (object.payload != null) { + if (typeof object.payload !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ResponseMessage.payload: object expected"); + message.payload = $root.google.protobuf.Struct.fromObject(object.payload); + } + if (object.conversationSuccess != null) { + if (typeof object.conversationSuccess !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ResponseMessage.conversationSuccess: object expected"); + message.conversationSuccess = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess.fromObject(object.conversationSuccess); + } + if (object.outputAudioText != null) { + if (typeof object.outputAudioText !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ResponseMessage.outputAudioText: object expected"); + message.outputAudioText = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText.fromObject(object.outputAudioText); + } + if (object.liveAgentHandoff != null) { + if (typeof object.liveAgentHandoff !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ResponseMessage.liveAgentHandoff: object expected"); + message.liveAgentHandoff = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff.fromObject(object.liveAgentHandoff); + } + if (object.endInteraction != null) { + if (typeof object.endInteraction !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ResponseMessage.endInteraction: object expected"); + message.endInteraction = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction.fromObject(object.endInteraction); + } + if (object.playAudio != null) { + if (typeof object.playAudio !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ResponseMessage.playAudio: object expected"); + message.playAudio = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio.fromObject(object.playAudio); + } + if (object.mixedAudio != null) { + if (typeof object.mixedAudio !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ResponseMessage.mixedAudio: object expected"); + message.mixedAudio = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.fromObject(object.mixedAudio); + } + return message; + }; + + /** + * Creates a plain object from a ResponseMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage} message ResponseMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResponseMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.text != null && message.hasOwnProperty("text")) { + object.text = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text.toObject(message.text, options); + if (options.oneofs) + object.message = "text"; + } + if (message.payload != null && message.hasOwnProperty("payload")) { + object.payload = $root.google.protobuf.Struct.toObject(message.payload, options); + if (options.oneofs) + object.message = "payload"; + } + if (message.outputAudioText != null && message.hasOwnProperty("outputAudioText")) { + object.outputAudioText = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText.toObject(message.outputAudioText, options); + if (options.oneofs) + object.message = "outputAudioText"; + } + if (message.conversationSuccess != null && message.hasOwnProperty("conversationSuccess")) { + object.conversationSuccess = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess.toObject(message.conversationSuccess, options); + if (options.oneofs) + object.message = "conversationSuccess"; + } + if (message.liveAgentHandoff != null && message.hasOwnProperty("liveAgentHandoff")) { + object.liveAgentHandoff = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff.toObject(message.liveAgentHandoff, options); + if (options.oneofs) + object.message = "liveAgentHandoff"; + } + if (message.endInteraction != null && message.hasOwnProperty("endInteraction")) { + object.endInteraction = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction.toObject(message.endInteraction, options); + if (options.oneofs) + object.message = "endInteraction"; + } + if (message.playAudio != null && message.hasOwnProperty("playAudio")) { + object.playAudio = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio.toObject(message.playAudio, options); + if (options.oneofs) + object.message = "playAudio"; + } + if (message.mixedAudio != null && message.hasOwnProperty("mixedAudio")) { + object.mixedAudio = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.toObject(message.mixedAudio, options); + if (options.oneofs) + object.message = "mixedAudio"; + } + return object; + }; + + /** + * Converts this ResponseMessage to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @instance + * @returns {Object.} JSON object + */ + ResponseMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + ResponseMessage.Text = (function() { + + /** + * Properties of a Text. + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @interface IText + * @property {Array.|null} [text] Text text + * @property {boolean|null} [allowPlaybackInterruption] Text allowPlaybackInterruption + */ + + /** + * Constructs a new Text. + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @classdesc Represents a Text. + * @implements IText + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IText=} [properties] Properties to set + */ + function Text(properties) { + this.text = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Text text. + * @member {Array.} text + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text + * @instance + */ + Text.prototype.text = $util.emptyArray; + + /** + * Text allowPlaybackInterruption. + * @member {boolean} allowPlaybackInterruption + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text + * @instance + */ + Text.prototype.allowPlaybackInterruption = false; + + /** + * Creates a new Text instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IText=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text} Text instance + */ + Text.create = function create(properties) { + return new Text(properties); + }; + + /** + * Encodes the specified Text message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IText} message Text message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Text.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.text != null && message.text.length) + for (var i = 0; i < message.text.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.text[i]); + if (message.allowPlaybackInterruption != null && Object.hasOwnProperty.call(message, "allowPlaybackInterruption")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowPlaybackInterruption); + return writer; + }; + + /** + * Encodes the specified Text message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IText} message Text message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Text.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Text message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text} Text + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Text.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.text && message.text.length)) + message.text = []; + message.text.push(reader.string()); + break; + case 2: + message.allowPlaybackInterruption = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Text message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text} Text + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Text.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Text message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Text.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.text != null && message.hasOwnProperty("text")) { + if (!Array.isArray(message.text)) + return "text: array expected"; + for (var i = 0; i < message.text.length; ++i) + if (!$util.isString(message.text[i])) + return "text: string[] expected"; + } + if (message.allowPlaybackInterruption != null && message.hasOwnProperty("allowPlaybackInterruption")) + if (typeof message.allowPlaybackInterruption !== "boolean") + return "allowPlaybackInterruption: boolean expected"; + return null; + }; + + /** + * Creates a Text message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text} Text + */ + Text.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text(); + if (object.text) { + if (!Array.isArray(object.text)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text.text: array expected"); + message.text = []; + for (var i = 0; i < object.text.length; ++i) + message.text[i] = String(object.text[i]); + } + if (object.allowPlaybackInterruption != null) + message.allowPlaybackInterruption = Boolean(object.allowPlaybackInterruption); + return message; + }; + + /** + * Creates a plain object from a Text message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text} message Text + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Text.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.text = []; + if (options.defaults) + object.allowPlaybackInterruption = false; + if (message.text && message.text.length) { + object.text = []; + for (var j = 0; j < message.text.length; ++j) + object.text[j] = message.text[j]; + } + if (message.allowPlaybackInterruption != null && message.hasOwnProperty("allowPlaybackInterruption")) + object.allowPlaybackInterruption = message.allowPlaybackInterruption; + return object; + }; + + /** + * Converts this Text to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text + * @instance + * @returns {Object.} JSON object + */ + Text.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Text; + })(); + + ResponseMessage.LiveAgentHandoff = (function() { + + /** + * Properties of a LiveAgentHandoff. + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @interface ILiveAgentHandoff + * @property {google.protobuf.IStruct|null} [metadata] LiveAgentHandoff metadata + */ + + /** + * Constructs a new LiveAgentHandoff. + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @classdesc Represents a LiveAgentHandoff. + * @implements ILiveAgentHandoff + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ILiveAgentHandoff=} [properties] Properties to set + */ + function LiveAgentHandoff(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LiveAgentHandoff metadata. + * @member {google.protobuf.IStruct|null|undefined} metadata + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff + * @instance + */ + LiveAgentHandoff.prototype.metadata = null; + + /** + * Creates a new LiveAgentHandoff instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ILiveAgentHandoff=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff} LiveAgentHandoff instance + */ + LiveAgentHandoff.create = function create(properties) { + return new LiveAgentHandoff(properties); + }; + + /** + * Encodes the specified LiveAgentHandoff message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ILiveAgentHandoff} message LiveAgentHandoff message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LiveAgentHandoff.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.google.protobuf.Struct.encode(message.metadata, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LiveAgentHandoff message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ILiveAgentHandoff} message LiveAgentHandoff message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LiveAgentHandoff.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LiveAgentHandoff message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff} LiveAgentHandoff + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LiveAgentHandoff.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.metadata = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LiveAgentHandoff message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff} LiveAgentHandoff + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LiveAgentHandoff.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LiveAgentHandoff message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LiveAgentHandoff.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.metadata != null && message.hasOwnProperty("metadata")) { + var error = $root.google.protobuf.Struct.verify(message.metadata); + if (error) + return "metadata." + error; + } + return null; + }; + + /** + * Creates a LiveAgentHandoff message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff} LiveAgentHandoff + */ + LiveAgentHandoff.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff(); + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff.metadata: object expected"); + message.metadata = $root.google.protobuf.Struct.fromObject(object.metadata); + } + return message; + }; + + /** + * Creates a plain object from a LiveAgentHandoff message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff} message LiveAgentHandoff + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LiveAgentHandoff.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.metadata = null; + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.google.protobuf.Struct.toObject(message.metadata, options); + return object; + }; + + /** + * Converts this LiveAgentHandoff to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff + * @instance + * @returns {Object.} JSON object + */ + LiveAgentHandoff.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return LiveAgentHandoff; + })(); + + ResponseMessage.ConversationSuccess = (function() { + + /** + * Properties of a ConversationSuccess. + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @interface IConversationSuccess + * @property {google.protobuf.IStruct|null} [metadata] ConversationSuccess metadata + */ + + /** + * Constructs a new ConversationSuccess. + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @classdesc Represents a ConversationSuccess. + * @implements IConversationSuccess + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IConversationSuccess=} [properties] Properties to set + */ + function ConversationSuccess(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ConversationSuccess metadata. + * @member {google.protobuf.IStruct|null|undefined} metadata + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess + * @instance + */ + ConversationSuccess.prototype.metadata = null; + + /** + * Creates a new ConversationSuccess instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IConversationSuccess=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess} ConversationSuccess instance + */ + ConversationSuccess.create = function create(properties) { + return new ConversationSuccess(properties); + }; + + /** + * Encodes the specified ConversationSuccess message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IConversationSuccess} message ConversationSuccess message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConversationSuccess.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.google.protobuf.Struct.encode(message.metadata, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ConversationSuccess message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IConversationSuccess} message ConversationSuccess message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConversationSuccess.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConversationSuccess message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess} ConversationSuccess + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConversationSuccess.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.metadata = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConversationSuccess message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess} ConversationSuccess + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConversationSuccess.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConversationSuccess message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConversationSuccess.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.metadata != null && message.hasOwnProperty("metadata")) { + var error = $root.google.protobuf.Struct.verify(message.metadata); + if (error) + return "metadata." + error; + } + return null; + }; + + /** + * Creates a ConversationSuccess message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess} ConversationSuccess + */ + ConversationSuccess.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess(); + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess.metadata: object expected"); + message.metadata = $root.google.protobuf.Struct.fromObject(object.metadata); + } + return message; + }; + + /** + * Creates a plain object from a ConversationSuccess message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess} message ConversationSuccess + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConversationSuccess.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.metadata = null; + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.google.protobuf.Struct.toObject(message.metadata, options); + return object; + }; + + /** + * Converts this ConversationSuccess to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess + * @instance + * @returns {Object.} JSON object + */ + ConversationSuccess.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ConversationSuccess; + })(); + + ResponseMessage.OutputAudioText = (function() { + + /** + * Properties of an OutputAudioText. + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @interface IOutputAudioText + * @property {string|null} [text] OutputAudioText text + * @property {string|null} [ssml] OutputAudioText ssml + * @property {boolean|null} [allowPlaybackInterruption] OutputAudioText allowPlaybackInterruption + */ + + /** + * Constructs a new OutputAudioText. + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @classdesc Represents an OutputAudioText. + * @implements IOutputAudioText + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IOutputAudioText=} [properties] Properties to set + */ + function OutputAudioText(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OutputAudioText text. + * @member {string} text + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText + * @instance + */ + OutputAudioText.prototype.text = ""; + + /** + * OutputAudioText ssml. + * @member {string} ssml + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText + * @instance + */ + OutputAudioText.prototype.ssml = ""; + + /** + * OutputAudioText allowPlaybackInterruption. + * @member {boolean} allowPlaybackInterruption + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText + * @instance + */ + OutputAudioText.prototype.allowPlaybackInterruption = false; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * OutputAudioText source. + * @member {"text"|"ssml"|undefined} source + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText + * @instance + */ + Object.defineProperty(OutputAudioText.prototype, "source", { + get: $util.oneOfGetter($oneOfFields = ["text", "ssml"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new OutputAudioText instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IOutputAudioText=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText} OutputAudioText instance + */ + OutputAudioText.create = function create(properties) { + return new OutputAudioText(properties); + }; + + /** + * Encodes the specified OutputAudioText message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IOutputAudioText} message OutputAudioText message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OutputAudioText.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.text != null && Object.hasOwnProperty.call(message, "text")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.text); + if (message.ssml != null && Object.hasOwnProperty.call(message, "ssml")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.ssml); + if (message.allowPlaybackInterruption != null && Object.hasOwnProperty.call(message, "allowPlaybackInterruption")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.allowPlaybackInterruption); + return writer; + }; + + /** + * Encodes the specified OutputAudioText message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IOutputAudioText} message OutputAudioText message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OutputAudioText.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OutputAudioText message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText} OutputAudioText + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OutputAudioText.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.text = reader.string(); + break; + case 2: + message.ssml = reader.string(); + break; + case 3: + message.allowPlaybackInterruption = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OutputAudioText message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText} OutputAudioText + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OutputAudioText.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OutputAudioText message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OutputAudioText.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.text != null && message.hasOwnProperty("text")) { + properties.source = 1; + if (!$util.isString(message.text)) + return "text: string expected"; + } + if (message.ssml != null && message.hasOwnProperty("ssml")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + if (!$util.isString(message.ssml)) + return "ssml: string expected"; + } + if (message.allowPlaybackInterruption != null && message.hasOwnProperty("allowPlaybackInterruption")) + if (typeof message.allowPlaybackInterruption !== "boolean") + return "allowPlaybackInterruption: boolean expected"; + return null; + }; + + /** + * Creates an OutputAudioText message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText} OutputAudioText + */ + OutputAudioText.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText(); + if (object.text != null) + message.text = String(object.text); + if (object.ssml != null) + message.ssml = String(object.ssml); + if (object.allowPlaybackInterruption != null) + message.allowPlaybackInterruption = Boolean(object.allowPlaybackInterruption); + return message; + }; + + /** + * Creates a plain object from an OutputAudioText message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText} message OutputAudioText + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OutputAudioText.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.allowPlaybackInterruption = false; + if (message.text != null && message.hasOwnProperty("text")) { + object.text = message.text; + if (options.oneofs) + object.source = "text"; + } + if (message.ssml != null && message.hasOwnProperty("ssml")) { + object.ssml = message.ssml; + if (options.oneofs) + object.source = "ssml"; + } + if (message.allowPlaybackInterruption != null && message.hasOwnProperty("allowPlaybackInterruption")) + object.allowPlaybackInterruption = message.allowPlaybackInterruption; + return object; + }; + + /** + * Converts this OutputAudioText to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText + * @instance + * @returns {Object.} JSON object + */ + OutputAudioText.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return OutputAudioText; + })(); + + ResponseMessage.MixedAudio = (function() { + + /** + * Properties of a MixedAudio. + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @interface IMixedAudio + * @property {Array.|null} [segments] MixedAudio segments + */ + + /** + * Constructs a new MixedAudio. + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @classdesc Represents a MixedAudio. + * @implements IMixedAudio + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IMixedAudio=} [properties] Properties to set + */ + function MixedAudio(properties) { + this.segments = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MixedAudio segments. + * @member {Array.} segments + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio + * @instance + */ + MixedAudio.prototype.segments = $util.emptyArray; + + /** + * Creates a new MixedAudio instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IMixedAudio=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio} MixedAudio instance + */ + MixedAudio.create = function create(properties) { + return new MixedAudio(properties); + }; + + /** + * Encodes the specified MixedAudio message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IMixedAudio} message MixedAudio message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MixedAudio.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.segments != null && message.segments.length) + for (var i = 0; i < message.segments.length; ++i) + $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment.encode(message.segments[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MixedAudio message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IMixedAudio} message MixedAudio message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MixedAudio.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MixedAudio message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio} MixedAudio + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MixedAudio.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.segments && message.segments.length)) + message.segments = []; + message.segments.push($root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MixedAudio message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio} MixedAudio + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MixedAudio.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MixedAudio message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MixedAudio.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.segments != null && message.hasOwnProperty("segments")) { + if (!Array.isArray(message.segments)) + return "segments: array expected"; + for (var i = 0; i < message.segments.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment.verify(message.segments[i]); + if (error) + return "segments." + error; + } + } + return null; + }; + + /** + * Creates a MixedAudio message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio} MixedAudio + */ + MixedAudio.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio(); + if (object.segments) { + if (!Array.isArray(object.segments)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.segments: array expected"); + message.segments = []; + for (var i = 0; i < object.segments.length; ++i) { + if (typeof object.segments[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.segments: object expected"); + message.segments[i] = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment.fromObject(object.segments[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a MixedAudio message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio} message MixedAudio + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MixedAudio.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.segments = []; + if (message.segments && message.segments.length) { + object.segments = []; + for (var j = 0; j < message.segments.length; ++j) + object.segments[j] = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment.toObject(message.segments[j], options); + } + return object; + }; + + /** + * Converts this MixedAudio to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio + * @instance + * @returns {Object.} JSON object + */ + MixedAudio.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + MixedAudio.Segment = (function() { + + /** + * Properties of a Segment. + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio + * @interface ISegment + * @property {Uint8Array|null} [audio] Segment audio + * @property {string|null} [uri] Segment uri + * @property {boolean|null} [allowPlaybackInterruption] Segment allowPlaybackInterruption + */ + + /** + * Constructs a new Segment. + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio + * @classdesc Represents a Segment. + * @implements ISegment + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.ISegment=} [properties] Properties to set + */ + function Segment(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Segment audio. + * @member {Uint8Array} audio + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment + * @instance + */ + Segment.prototype.audio = $util.newBuffer([]); + + /** + * Segment uri. + * @member {string} uri + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment + * @instance + */ + Segment.prototype.uri = ""; + + /** + * Segment allowPlaybackInterruption. + * @member {boolean} allowPlaybackInterruption + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment + * @instance + */ + Segment.prototype.allowPlaybackInterruption = false; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Segment content. + * @member {"audio"|"uri"|undefined} content + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment + * @instance + */ + Object.defineProperty(Segment.prototype, "content", { + get: $util.oneOfGetter($oneOfFields = ["audio", "uri"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Segment instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.ISegment=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment} Segment instance + */ + Segment.create = function create(properties) { + return new Segment(properties); + }; + + /** + * Encodes the specified Segment message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.ISegment} message Segment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Segment.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.audio != null && Object.hasOwnProperty.call(message, "audio")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.audio); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message.allowPlaybackInterruption != null && Object.hasOwnProperty.call(message, "allowPlaybackInterruption")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.allowPlaybackInterruption); + return writer; + }; + + /** + * Encodes the specified Segment message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.ISegment} message Segment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Segment.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Segment message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment} Segment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Segment.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.audio = reader.bytes(); + break; + case 2: + message.uri = reader.string(); + break; + case 3: + message.allowPlaybackInterruption = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Segment message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment} Segment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Segment.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Segment message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Segment.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.audio != null && message.hasOwnProperty("audio")) { + properties.content = 1; + if (!(message.audio && typeof message.audio.length === "number" || $util.isString(message.audio))) + return "audio: buffer expected"; + } + if (message.uri != null && message.hasOwnProperty("uri")) { + if (properties.content === 1) + return "content: multiple values"; + properties.content = 1; + if (!$util.isString(message.uri)) + return "uri: string expected"; + } + if (message.allowPlaybackInterruption != null && message.hasOwnProperty("allowPlaybackInterruption")) + if (typeof message.allowPlaybackInterruption !== "boolean") + return "allowPlaybackInterruption: boolean expected"; + return null; + }; + + /** + * Creates a Segment message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment} Segment + */ + Segment.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment(); + if (object.audio != null) + if (typeof object.audio === "string") + $util.base64.decode(object.audio, message.audio = $util.newBuffer($util.base64.length(object.audio)), 0); + else if (object.audio.length) + message.audio = object.audio; + if (object.uri != null) + message.uri = String(object.uri); + if (object.allowPlaybackInterruption != null) + message.allowPlaybackInterruption = Boolean(object.allowPlaybackInterruption); + return message; + }; + + /** + * Creates a plain object from a Segment message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment} message Segment + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Segment.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.allowPlaybackInterruption = false; + if (message.audio != null && message.hasOwnProperty("audio")) { + object.audio = options.bytes === String ? $util.base64.encode(message.audio, 0, message.audio.length) : options.bytes === Array ? Array.prototype.slice.call(message.audio) : message.audio; + if (options.oneofs) + object.content = "audio"; + } + if (message.uri != null && message.hasOwnProperty("uri")) { + object.uri = message.uri; + if (options.oneofs) + object.content = "uri"; + } + if (message.allowPlaybackInterruption != null && message.hasOwnProperty("allowPlaybackInterruption")) + object.allowPlaybackInterruption = message.allowPlaybackInterruption; + return object; + }; + + /** + * Converts this Segment to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment + * @instance + * @returns {Object.} JSON object + */ + Segment.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Segment; + })(); + + return MixedAudio; + })(); + + ResponseMessage.EndInteraction = (function() { + + /** + * Properties of an EndInteraction. + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @interface IEndInteraction + */ + + /** + * Constructs a new EndInteraction. + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @classdesc Represents an EndInteraction. + * @implements IEndInteraction + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IEndInteraction=} [properties] Properties to set + */ + function EndInteraction(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** * Creates a new EndInteraction instance using the specified properties. * @function create * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IEndInteraction=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction} EndInteraction instance + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IEndInteraction=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction} EndInteraction instance + */ + EndInteraction.create = function create(properties) { + return new EndInteraction(properties); + }; + + /** + * Encodes the specified EndInteraction message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IEndInteraction} message EndInteraction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EndInteraction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified EndInteraction message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IEndInteraction} message EndInteraction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EndInteraction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EndInteraction message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction} EndInteraction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EndInteraction.create = function create(properties) { - return new EndInteraction(properties); + EndInteraction.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EndInteraction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction} EndInteraction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EndInteraction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EndInteraction message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EndInteraction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an EndInteraction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction} EndInteraction + */ + EndInteraction.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction) + return object; + return new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction(); + }; + + /** + * Creates a plain object from an EndInteraction message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction} message EndInteraction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EndInteraction.toObject = function toObject() { + return {}; + }; + + /** + * Converts this EndInteraction to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction + * @instance + * @returns {Object.} JSON object + */ + EndInteraction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EndInteraction; + })(); + + ResponseMessage.PlayAudio = (function() { + + /** + * Properties of a PlayAudio. + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @interface IPlayAudio + * @property {string|null} [audioUri] PlayAudio audioUri + * @property {boolean|null} [allowPlaybackInterruption] PlayAudio allowPlaybackInterruption + */ + + /** + * Constructs a new PlayAudio. + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @classdesc Represents a PlayAudio. + * @implements IPlayAudio + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IPlayAudio=} [properties] Properties to set + */ + function PlayAudio(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PlayAudio audioUri. + * @member {string} audioUri + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio + * @instance + */ + PlayAudio.prototype.audioUri = ""; + + /** + * PlayAudio allowPlaybackInterruption. + * @member {boolean} allowPlaybackInterruption + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio + * @instance + */ + PlayAudio.prototype.allowPlaybackInterruption = false; + + /** + * Creates a new PlayAudio instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IPlayAudio=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio} PlayAudio instance + */ + PlayAudio.create = function create(properties) { + return new PlayAudio(properties); + }; + + /** + * Encodes the specified PlayAudio message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IPlayAudio} message PlayAudio message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PlayAudio.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.audioUri != null && Object.hasOwnProperty.call(message, "audioUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.audioUri); + if (message.allowPlaybackInterruption != null && Object.hasOwnProperty.call(message, "allowPlaybackInterruption")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowPlaybackInterruption); + return writer; + }; + + /** + * Encodes the specified PlayAudio message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IPlayAudio} message PlayAudio message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PlayAudio.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PlayAudio message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio} PlayAudio + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PlayAudio.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.audioUri = reader.string(); + break; + case 2: + message.allowPlaybackInterruption = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PlayAudio message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio} PlayAudio + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PlayAudio.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PlayAudio message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PlayAudio.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.audioUri != null && message.hasOwnProperty("audioUri")) + if (!$util.isString(message.audioUri)) + return "audioUri: string expected"; + if (message.allowPlaybackInterruption != null && message.hasOwnProperty("allowPlaybackInterruption")) + if (typeof message.allowPlaybackInterruption !== "boolean") + return "allowPlaybackInterruption: boolean expected"; + return null; + }; + + /** + * Creates a PlayAudio message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio} PlayAudio + */ + PlayAudio.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio(); + if (object.audioUri != null) + message.audioUri = String(object.audioUri); + if (object.allowPlaybackInterruption != null) + message.allowPlaybackInterruption = Boolean(object.allowPlaybackInterruption); + return message; + }; + + /** + * Creates a plain object from a PlayAudio message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio} message PlayAudio + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PlayAudio.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.audioUri = ""; + object.allowPlaybackInterruption = false; + } + if (message.audioUri != null && message.hasOwnProperty("audioUri")) + object.audioUri = message.audioUri; + if (message.allowPlaybackInterruption != null && message.hasOwnProperty("allowPlaybackInterruption")) + object.allowPlaybackInterruption = message.allowPlaybackInterruption; + return object; + }; + + /** + * Converts this PlayAudio to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio + * @instance + * @returns {Object.} JSON object + */ + PlayAudio.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * Encodes the specified EndInteraction message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IEndInteraction} message EndInteraction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EndInteraction.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; + return PlayAudio; + })(); + + return ResponseMessage; + })(); + + v3beta1.SecuritySettingsService = (function() { + + /** + * Constructs a new SecuritySettingsService service. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents a SecuritySettingsService + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function SecuritySettingsService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (SecuritySettingsService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = SecuritySettingsService; + + /** + * Creates new SecuritySettingsService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {SecuritySettingsService} RPC service. Useful where requests and/or responses are streamed. + */ + SecuritySettingsService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService#createSecuritySettings}. + * @memberof google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService + * @typedef CreateSecuritySettingsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3beta1.SecuritySettings} [response] SecuritySettings + */ + + /** + * Calls CreateSecuritySettings. + * @function createSecuritySettings + * @memberof google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.ICreateSecuritySettingsRequest} request CreateSecuritySettingsRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService.CreateSecuritySettingsCallback} callback Node-style callback called with the error, if any, and SecuritySettings + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SecuritySettingsService.prototype.createSecuritySettings = function createSecuritySettings(request, callback) { + return this.rpcCall(createSecuritySettings, $root.google.cloud.dialogflow.cx.v3beta1.CreateSecuritySettingsRequest, $root.google.cloud.dialogflow.cx.v3beta1.SecuritySettings, request, callback); + }, "name", { value: "CreateSecuritySettings" }); + + /** + * Calls CreateSecuritySettings. + * @function createSecuritySettings + * @memberof google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.ICreateSecuritySettingsRequest} request CreateSecuritySettingsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService#getSecuritySettings}. + * @memberof google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService + * @typedef GetSecuritySettingsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3beta1.SecuritySettings} [response] SecuritySettings + */ + + /** + * Calls GetSecuritySettings. + * @function getSecuritySettings + * @memberof google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IGetSecuritySettingsRequest} request GetSecuritySettingsRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService.GetSecuritySettingsCallback} callback Node-style callback called with the error, if any, and SecuritySettings + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SecuritySettingsService.prototype.getSecuritySettings = function getSecuritySettings(request, callback) { + return this.rpcCall(getSecuritySettings, $root.google.cloud.dialogflow.cx.v3beta1.GetSecuritySettingsRequest, $root.google.cloud.dialogflow.cx.v3beta1.SecuritySettings, request, callback); + }, "name", { value: "GetSecuritySettings" }); + + /** + * Calls GetSecuritySettings. + * @function getSecuritySettings + * @memberof google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IGetSecuritySettingsRequest} request GetSecuritySettingsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService#updateSecuritySettings}. + * @memberof google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService + * @typedef UpdateSecuritySettingsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3beta1.SecuritySettings} [response] SecuritySettings + */ + + /** + * Calls UpdateSecuritySettings. + * @function updateSecuritySettings + * @memberof google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateSecuritySettingsRequest} request UpdateSecuritySettingsRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService.UpdateSecuritySettingsCallback} callback Node-style callback called with the error, if any, and SecuritySettings + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SecuritySettingsService.prototype.updateSecuritySettings = function updateSecuritySettings(request, callback) { + return this.rpcCall(updateSecuritySettings, $root.google.cloud.dialogflow.cx.v3beta1.UpdateSecuritySettingsRequest, $root.google.cloud.dialogflow.cx.v3beta1.SecuritySettings, request, callback); + }, "name", { value: "UpdateSecuritySettings" }); + + /** + * Calls UpdateSecuritySettings. + * @function updateSecuritySettings + * @memberof google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateSecuritySettingsRequest} request UpdateSecuritySettingsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService#listSecuritySettings}. + * @memberof google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService + * @typedef ListSecuritySettingsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsResponse} [response] ListSecuritySettingsResponse + */ + + /** + * Calls ListSecuritySettings. + * @function listSecuritySettings + * @memberof google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IListSecuritySettingsRequest} request ListSecuritySettingsRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService.ListSecuritySettingsCallback} callback Node-style callback called with the error, if any, and ListSecuritySettingsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SecuritySettingsService.prototype.listSecuritySettings = function listSecuritySettings(request, callback) { + return this.rpcCall(listSecuritySettings, $root.google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsRequest, $root.google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsResponse, request, callback); + }, "name", { value: "ListSecuritySettings" }); + + /** + * Calls ListSecuritySettings. + * @function listSecuritySettings + * @memberof google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IListSecuritySettingsRequest} request ListSecuritySettingsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService#deleteSecuritySettings}. + * @memberof google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService + * @typedef DeleteSecuritySettingsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteSecuritySettings. + * @function deleteSecuritySettings + * @memberof google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteSecuritySettingsRequest} request DeleteSecuritySettingsRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService.DeleteSecuritySettingsCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SecuritySettingsService.prototype.deleteSecuritySettings = function deleteSecuritySettings(request, callback) { + return this.rpcCall(deleteSecuritySettings, $root.google.cloud.dialogflow.cx.v3beta1.DeleteSecuritySettingsRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteSecuritySettings" }); + + /** + * Calls DeleteSecuritySettings. + * @function deleteSecuritySettings + * @memberof google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteSecuritySettingsRequest} request DeleteSecuritySettingsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return SecuritySettingsService; + })(); + + v3beta1.GetSecuritySettingsRequest = (function() { + + /** + * Properties of a GetSecuritySettingsRequest. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @interface IGetSecuritySettingsRequest + * @property {string|null} [name] GetSecuritySettingsRequest name + */ + + /** + * Constructs a new GetSecuritySettingsRequest. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents a GetSecuritySettingsRequest. + * @implements IGetSecuritySettingsRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.IGetSecuritySettingsRequest=} [properties] Properties to set + */ + function GetSecuritySettingsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetSecuritySettingsRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3beta1.GetSecuritySettingsRequest + * @instance + */ + GetSecuritySettingsRequest.prototype.name = ""; + + /** + * Creates a new GetSecuritySettingsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.GetSecuritySettingsRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IGetSecuritySettingsRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.GetSecuritySettingsRequest} GetSecuritySettingsRequest instance + */ + GetSecuritySettingsRequest.create = function create(properties) { + return new GetSecuritySettingsRequest(properties); + }; + + /** + * Encodes the specified GetSecuritySettingsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetSecuritySettingsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.GetSecuritySettingsRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IGetSecuritySettingsRequest} message GetSecuritySettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetSecuritySettingsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetSecuritySettingsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetSecuritySettingsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.GetSecuritySettingsRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IGetSecuritySettingsRequest} message GetSecuritySettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetSecuritySettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetSecuritySettingsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.GetSecuritySettingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.GetSecuritySettingsRequest} GetSecuritySettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetSecuritySettingsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.GetSecuritySettingsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetSecuritySettingsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.GetSecuritySettingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.GetSecuritySettingsRequest} GetSecuritySettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetSecuritySettingsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetSecuritySettingsRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.GetSecuritySettingsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetSecuritySettingsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetSecuritySettingsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.GetSecuritySettingsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.GetSecuritySettingsRequest} GetSecuritySettingsRequest + */ + GetSecuritySettingsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.GetSecuritySettingsRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.GetSecuritySettingsRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetSecuritySettingsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.GetSecuritySettingsRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.GetSecuritySettingsRequest} message GetSecuritySettingsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetSecuritySettingsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetSecuritySettingsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.GetSecuritySettingsRequest + * @instance + * @returns {Object.} JSON object + */ + GetSecuritySettingsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetSecuritySettingsRequest; + })(); + + v3beta1.UpdateSecuritySettingsRequest = (function() { + + /** + * Properties of an UpdateSecuritySettingsRequest. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @interface IUpdateSecuritySettingsRequest + * @property {google.cloud.dialogflow.cx.v3beta1.ISecuritySettings|null} [securitySettings] UpdateSecuritySettingsRequest securitySettings + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateSecuritySettingsRequest updateMask + */ + + /** + * Constructs a new UpdateSecuritySettingsRequest. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents an UpdateSecuritySettingsRequest. + * @implements IUpdateSecuritySettingsRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateSecuritySettingsRequest=} [properties] Properties to set + */ + function UpdateSecuritySettingsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateSecuritySettingsRequest securitySettings. + * @member {google.cloud.dialogflow.cx.v3beta1.ISecuritySettings|null|undefined} securitySettings + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateSecuritySettingsRequest + * @instance + */ + UpdateSecuritySettingsRequest.prototype.securitySettings = null; + + /** + * UpdateSecuritySettingsRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateSecuritySettingsRequest + * @instance + */ + UpdateSecuritySettingsRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateSecuritySettingsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateSecuritySettingsRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateSecuritySettingsRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateSecuritySettingsRequest} UpdateSecuritySettingsRequest instance + */ + UpdateSecuritySettingsRequest.create = function create(properties) { + return new UpdateSecuritySettingsRequest(properties); + }; + + /** + * Encodes the specified UpdateSecuritySettingsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateSecuritySettingsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateSecuritySettingsRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateSecuritySettingsRequest} message UpdateSecuritySettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateSecuritySettingsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.securitySettings != null && Object.hasOwnProperty.call(message, "securitySettings")) + $root.google.cloud.dialogflow.cx.v3beta1.SecuritySettings.encode(message.securitySettings, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateSecuritySettingsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateSecuritySettingsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateSecuritySettingsRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateSecuritySettingsRequest} message UpdateSecuritySettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateSecuritySettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateSecuritySettingsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateSecuritySettingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateSecuritySettingsRequest} UpdateSecuritySettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateSecuritySettingsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.UpdateSecuritySettingsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.securitySettings = $root.google.cloud.dialogflow.cx.v3beta1.SecuritySettings.decode(reader, reader.uint32()); + break; + case 2: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateSecuritySettingsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateSecuritySettingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateSecuritySettingsRequest} UpdateSecuritySettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateSecuritySettingsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateSecuritySettingsRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateSecuritySettingsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateSecuritySettingsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.securitySettings != null && message.hasOwnProperty("securitySettings")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.SecuritySettings.verify(message.securitySettings); + if (error) + return "securitySettings." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + return null; + }; + + /** + * Creates an UpdateSecuritySettingsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateSecuritySettingsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateSecuritySettingsRequest} UpdateSecuritySettingsRequest + */ + UpdateSecuritySettingsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.UpdateSecuritySettingsRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.UpdateSecuritySettingsRequest(); + if (object.securitySettings != null) { + if (typeof object.securitySettings !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.UpdateSecuritySettingsRequest.securitySettings: object expected"); + message.securitySettings = $root.google.cloud.dialogflow.cx.v3beta1.SecuritySettings.fromObject(object.securitySettings); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.UpdateSecuritySettingsRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateSecuritySettingsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateSecuritySettingsRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.UpdateSecuritySettingsRequest} message UpdateSecuritySettingsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateSecuritySettingsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.securitySettings = null; + object.updateMask = null; + } + if (message.securitySettings != null && message.hasOwnProperty("securitySettings")) + object.securitySettings = $root.google.cloud.dialogflow.cx.v3beta1.SecuritySettings.toObject(message.securitySettings, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateSecuritySettingsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateSecuritySettingsRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateSecuritySettingsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UpdateSecuritySettingsRequest; + })(); + + v3beta1.ListSecuritySettingsRequest = (function() { + + /** + * Properties of a ListSecuritySettingsRequest. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @interface IListSecuritySettingsRequest + * @property {string|null} [parent] ListSecuritySettingsRequest parent + * @property {number|null} [pageSize] ListSecuritySettingsRequest pageSize + * @property {string|null} [pageToken] ListSecuritySettingsRequest pageToken + */ + + /** + * Constructs a new ListSecuritySettingsRequest. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents a ListSecuritySettingsRequest. + * @implements IListSecuritySettingsRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.IListSecuritySettingsRequest=} [properties] Properties to set + */ + function ListSecuritySettingsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListSecuritySettingsRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsRequest + * @instance + */ + ListSecuritySettingsRequest.prototype.parent = ""; + + /** + * ListSecuritySettingsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsRequest + * @instance + */ + ListSecuritySettingsRequest.prototype.pageSize = 0; + + /** + * ListSecuritySettingsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsRequest + * @instance + */ + ListSecuritySettingsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListSecuritySettingsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IListSecuritySettingsRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsRequest} ListSecuritySettingsRequest instance + */ + ListSecuritySettingsRequest.create = function create(properties) { + return new ListSecuritySettingsRequest(properties); + }; + + /** + * Encodes the specified ListSecuritySettingsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IListSecuritySettingsRequest} message ListSecuritySettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSecuritySettingsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListSecuritySettingsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IListSecuritySettingsRequest} message ListSecuritySettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSecuritySettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListSecuritySettingsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsRequest} ListSecuritySettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSecuritySettingsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListSecuritySettingsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsRequest} ListSecuritySettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSecuritySettingsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListSecuritySettingsRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListSecuritySettingsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListSecuritySettingsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsRequest} ListSecuritySettingsRequest + */ + ListSecuritySettingsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListSecuritySettingsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsRequest} message ListSecuritySettingsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListSecuritySettingsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListSecuritySettingsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsRequest + * @instance + * @returns {Object.} JSON object + */ + ListSecuritySettingsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListSecuritySettingsRequest; + })(); + + v3beta1.ListSecuritySettingsResponse = (function() { + + /** + * Properties of a ListSecuritySettingsResponse. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @interface IListSecuritySettingsResponse + * @property {Array.|null} [securitySettings] ListSecuritySettingsResponse securitySettings + * @property {string|null} [nextPageToken] ListSecuritySettingsResponse nextPageToken + */ + + /** + * Constructs a new ListSecuritySettingsResponse. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents a ListSecuritySettingsResponse. + * @implements IListSecuritySettingsResponse + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.IListSecuritySettingsResponse=} [properties] Properties to set + */ + function ListSecuritySettingsResponse(properties) { + this.securitySettings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListSecuritySettingsResponse securitySettings. + * @member {Array.} securitySettings + * @memberof google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsResponse + * @instance + */ + ListSecuritySettingsResponse.prototype.securitySettings = $util.emptyArray; + + /** + * ListSecuritySettingsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsResponse + * @instance + */ + ListSecuritySettingsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListSecuritySettingsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsResponse + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IListSecuritySettingsResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsResponse} ListSecuritySettingsResponse instance + */ + ListSecuritySettingsResponse.create = function create(properties) { + return new ListSecuritySettingsResponse(properties); + }; + + /** + * Encodes the specified ListSecuritySettingsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsResponse + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IListSecuritySettingsResponse} message ListSecuritySettingsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSecuritySettingsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.securitySettings != null && message.securitySettings.length) + for (var i = 0; i < message.securitySettings.length; ++i) + $root.google.cloud.dialogflow.cx.v3beta1.SecuritySettings.encode(message.securitySettings[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListSecuritySettingsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsResponse + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IListSecuritySettingsResponse} message ListSecuritySettingsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSecuritySettingsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListSecuritySettingsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsResponse} ListSecuritySettingsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSecuritySettingsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.securitySettings && message.securitySettings.length)) + message.securitySettings = []; + message.securitySettings.push($root.google.cloud.dialogflow.cx.v3beta1.SecuritySettings.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListSecuritySettingsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsResponse} ListSecuritySettingsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSecuritySettingsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListSecuritySettingsResponse message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListSecuritySettingsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.securitySettings != null && message.hasOwnProperty("securitySettings")) { + if (!Array.isArray(message.securitySettings)) + return "securitySettings: array expected"; + for (var i = 0; i < message.securitySettings.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.SecuritySettings.verify(message.securitySettings[i]); + if (error) + return "securitySettings." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListSecuritySettingsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsResponse} ListSecuritySettingsResponse + */ + ListSecuritySettingsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsResponse) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsResponse(); + if (object.securitySettings) { + if (!Array.isArray(object.securitySettings)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsResponse.securitySettings: array expected"); + message.securitySettings = []; + for (var i = 0; i < object.securitySettings.length; ++i) { + if (typeof object.securitySettings[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsResponse.securitySettings: object expected"); + message.securitySettings[i] = $root.google.cloud.dialogflow.cx.v3beta1.SecuritySettings.fromObject(object.securitySettings[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListSecuritySettingsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsResponse + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsResponse} message ListSecuritySettingsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListSecuritySettingsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.securitySettings = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.securitySettings && message.securitySettings.length) { + object.securitySettings = []; + for (var j = 0; j < message.securitySettings.length; ++j) + object.securitySettings[j] = $root.google.cloud.dialogflow.cx.v3beta1.SecuritySettings.toObject(message.securitySettings[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListSecuritySettingsResponse to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsResponse + * @instance + * @returns {Object.} JSON object + */ + ListSecuritySettingsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListSecuritySettingsResponse; + })(); + + v3beta1.CreateSecuritySettingsRequest = (function() { + + /** + * Properties of a CreateSecuritySettingsRequest. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @interface ICreateSecuritySettingsRequest + * @property {string|null} [parent] CreateSecuritySettingsRequest parent + * @property {google.cloud.dialogflow.cx.v3beta1.ISecuritySettings|null} [securitySettings] CreateSecuritySettingsRequest securitySettings + */ + + /** + * Constructs a new CreateSecuritySettingsRequest. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents a CreateSecuritySettingsRequest. + * @implements ICreateSecuritySettingsRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.ICreateSecuritySettingsRequest=} [properties] Properties to set + */ + function CreateSecuritySettingsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateSecuritySettingsRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateSecuritySettingsRequest + * @instance + */ + CreateSecuritySettingsRequest.prototype.parent = ""; + + /** + * CreateSecuritySettingsRequest securitySettings. + * @member {google.cloud.dialogflow.cx.v3beta1.ISecuritySettings|null|undefined} securitySettings + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateSecuritySettingsRequest + * @instance + */ + CreateSecuritySettingsRequest.prototype.securitySettings = null; + + /** + * Creates a new CreateSecuritySettingsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateSecuritySettingsRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ICreateSecuritySettingsRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.CreateSecuritySettingsRequest} CreateSecuritySettingsRequest instance + */ + CreateSecuritySettingsRequest.create = function create(properties) { + return new CreateSecuritySettingsRequest(properties); + }; + + /** + * Encodes the specified CreateSecuritySettingsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateSecuritySettingsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateSecuritySettingsRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ICreateSecuritySettingsRequest} message CreateSecuritySettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateSecuritySettingsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.securitySettings != null && Object.hasOwnProperty.call(message, "securitySettings")) + $root.google.cloud.dialogflow.cx.v3beta1.SecuritySettings.encode(message.securitySettings, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateSecuritySettingsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateSecuritySettingsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateSecuritySettingsRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ICreateSecuritySettingsRequest} message CreateSecuritySettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateSecuritySettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateSecuritySettingsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateSecuritySettingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.CreateSecuritySettingsRequest} CreateSecuritySettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateSecuritySettingsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.CreateSecuritySettingsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.securitySettings = $root.google.cloud.dialogflow.cx.v3beta1.SecuritySettings.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateSecuritySettingsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateSecuritySettingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.CreateSecuritySettingsRequest} CreateSecuritySettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateSecuritySettingsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateSecuritySettingsRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateSecuritySettingsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateSecuritySettingsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.securitySettings != null && message.hasOwnProperty("securitySettings")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.SecuritySettings.verify(message.securitySettings); + if (error) + return "securitySettings." + error; + } + return null; + }; + + /** + * Creates a CreateSecuritySettingsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateSecuritySettingsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.CreateSecuritySettingsRequest} CreateSecuritySettingsRequest + */ + CreateSecuritySettingsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.CreateSecuritySettingsRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.CreateSecuritySettingsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.securitySettings != null) { + if (typeof object.securitySettings !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.CreateSecuritySettingsRequest.securitySettings: object expected"); + message.securitySettings = $root.google.cloud.dialogflow.cx.v3beta1.SecuritySettings.fromObject(object.securitySettings); + } + return message; + }; + + /** + * Creates a plain object from a CreateSecuritySettingsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateSecuritySettingsRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.CreateSecuritySettingsRequest} message CreateSecuritySettingsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateSecuritySettingsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.securitySettings = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.securitySettings != null && message.hasOwnProperty("securitySettings")) + object.securitySettings = $root.google.cloud.dialogflow.cx.v3beta1.SecuritySettings.toObject(message.securitySettings, options); + return object; + }; + + /** + * Converts this CreateSecuritySettingsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateSecuritySettingsRequest + * @instance + * @returns {Object.} JSON object + */ + CreateSecuritySettingsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateSecuritySettingsRequest; + })(); + + v3beta1.DeleteSecuritySettingsRequest = (function() { + + /** + * Properties of a DeleteSecuritySettingsRequest. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @interface IDeleteSecuritySettingsRequest + * @property {string|null} [name] DeleteSecuritySettingsRequest name + */ + + /** + * Constructs a new DeleteSecuritySettingsRequest. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents a DeleteSecuritySettingsRequest. + * @implements IDeleteSecuritySettingsRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteSecuritySettingsRequest=} [properties] Properties to set + */ + function DeleteSecuritySettingsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteSecuritySettingsRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteSecuritySettingsRequest + * @instance + */ + DeleteSecuritySettingsRequest.prototype.name = ""; + + /** + * Creates a new DeleteSecuritySettingsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteSecuritySettingsRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteSecuritySettingsRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteSecuritySettingsRequest} DeleteSecuritySettingsRequest instance + */ + DeleteSecuritySettingsRequest.create = function create(properties) { + return new DeleteSecuritySettingsRequest(properties); + }; + + /** + * Encodes the specified DeleteSecuritySettingsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeleteSecuritySettingsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteSecuritySettingsRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteSecuritySettingsRequest} message DeleteSecuritySettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteSecuritySettingsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteSecuritySettingsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeleteSecuritySettingsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteSecuritySettingsRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteSecuritySettingsRequest} message DeleteSecuritySettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteSecuritySettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteSecuritySettingsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteSecuritySettingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteSecuritySettingsRequest} DeleteSecuritySettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteSecuritySettingsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.DeleteSecuritySettingsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteSecuritySettingsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteSecuritySettingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteSecuritySettingsRequest} DeleteSecuritySettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteSecuritySettingsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteSecuritySettingsRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteSecuritySettingsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteSecuritySettingsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteSecuritySettingsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteSecuritySettingsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteSecuritySettingsRequest} DeleteSecuritySettingsRequest + */ + DeleteSecuritySettingsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.DeleteSecuritySettingsRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.DeleteSecuritySettingsRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteSecuritySettingsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteSecuritySettingsRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.DeleteSecuritySettingsRequest} message DeleteSecuritySettingsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteSecuritySettingsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteSecuritySettingsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteSecuritySettingsRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteSecuritySettingsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteSecuritySettingsRequest; + })(); + + v3beta1.SecuritySettings = (function() { + + /** + * Properties of a SecuritySettings. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @interface ISecuritySettings + * @property {string|null} [name] SecuritySettings name + * @property {string|null} [displayName] SecuritySettings displayName + * @property {google.cloud.dialogflow.cx.v3beta1.SecuritySettings.RedactionStrategy|null} [redactionStrategy] SecuritySettings redactionStrategy + * @property {google.cloud.dialogflow.cx.v3beta1.SecuritySettings.RedactionScope|null} [redactionScope] SecuritySettings redactionScope + * @property {string|null} [inspectTemplate] SecuritySettings inspectTemplate + * @property {number|null} [retentionWindowDays] SecuritySettings retentionWindowDays + * @property {Array.|null} [purgeDataTypes] SecuritySettings purgeDataTypes + */ + + /** + * Constructs a new SecuritySettings. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents a SecuritySettings. + * @implements ISecuritySettings + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.ISecuritySettings=} [properties] Properties to set + */ + function SecuritySettings(properties) { + this.purgeDataTypes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SecuritySettings name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3beta1.SecuritySettings + * @instance + */ + SecuritySettings.prototype.name = ""; + + /** + * SecuritySettings displayName. + * @member {string} displayName + * @memberof google.cloud.dialogflow.cx.v3beta1.SecuritySettings + * @instance + */ + SecuritySettings.prototype.displayName = ""; + + /** + * SecuritySettings redactionStrategy. + * @member {google.cloud.dialogflow.cx.v3beta1.SecuritySettings.RedactionStrategy} redactionStrategy + * @memberof google.cloud.dialogflow.cx.v3beta1.SecuritySettings + * @instance + */ + SecuritySettings.prototype.redactionStrategy = 0; + + /** + * SecuritySettings redactionScope. + * @member {google.cloud.dialogflow.cx.v3beta1.SecuritySettings.RedactionScope} redactionScope + * @memberof google.cloud.dialogflow.cx.v3beta1.SecuritySettings + * @instance + */ + SecuritySettings.prototype.redactionScope = 0; + + /** + * SecuritySettings inspectTemplate. + * @member {string} inspectTemplate + * @memberof google.cloud.dialogflow.cx.v3beta1.SecuritySettings + * @instance + */ + SecuritySettings.prototype.inspectTemplate = ""; + + /** + * SecuritySettings retentionWindowDays. + * @member {number} retentionWindowDays + * @memberof google.cloud.dialogflow.cx.v3beta1.SecuritySettings + * @instance + */ + SecuritySettings.prototype.retentionWindowDays = 0; + + /** + * SecuritySettings purgeDataTypes. + * @member {Array.} purgeDataTypes + * @memberof google.cloud.dialogflow.cx.v3beta1.SecuritySettings + * @instance + */ + SecuritySettings.prototype.purgeDataTypes = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SecuritySettings dataRetention. + * @member {"retentionWindowDays"|undefined} dataRetention + * @memberof google.cloud.dialogflow.cx.v3beta1.SecuritySettings + * @instance + */ + Object.defineProperty(SecuritySettings.prototype, "dataRetention", { + get: $util.oneOfGetter($oneOfFields = ["retentionWindowDays"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SecuritySettings instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.SecuritySettings + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ISecuritySettings=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.SecuritySettings} SecuritySettings instance + */ + SecuritySettings.create = function create(properties) { + return new SecuritySettings(properties); + }; + + /** + * Encodes the specified SecuritySettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SecuritySettings.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.SecuritySettings + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ISecuritySettings} message SecuritySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SecuritySettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.redactionStrategy != null && Object.hasOwnProperty.call(message, "redactionStrategy")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.redactionStrategy); + if (message.redactionScope != null && Object.hasOwnProperty.call(message, "redactionScope")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.redactionScope); + if (message.retentionWindowDays != null && Object.hasOwnProperty.call(message, "retentionWindowDays")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.retentionWindowDays); + if (message.purgeDataTypes != null && message.purgeDataTypes.length) { + writer.uint32(/* id 8, wireType 2 =*/66).fork(); + for (var i = 0; i < message.purgeDataTypes.length; ++i) + writer.int32(message.purgeDataTypes[i]); + writer.ldelim(); + } + if (message.inspectTemplate != null && Object.hasOwnProperty.call(message, "inspectTemplate")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.inspectTemplate); + return writer; + }; + + /** + * Encodes the specified SecuritySettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SecuritySettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.SecuritySettings + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ISecuritySettings} message SecuritySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SecuritySettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SecuritySettings message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.SecuritySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.SecuritySettings} SecuritySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SecuritySettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.SecuritySettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.displayName = reader.string(); + break; + case 3: + message.redactionStrategy = reader.int32(); + break; + case 4: + message.redactionScope = reader.int32(); + break; + case 9: + message.inspectTemplate = reader.string(); + break; + case 6: + message.retentionWindowDays = reader.int32(); + break; + case 8: + if (!(message.purgeDataTypes && message.purgeDataTypes.length)) + message.purgeDataTypes = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.purgeDataTypes.push(reader.int32()); + } else + message.purgeDataTypes.push(reader.int32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SecuritySettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.SecuritySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.SecuritySettings} SecuritySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SecuritySettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SecuritySettings message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.SecuritySettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SecuritySettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.redactionStrategy != null && message.hasOwnProperty("redactionStrategy")) + switch (message.redactionStrategy) { + default: + return "redactionStrategy: enum value expected"; + case 0: + case 1: + break; + } + if (message.redactionScope != null && message.hasOwnProperty("redactionScope")) + switch (message.redactionScope) { + default: + return "redactionScope: enum value expected"; + case 0: + case 2: + break; + } + if (message.inspectTemplate != null && message.hasOwnProperty("inspectTemplate")) + if (!$util.isString(message.inspectTemplate)) + return "inspectTemplate: string expected"; + if (message.retentionWindowDays != null && message.hasOwnProperty("retentionWindowDays")) { + properties.dataRetention = 1; + if (!$util.isInteger(message.retentionWindowDays)) + return "retentionWindowDays: integer expected"; + } + if (message.purgeDataTypes != null && message.hasOwnProperty("purgeDataTypes")) { + if (!Array.isArray(message.purgeDataTypes)) + return "purgeDataTypes: array expected"; + for (var i = 0; i < message.purgeDataTypes.length; ++i) + switch (message.purgeDataTypes[i]) { + default: + return "purgeDataTypes: enum value[] expected"; + case 0: + case 1: + break; + } + } + return null; + }; + + /** + * Creates a SecuritySettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.SecuritySettings + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.SecuritySettings} SecuritySettings + */ + SecuritySettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.SecuritySettings) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.SecuritySettings(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + switch (object.redactionStrategy) { + case "REDACTION_STRATEGY_UNSPECIFIED": + case 0: + message.redactionStrategy = 0; + break; + case "REDACT_WITH_SERVICE": + case 1: + message.redactionStrategy = 1; + break; + } + switch (object.redactionScope) { + case "REDACTION_SCOPE_UNSPECIFIED": + case 0: + message.redactionScope = 0; + break; + case "REDACT_DISK_STORAGE": + case 2: + message.redactionScope = 2; + break; + } + if (object.inspectTemplate != null) + message.inspectTemplate = String(object.inspectTemplate); + if (object.retentionWindowDays != null) + message.retentionWindowDays = object.retentionWindowDays | 0; + if (object.purgeDataTypes) { + if (!Array.isArray(object.purgeDataTypes)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.SecuritySettings.purgeDataTypes: array expected"); + message.purgeDataTypes = []; + for (var i = 0; i < object.purgeDataTypes.length; ++i) + switch (object.purgeDataTypes[i]) { + default: + case "PURGE_DATA_TYPE_UNSPECIFIED": + case 0: + message.purgeDataTypes[i] = 0; + break; + case "DIALOGFLOW_HISTORY": + case 1: + message.purgeDataTypes[i] = 1; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a SecuritySettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.SecuritySettings + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.SecuritySettings} message SecuritySettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SecuritySettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.purgeDataTypes = []; + if (options.defaults) { + object.name = ""; + object.displayName = ""; + object.redactionStrategy = options.enums === String ? "REDACTION_STRATEGY_UNSPECIFIED" : 0; + object.redactionScope = options.enums === String ? "REDACTION_SCOPE_UNSPECIFIED" : 0; + object.inspectTemplate = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.redactionStrategy != null && message.hasOwnProperty("redactionStrategy")) + object.redactionStrategy = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.SecuritySettings.RedactionStrategy[message.redactionStrategy] : message.redactionStrategy; + if (message.redactionScope != null && message.hasOwnProperty("redactionScope")) + object.redactionScope = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.SecuritySettings.RedactionScope[message.redactionScope] : message.redactionScope; + if (message.retentionWindowDays != null && message.hasOwnProperty("retentionWindowDays")) { + object.retentionWindowDays = message.retentionWindowDays; + if (options.oneofs) + object.dataRetention = "retentionWindowDays"; + } + if (message.purgeDataTypes && message.purgeDataTypes.length) { + object.purgeDataTypes = []; + for (var j = 0; j < message.purgeDataTypes.length; ++j) + object.purgeDataTypes[j] = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.SecuritySettings.PurgeDataType[message.purgeDataTypes[j]] : message.purgeDataTypes[j]; + } + if (message.inspectTemplate != null && message.hasOwnProperty("inspectTemplate")) + object.inspectTemplate = message.inspectTemplate; + return object; + }; + + /** + * Converts this SecuritySettings to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.SecuritySettings + * @instance + * @returns {Object.} JSON object + */ + SecuritySettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * RedactionStrategy enum. + * @name google.cloud.dialogflow.cx.v3beta1.SecuritySettings.RedactionStrategy + * @enum {number} + * @property {number} REDACTION_STRATEGY_UNSPECIFIED=0 REDACTION_STRATEGY_UNSPECIFIED value + * @property {number} REDACT_WITH_SERVICE=1 REDACT_WITH_SERVICE value + */ + SecuritySettings.RedactionStrategy = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "REDACTION_STRATEGY_UNSPECIFIED"] = 0; + values[valuesById[1] = "REDACT_WITH_SERVICE"] = 1; + return values; + })(); + + /** + * RedactionScope enum. + * @name google.cloud.dialogflow.cx.v3beta1.SecuritySettings.RedactionScope + * @enum {number} + * @property {number} REDACTION_SCOPE_UNSPECIFIED=0 REDACTION_SCOPE_UNSPECIFIED value + * @property {number} REDACT_DISK_STORAGE=2 REDACT_DISK_STORAGE value + */ + SecuritySettings.RedactionScope = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "REDACTION_SCOPE_UNSPECIFIED"] = 0; + values[valuesById[2] = "REDACT_DISK_STORAGE"] = 2; + return values; + })(); + + /** + * PurgeDataType enum. + * @name google.cloud.dialogflow.cx.v3beta1.SecuritySettings.PurgeDataType + * @enum {number} + * @property {number} PURGE_DATA_TYPE_UNSPECIFIED=0 PURGE_DATA_TYPE_UNSPECIFIED value + * @property {number} DIALOGFLOW_HISTORY=1 DIALOGFLOW_HISTORY value + */ + SecuritySettings.PurgeDataType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PURGE_DATA_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DIALOGFLOW_HISTORY"] = 1; + return values; + })(); + + return SecuritySettings; + })(); + + /** + * AudioEncoding enum. + * @name google.cloud.dialogflow.cx.v3beta1.AudioEncoding + * @enum {number} + * @property {number} AUDIO_ENCODING_UNSPECIFIED=0 AUDIO_ENCODING_UNSPECIFIED value + * @property {number} AUDIO_ENCODING_LINEAR_16=1 AUDIO_ENCODING_LINEAR_16 value + * @property {number} AUDIO_ENCODING_FLAC=2 AUDIO_ENCODING_FLAC value + * @property {number} AUDIO_ENCODING_MULAW=3 AUDIO_ENCODING_MULAW value + * @property {number} AUDIO_ENCODING_AMR=4 AUDIO_ENCODING_AMR value + * @property {number} AUDIO_ENCODING_AMR_WB=5 AUDIO_ENCODING_AMR_WB value + * @property {number} AUDIO_ENCODING_OGG_OPUS=6 AUDIO_ENCODING_OGG_OPUS value + * @property {number} AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE=7 AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE value + */ + v3beta1.AudioEncoding = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "AUDIO_ENCODING_UNSPECIFIED"] = 0; + values[valuesById[1] = "AUDIO_ENCODING_LINEAR_16"] = 1; + values[valuesById[2] = "AUDIO_ENCODING_FLAC"] = 2; + values[valuesById[3] = "AUDIO_ENCODING_MULAW"] = 3; + values[valuesById[4] = "AUDIO_ENCODING_AMR"] = 4; + values[valuesById[5] = "AUDIO_ENCODING_AMR_WB"] = 5; + values[valuesById[6] = "AUDIO_ENCODING_OGG_OPUS"] = 6; + values[valuesById[7] = "AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE"] = 7; + return values; + })(); + + v3beta1.SpeechWordInfo = (function() { + + /** + * Properties of a SpeechWordInfo. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @interface ISpeechWordInfo + * @property {string|null} [word] SpeechWordInfo word + * @property {google.protobuf.IDuration|null} [startOffset] SpeechWordInfo startOffset + * @property {google.protobuf.IDuration|null} [endOffset] SpeechWordInfo endOffset + * @property {number|null} [confidence] SpeechWordInfo confidence + */ + + /** + * Constructs a new SpeechWordInfo. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents a SpeechWordInfo. + * @implements ISpeechWordInfo + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.ISpeechWordInfo=} [properties] Properties to set + */ + function SpeechWordInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SpeechWordInfo word. + * @member {string} word + * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo + * @instance + */ + SpeechWordInfo.prototype.word = ""; + + /** + * SpeechWordInfo startOffset. + * @member {google.protobuf.IDuration|null|undefined} startOffset + * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo + * @instance + */ + SpeechWordInfo.prototype.startOffset = null; + + /** + * SpeechWordInfo endOffset. + * @member {google.protobuf.IDuration|null|undefined} endOffset + * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo + * @instance + */ + SpeechWordInfo.prototype.endOffset = null; + + /** + * SpeechWordInfo confidence. + * @member {number} confidence + * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo + * @instance + */ + SpeechWordInfo.prototype.confidence = 0; + + /** + * Creates a new SpeechWordInfo instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ISpeechWordInfo=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo} SpeechWordInfo instance + */ + SpeechWordInfo.create = function create(properties) { + return new SpeechWordInfo(properties); + }; + + /** + * Encodes the specified SpeechWordInfo message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ISpeechWordInfo} message SpeechWordInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SpeechWordInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.startOffset != null && Object.hasOwnProperty.call(message, "startOffset")) + $root.google.protobuf.Duration.encode(message.startOffset, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.endOffset != null && Object.hasOwnProperty.call(message, "endOffset")) + $root.google.protobuf.Duration.encode(message.endOffset, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.word != null && Object.hasOwnProperty.call(message, "word")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.word); + if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) + writer.uint32(/* id 4, wireType 5 =*/37).float(message.confidence); + return writer; + }; + + /** + * Encodes the specified SpeechWordInfo message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ISpeechWordInfo} message SpeechWordInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SpeechWordInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SpeechWordInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo} SpeechWordInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SpeechWordInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: + message.word = reader.string(); + break; + case 1: + message.startOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 2: + message.endOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 4: + message.confidence = reader.float(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SpeechWordInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo} SpeechWordInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SpeechWordInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SpeechWordInfo message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SpeechWordInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.word != null && message.hasOwnProperty("word")) + if (!$util.isString(message.word)) + return "word: string expected"; + if (message.startOffset != null && message.hasOwnProperty("startOffset")) { + var error = $root.google.protobuf.Duration.verify(message.startOffset); + if (error) + return "startOffset." + error; + } + if (message.endOffset != null && message.hasOwnProperty("endOffset")) { + var error = $root.google.protobuf.Duration.verify(message.endOffset); + if (error) + return "endOffset." + error; + } + if (message.confidence != null && message.hasOwnProperty("confidence")) + if (typeof message.confidence !== "number") + return "confidence: number expected"; + return null; + }; + + /** + * Creates a SpeechWordInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo} SpeechWordInfo + */ + SpeechWordInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo(); + if (object.word != null) + message.word = String(object.word); + if (object.startOffset != null) { + if (typeof object.startOffset !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo.startOffset: object expected"); + message.startOffset = $root.google.protobuf.Duration.fromObject(object.startOffset); + } + if (object.endOffset != null) { + if (typeof object.endOffset !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo.endOffset: object expected"); + message.endOffset = $root.google.protobuf.Duration.fromObject(object.endOffset); + } + if (object.confidence != null) + message.confidence = Number(object.confidence); + return message; + }; + + /** + * Creates a plain object from a SpeechWordInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo} message SpeechWordInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SpeechWordInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.startOffset = null; + object.endOffset = null; + object.word = ""; + object.confidence = 0; + } + if (message.startOffset != null && message.hasOwnProperty("startOffset")) + object.startOffset = $root.google.protobuf.Duration.toObject(message.startOffset, options); + if (message.endOffset != null && message.hasOwnProperty("endOffset")) + object.endOffset = $root.google.protobuf.Duration.toObject(message.endOffset, options); + if (message.word != null && message.hasOwnProperty("word")) + object.word = message.word; + if (message.confidence != null && message.hasOwnProperty("confidence")) + object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence; + return object; + }; + + /** + * Converts this SpeechWordInfo to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo + * @instance + * @returns {Object.} JSON object + */ + SpeechWordInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SpeechWordInfo; + })(); + + v3beta1.InputAudioConfig = (function() { + + /** + * Properties of an InputAudioConfig. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @interface IInputAudioConfig + * @property {google.cloud.dialogflow.cx.v3beta1.AudioEncoding|null} [audioEncoding] InputAudioConfig audioEncoding + * @property {number|null} [sampleRateHertz] InputAudioConfig sampleRateHertz + * @property {boolean|null} [enableWordInfo] InputAudioConfig enableWordInfo + * @property {Array.|null} [phraseHints] InputAudioConfig phraseHints + * @property {string|null} [model] InputAudioConfig model + * @property {google.cloud.dialogflow.cx.v3beta1.SpeechModelVariant|null} [modelVariant] InputAudioConfig modelVariant + * @property {boolean|null} [singleUtterance] InputAudioConfig singleUtterance + */ + + /** + * Constructs a new InputAudioConfig. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents an InputAudioConfig. + * @implements IInputAudioConfig + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.IInputAudioConfig=} [properties] Properties to set + */ + function InputAudioConfig(properties) { + this.phraseHints = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * InputAudioConfig audioEncoding. + * @member {google.cloud.dialogflow.cx.v3beta1.AudioEncoding} audioEncoding + * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig + * @instance + */ + InputAudioConfig.prototype.audioEncoding = 0; + + /** + * InputAudioConfig sampleRateHertz. + * @member {number} sampleRateHertz + * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig + * @instance + */ + InputAudioConfig.prototype.sampleRateHertz = 0; - /** - * Encodes the specified EndInteraction message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IEndInteraction} message EndInteraction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EndInteraction.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * InputAudioConfig enableWordInfo. + * @member {boolean} enableWordInfo + * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig + * @instance + */ + InputAudioConfig.prototype.enableWordInfo = false; - /** - * Decodes an EndInteraction message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction} EndInteraction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EndInteraction.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } + /** + * InputAudioConfig phraseHints. + * @member {Array.} phraseHints + * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig + * @instance + */ + InputAudioConfig.prototype.phraseHints = $util.emptyArray; + + /** + * InputAudioConfig model. + * @member {string} model + * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig + * @instance + */ + InputAudioConfig.prototype.model = ""; + + /** + * InputAudioConfig modelVariant. + * @member {google.cloud.dialogflow.cx.v3beta1.SpeechModelVariant} modelVariant + * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig + * @instance + */ + InputAudioConfig.prototype.modelVariant = 0; + + /** + * InputAudioConfig singleUtterance. + * @member {boolean} singleUtterance + * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig + * @instance + */ + InputAudioConfig.prototype.singleUtterance = false; + + /** + * Creates a new InputAudioConfig instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IInputAudioConfig=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.InputAudioConfig} InputAudioConfig instance + */ + InputAudioConfig.create = function create(properties) { + return new InputAudioConfig(properties); + }; + + /** + * Encodes the specified InputAudioConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.InputAudioConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IInputAudioConfig} message InputAudioConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InputAudioConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.audioEncoding != null && Object.hasOwnProperty.call(message, "audioEncoding")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.audioEncoding); + if (message.sampleRateHertz != null && Object.hasOwnProperty.call(message, "sampleRateHertz")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.sampleRateHertz); + if (message.phraseHints != null && message.phraseHints.length) + for (var i = 0; i < message.phraseHints.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.phraseHints[i]); + if (message.model != null && Object.hasOwnProperty.call(message, "model")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.model); + if (message.singleUtterance != null && Object.hasOwnProperty.call(message, "singleUtterance")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.singleUtterance); + if (message.modelVariant != null && Object.hasOwnProperty.call(message, "modelVariant")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.modelVariant); + if (message.enableWordInfo != null && Object.hasOwnProperty.call(message, "enableWordInfo")) + writer.uint32(/* id 13, wireType 0 =*/104).bool(message.enableWordInfo); + return writer; + }; + + /** + * Encodes the specified InputAudioConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.InputAudioConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IInputAudioConfig} message InputAudioConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InputAudioConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InputAudioConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.InputAudioConfig} InputAudioConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InputAudioConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.InputAudioConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.audioEncoding = reader.int32(); + break; + case 2: + message.sampleRateHertz = reader.int32(); + break; + case 13: + message.enableWordInfo = reader.bool(); + break; + case 4: + if (!(message.phraseHints && message.phraseHints.length)) + message.phraseHints = []; + message.phraseHints.push(reader.string()); + break; + case 7: + message.model = reader.string(); + break; + case 10: + message.modelVariant = reader.int32(); + break; + case 8: + message.singleUtterance = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; } - return message; - }; + } + return message; + }; + + /** + * Decodes an InputAudioConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.InputAudioConfig} InputAudioConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InputAudioConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InputAudioConfig message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InputAudioConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.audioEncoding != null && message.hasOwnProperty("audioEncoding")) + switch (message.audioEncoding) { + default: + return "audioEncoding: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + if (message.sampleRateHertz != null && message.hasOwnProperty("sampleRateHertz")) + if (!$util.isInteger(message.sampleRateHertz)) + return "sampleRateHertz: integer expected"; + if (message.enableWordInfo != null && message.hasOwnProperty("enableWordInfo")) + if (typeof message.enableWordInfo !== "boolean") + return "enableWordInfo: boolean expected"; + if (message.phraseHints != null && message.hasOwnProperty("phraseHints")) { + if (!Array.isArray(message.phraseHints)) + return "phraseHints: array expected"; + for (var i = 0; i < message.phraseHints.length; ++i) + if (!$util.isString(message.phraseHints[i])) + return "phraseHints: string[] expected"; + } + if (message.model != null && message.hasOwnProperty("model")) + if (!$util.isString(message.model)) + return "model: string expected"; + if (message.modelVariant != null && message.hasOwnProperty("modelVariant")) + switch (message.modelVariant) { + default: + return "modelVariant: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.singleUtterance != null && message.hasOwnProperty("singleUtterance")) + if (typeof message.singleUtterance !== "boolean") + return "singleUtterance: boolean expected"; + return null; + }; + + /** + * Creates an InputAudioConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.InputAudioConfig} InputAudioConfig + */ + InputAudioConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.InputAudioConfig) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.InputAudioConfig(); + switch (object.audioEncoding) { + case "AUDIO_ENCODING_UNSPECIFIED": + case 0: + message.audioEncoding = 0; + break; + case "AUDIO_ENCODING_LINEAR_16": + case 1: + message.audioEncoding = 1; + break; + case "AUDIO_ENCODING_FLAC": + case 2: + message.audioEncoding = 2; + break; + case "AUDIO_ENCODING_MULAW": + case 3: + message.audioEncoding = 3; + break; + case "AUDIO_ENCODING_AMR": + case 4: + message.audioEncoding = 4; + break; + case "AUDIO_ENCODING_AMR_WB": + case 5: + message.audioEncoding = 5; + break; + case "AUDIO_ENCODING_OGG_OPUS": + case 6: + message.audioEncoding = 6; + break; + case "AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE": + case 7: + message.audioEncoding = 7; + break; + } + if (object.sampleRateHertz != null) + message.sampleRateHertz = object.sampleRateHertz | 0; + if (object.enableWordInfo != null) + message.enableWordInfo = Boolean(object.enableWordInfo); + if (object.phraseHints) { + if (!Array.isArray(object.phraseHints)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.InputAudioConfig.phraseHints: array expected"); + message.phraseHints = []; + for (var i = 0; i < object.phraseHints.length; ++i) + message.phraseHints[i] = String(object.phraseHints[i]); + } + if (object.model != null) + message.model = String(object.model); + switch (object.modelVariant) { + case "SPEECH_MODEL_VARIANT_UNSPECIFIED": + case 0: + message.modelVariant = 0; + break; + case "USE_BEST_AVAILABLE": + case 1: + message.modelVariant = 1; + break; + case "USE_STANDARD": + case 2: + message.modelVariant = 2; + break; + case "USE_ENHANCED": + case 3: + message.modelVariant = 3; + break; + } + if (object.singleUtterance != null) + message.singleUtterance = Boolean(object.singleUtterance); + return message; + }; + + /** + * Creates a plain object from an InputAudioConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.InputAudioConfig} message InputAudioConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InputAudioConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.phraseHints = []; + if (options.defaults) { + object.audioEncoding = options.enums === String ? "AUDIO_ENCODING_UNSPECIFIED" : 0; + object.sampleRateHertz = 0; + object.model = ""; + object.singleUtterance = false; + object.modelVariant = options.enums === String ? "SPEECH_MODEL_VARIANT_UNSPECIFIED" : 0; + object.enableWordInfo = false; + } + if (message.audioEncoding != null && message.hasOwnProperty("audioEncoding")) + object.audioEncoding = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.AudioEncoding[message.audioEncoding] : message.audioEncoding; + if (message.sampleRateHertz != null && message.hasOwnProperty("sampleRateHertz")) + object.sampleRateHertz = message.sampleRateHertz; + if (message.phraseHints && message.phraseHints.length) { + object.phraseHints = []; + for (var j = 0; j < message.phraseHints.length; ++j) + object.phraseHints[j] = message.phraseHints[j]; + } + if (message.model != null && message.hasOwnProperty("model")) + object.model = message.model; + if (message.singleUtterance != null && message.hasOwnProperty("singleUtterance")) + object.singleUtterance = message.singleUtterance; + if (message.modelVariant != null && message.hasOwnProperty("modelVariant")) + object.modelVariant = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.SpeechModelVariant[message.modelVariant] : message.modelVariant; + if (message.enableWordInfo != null && message.hasOwnProperty("enableWordInfo")) + object.enableWordInfo = message.enableWordInfo; + return object; + }; + + /** + * Converts this InputAudioConfig to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig + * @instance + * @returns {Object.} JSON object + */ + InputAudioConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return InputAudioConfig; + })(); + + /** + * SpeechModelVariant enum. + * @name google.cloud.dialogflow.cx.v3beta1.SpeechModelVariant + * @enum {number} + * @property {number} SPEECH_MODEL_VARIANT_UNSPECIFIED=0 SPEECH_MODEL_VARIANT_UNSPECIFIED value + * @property {number} USE_BEST_AVAILABLE=1 USE_BEST_AVAILABLE value + * @property {number} USE_STANDARD=2 USE_STANDARD value + * @property {number} USE_ENHANCED=3 USE_ENHANCED value + */ + v3beta1.SpeechModelVariant = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SPEECH_MODEL_VARIANT_UNSPECIFIED"] = 0; + values[valuesById[1] = "USE_BEST_AVAILABLE"] = 1; + values[valuesById[2] = "USE_STANDARD"] = 2; + values[valuesById[3] = "USE_ENHANCED"] = 3; + return values; + })(); + + v3beta1.VoiceSelectionParams = (function() { + + /** + * Properties of a VoiceSelectionParams. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @interface IVoiceSelectionParams + * @property {string|null} [name] VoiceSelectionParams name + * @property {google.cloud.dialogflow.cx.v3beta1.SsmlVoiceGender|null} [ssmlGender] VoiceSelectionParams ssmlGender + */ + + /** + * Constructs a new VoiceSelectionParams. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents a VoiceSelectionParams. + * @implements IVoiceSelectionParams + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.IVoiceSelectionParams=} [properties] Properties to set + */ + function VoiceSelectionParams(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * VoiceSelectionParams name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams + * @instance + */ + VoiceSelectionParams.prototype.name = ""; + + /** + * VoiceSelectionParams ssmlGender. + * @member {google.cloud.dialogflow.cx.v3beta1.SsmlVoiceGender} ssmlGender + * @memberof google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams + * @instance + */ + VoiceSelectionParams.prototype.ssmlGender = 0; + + /** + * Creates a new VoiceSelectionParams instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IVoiceSelectionParams=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams} VoiceSelectionParams instance + */ + VoiceSelectionParams.create = function create(properties) { + return new VoiceSelectionParams(properties); + }; + + /** + * Encodes the specified VoiceSelectionParams message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IVoiceSelectionParams} message VoiceSelectionParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VoiceSelectionParams.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.ssmlGender != null && Object.hasOwnProperty.call(message, "ssmlGender")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.ssmlGender); + return writer; + }; + + /** + * Encodes the specified VoiceSelectionParams message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IVoiceSelectionParams} message VoiceSelectionParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VoiceSelectionParams.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes an EndInteraction message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction} EndInteraction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EndInteraction.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a VoiceSelectionParams message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams} VoiceSelectionParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VoiceSelectionParams.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.ssmlGender = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Verifies an EndInteraction message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EndInteraction.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; + /** + * Decodes a VoiceSelectionParams message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams} VoiceSelectionParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VoiceSelectionParams.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates an EndInteraction message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction} EndInteraction - */ - EndInteraction.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction) - return object; - return new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction(); - }; + /** + * Verifies a VoiceSelectionParams message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VoiceSelectionParams.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.ssmlGender != null && message.hasOwnProperty("ssmlGender")) + switch (message.ssmlGender) { + default: + return "ssmlGender: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; - /** - * Creates a plain object from an EndInteraction message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction} message EndInteraction - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EndInteraction.toObject = function toObject() { - return {}; - }; + /** + * Creates a VoiceSelectionParams message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams} VoiceSelectionParams + */ + VoiceSelectionParams.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams(); + if (object.name != null) + message.name = String(object.name); + switch (object.ssmlGender) { + case "SSML_VOICE_GENDER_UNSPECIFIED": + case 0: + message.ssmlGender = 0; + break; + case "SSML_VOICE_GENDER_MALE": + case 1: + message.ssmlGender = 1; + break; + case "SSML_VOICE_GENDER_FEMALE": + case 2: + message.ssmlGender = 2; + break; + case "SSML_VOICE_GENDER_NEUTRAL": + case 3: + message.ssmlGender = 3; + break; + } + return message; + }; - /** - * Converts this EndInteraction to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction - * @instance - * @returns {Object.} JSON object - */ - EndInteraction.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a VoiceSelectionParams message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams} message VoiceSelectionParams + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VoiceSelectionParams.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.ssmlGender = options.enums === String ? "SSML_VOICE_GENDER_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.ssmlGender != null && message.hasOwnProperty("ssmlGender")) + object.ssmlGender = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.SsmlVoiceGender[message.ssmlGender] : message.ssmlGender; + return object; + }; - return EndInteraction; - })(); + /** + * Converts this VoiceSelectionParams to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams + * @instance + * @returns {Object.} JSON object + */ + VoiceSelectionParams.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return ResponseMessage; + return VoiceSelectionParams; })(); - v3beta1.SecuritySettingsService = (function() { + v3beta1.SynthesizeSpeechConfig = (function() { /** - * Constructs a new SecuritySettingsService service. + * Properties of a SynthesizeSpeechConfig. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a SecuritySettingsService - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @interface ISynthesizeSpeechConfig + * @property {number|null} [speakingRate] SynthesizeSpeechConfig speakingRate + * @property {number|null} [pitch] SynthesizeSpeechConfig pitch + * @property {number|null} [volumeGainDb] SynthesizeSpeechConfig volumeGainDb + * @property {Array.|null} [effectsProfileId] SynthesizeSpeechConfig effectsProfileId + * @property {google.cloud.dialogflow.cx.v3beta1.IVoiceSelectionParams|null} [voice] SynthesizeSpeechConfig voice */ - function SecuritySettingsService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (SecuritySettingsService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = SecuritySettingsService; /** - * Creates new SecuritySettingsService service using the specified rpc implementation. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService - * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {SecuritySettingsService} RPC service. Useful where requests and/or responses are streamed. + * Constructs a new SynthesizeSpeechConfig. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents a SynthesizeSpeechConfig. + * @implements ISynthesizeSpeechConfig + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.ISynthesizeSpeechConfig=} [properties] Properties to set */ - SecuritySettingsService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; + function SynthesizeSpeechConfig(properties) { + this.effectsProfileId = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService#createSecuritySettings}. - * @memberof google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService - * @typedef CreateSecuritySettingsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3beta1.SecuritySettings} [response] SecuritySettings + * SynthesizeSpeechConfig speakingRate. + * @member {number} speakingRate + * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig + * @instance */ + SynthesizeSpeechConfig.prototype.speakingRate = 0; /** - * Calls CreateSecuritySettings. - * @function createSecuritySettings - * @memberof google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService + * SynthesizeSpeechConfig pitch. + * @member {number} pitch + * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.ICreateSecuritySettingsRequest} request CreateSecuritySettingsRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService.CreateSecuritySettingsCallback} callback Node-style callback called with the error, if any, and SecuritySettings - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(SecuritySettingsService.prototype.createSecuritySettings = function createSecuritySettings(request, callback) { - return this.rpcCall(createSecuritySettings, $root.google.cloud.dialogflow.cx.v3beta1.CreateSecuritySettingsRequest, $root.google.cloud.dialogflow.cx.v3beta1.SecuritySettings, request, callback); - }, "name", { value: "CreateSecuritySettings" }); + SynthesizeSpeechConfig.prototype.pitch = 0; /** - * Calls CreateSecuritySettings. - * @function createSecuritySettings - * @memberof google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService + * SynthesizeSpeechConfig volumeGainDb. + * @member {number} volumeGainDb + * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.ICreateSecuritySettingsRequest} request CreateSecuritySettingsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + SynthesizeSpeechConfig.prototype.volumeGainDb = 0; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService#getSecuritySettings}. - * @memberof google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService - * @typedef GetSecuritySettingsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3beta1.SecuritySettings} [response] SecuritySettings + * SynthesizeSpeechConfig effectsProfileId. + * @member {Array.} effectsProfileId + * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig + * @instance */ + SynthesizeSpeechConfig.prototype.effectsProfileId = $util.emptyArray; /** - * Calls GetSecuritySettings. - * @function getSecuritySettings - * @memberof google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService + * SynthesizeSpeechConfig voice. + * @member {google.cloud.dialogflow.cx.v3beta1.IVoiceSelectionParams|null|undefined} voice + * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IGetSecuritySettingsRequest} request GetSecuritySettingsRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService.GetSecuritySettingsCallback} callback Node-style callback called with the error, if any, and SecuritySettings - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(SecuritySettingsService.prototype.getSecuritySettings = function getSecuritySettings(request, callback) { - return this.rpcCall(getSecuritySettings, $root.google.cloud.dialogflow.cx.v3beta1.GetSecuritySettingsRequest, $root.google.cloud.dialogflow.cx.v3beta1.SecuritySettings, request, callback); - }, "name", { value: "GetSecuritySettings" }); + SynthesizeSpeechConfig.prototype.voice = null; /** - * Calls GetSecuritySettings. - * @function getSecuritySettings - * @memberof google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IGetSecuritySettingsRequest} request GetSecuritySettingsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a new SynthesizeSpeechConfig instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ISynthesizeSpeechConfig=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig} SynthesizeSpeechConfig instance */ + SynthesizeSpeechConfig.create = function create(properties) { + return new SynthesizeSpeechConfig(properties); + }; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService#updateSecuritySettings}. - * @memberof google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService - * @typedef UpdateSecuritySettingsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3beta1.SecuritySettings} [response] SecuritySettings + * Encodes the specified SynthesizeSpeechConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ISynthesizeSpeechConfig} message SynthesizeSpeechConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + SynthesizeSpeechConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.speakingRate != null && Object.hasOwnProperty.call(message, "speakingRate")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.speakingRate); + if (message.pitch != null && Object.hasOwnProperty.call(message, "pitch")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.pitch); + if (message.volumeGainDb != null && Object.hasOwnProperty.call(message, "volumeGainDb")) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.volumeGainDb); + if (message.voice != null && Object.hasOwnProperty.call(message, "voice")) + $root.google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams.encode(message.voice, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.effectsProfileId != null && message.effectsProfileId.length) + for (var i = 0; i < message.effectsProfileId.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.effectsProfileId[i]); + return writer; + }; /** - * Calls UpdateSecuritySettings. - * @function updateSecuritySettings - * @memberof google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateSecuritySettingsRequest} request UpdateSecuritySettingsRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService.UpdateSecuritySettingsCallback} callback Node-style callback called with the error, if any, and SecuritySettings - * @returns {undefined} - * @variation 1 + * Encodes the specified SynthesizeSpeechConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ISynthesizeSpeechConfig} message SynthesizeSpeechConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(SecuritySettingsService.prototype.updateSecuritySettings = function updateSecuritySettings(request, callback) { - return this.rpcCall(updateSecuritySettings, $root.google.cloud.dialogflow.cx.v3beta1.UpdateSecuritySettingsRequest, $root.google.cloud.dialogflow.cx.v3beta1.SecuritySettings, request, callback); - }, "name", { value: "UpdateSecuritySettings" }); + SynthesizeSpeechConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Calls UpdateSecuritySettings. - * @function updateSecuritySettings - * @memberof google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateSecuritySettingsRequest} request UpdateSecuritySettingsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Decodes a SynthesizeSpeechConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig} SynthesizeSpeechConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + SynthesizeSpeechConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.speakingRate = reader.double(); + break; + case 2: + message.pitch = reader.double(); + break; + case 3: + message.volumeGainDb = reader.double(); + break; + case 5: + if (!(message.effectsProfileId && message.effectsProfileId.length)) + message.effectsProfileId = []; + message.effectsProfileId.push(reader.string()); + break; + case 4: + message.voice = $root.google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService#listSecuritySettings}. - * @memberof google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService - * @typedef ListSecuritySettingsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsResponse} [response] ListSecuritySettingsResponse + * Decodes a SynthesizeSpeechConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig} SynthesizeSpeechConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + SynthesizeSpeechConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls ListSecuritySettings. - * @function listSecuritySettings - * @memberof google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IListSecuritySettingsRequest} request ListSecuritySettingsRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService.ListSecuritySettingsCallback} callback Node-style callback called with the error, if any, and ListSecuritySettingsResponse - * @returns {undefined} - * @variation 1 + * Verifies a SynthesizeSpeechConfig message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Object.defineProperty(SecuritySettingsService.prototype.listSecuritySettings = function listSecuritySettings(request, callback) { - return this.rpcCall(listSecuritySettings, $root.google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsRequest, $root.google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsResponse, request, callback); - }, "name", { value: "ListSecuritySettings" }); + SynthesizeSpeechConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.speakingRate != null && message.hasOwnProperty("speakingRate")) + if (typeof message.speakingRate !== "number") + return "speakingRate: number expected"; + if (message.pitch != null && message.hasOwnProperty("pitch")) + if (typeof message.pitch !== "number") + return "pitch: number expected"; + if (message.volumeGainDb != null && message.hasOwnProperty("volumeGainDb")) + if (typeof message.volumeGainDb !== "number") + return "volumeGainDb: number expected"; + if (message.effectsProfileId != null && message.hasOwnProperty("effectsProfileId")) { + if (!Array.isArray(message.effectsProfileId)) + return "effectsProfileId: array expected"; + for (var i = 0; i < message.effectsProfileId.length; ++i) + if (!$util.isString(message.effectsProfileId[i])) + return "effectsProfileId: string[] expected"; + } + if (message.voice != null && message.hasOwnProperty("voice")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams.verify(message.voice); + if (error) + return "voice." + error; + } + return null; + }; /** - * Calls ListSecuritySettings. - * @function listSecuritySettings - * @memberof google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IListSecuritySettingsRequest} request ListSecuritySettingsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a SynthesizeSpeechConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig} SynthesizeSpeechConfig */ + SynthesizeSpeechConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig(); + if (object.speakingRate != null) + message.speakingRate = Number(object.speakingRate); + if (object.pitch != null) + message.pitch = Number(object.pitch); + if (object.volumeGainDb != null) + message.volumeGainDb = Number(object.volumeGainDb); + if (object.effectsProfileId) { + if (!Array.isArray(object.effectsProfileId)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig.effectsProfileId: array expected"); + message.effectsProfileId = []; + for (var i = 0; i < object.effectsProfileId.length; ++i) + message.effectsProfileId[i] = String(object.effectsProfileId[i]); + } + if (object.voice != null) { + if (typeof object.voice !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig.voice: object expected"); + message.voice = $root.google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams.fromObject(object.voice); + } + return message; + }; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService#deleteSecuritySettings}. - * @memberof google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService - * @typedef DeleteSecuritySettingsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty + * Creates a plain object from a SynthesizeSpeechConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig} message SynthesizeSpeechConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ + SynthesizeSpeechConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.effectsProfileId = []; + if (options.defaults) { + object.speakingRate = 0; + object.pitch = 0; + object.volumeGainDb = 0; + object.voice = null; + } + if (message.speakingRate != null && message.hasOwnProperty("speakingRate")) + object.speakingRate = options.json && !isFinite(message.speakingRate) ? String(message.speakingRate) : message.speakingRate; + if (message.pitch != null && message.hasOwnProperty("pitch")) + object.pitch = options.json && !isFinite(message.pitch) ? String(message.pitch) : message.pitch; + if (message.volumeGainDb != null && message.hasOwnProperty("volumeGainDb")) + object.volumeGainDb = options.json && !isFinite(message.volumeGainDb) ? String(message.volumeGainDb) : message.volumeGainDb; + if (message.voice != null && message.hasOwnProperty("voice")) + object.voice = $root.google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams.toObject(message.voice, options); + if (message.effectsProfileId && message.effectsProfileId.length) { + object.effectsProfileId = []; + for (var j = 0; j < message.effectsProfileId.length; ++j) + object.effectsProfileId[j] = message.effectsProfileId[j]; + } + return object; + }; /** - * Calls DeleteSecuritySettings. - * @function deleteSecuritySettings - * @memberof google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService + * Converts this SynthesizeSpeechConfig to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteSecuritySettingsRequest} request DeleteSecuritySettingsRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService.DeleteSecuritySettingsCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 + * @returns {Object.} JSON object */ - Object.defineProperty(SecuritySettingsService.prototype.deleteSecuritySettings = function deleteSecuritySettings(request, callback) { - return this.rpcCall(deleteSecuritySettings, $root.google.cloud.dialogflow.cx.v3beta1.DeleteSecuritySettingsRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteSecuritySettings" }); + SynthesizeSpeechConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Calls DeleteSecuritySettings. - * @function deleteSecuritySettings - * @memberof google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteSecuritySettingsRequest} request DeleteSecuritySettingsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + return SynthesizeSpeechConfig; + })(); - return SecuritySettingsService; + /** + * SsmlVoiceGender enum. + * @name google.cloud.dialogflow.cx.v3beta1.SsmlVoiceGender + * @enum {number} + * @property {number} SSML_VOICE_GENDER_UNSPECIFIED=0 SSML_VOICE_GENDER_UNSPECIFIED value + * @property {number} SSML_VOICE_GENDER_MALE=1 SSML_VOICE_GENDER_MALE value + * @property {number} SSML_VOICE_GENDER_FEMALE=2 SSML_VOICE_GENDER_FEMALE value + * @property {number} SSML_VOICE_GENDER_NEUTRAL=3 SSML_VOICE_GENDER_NEUTRAL value + */ + v3beta1.SsmlVoiceGender = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SSML_VOICE_GENDER_UNSPECIFIED"] = 0; + values[valuesById[1] = "SSML_VOICE_GENDER_MALE"] = 1; + values[valuesById[2] = "SSML_VOICE_GENDER_FEMALE"] = 2; + values[valuesById[3] = "SSML_VOICE_GENDER_NEUTRAL"] = 3; + return values; })(); - v3beta1.GetSecuritySettingsRequest = (function() { + v3beta1.OutputAudioConfig = (function() { /** - * Properties of a GetSecuritySettingsRequest. + * Properties of an OutputAudioConfig. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IGetSecuritySettingsRequest - * @property {string|null} [name] GetSecuritySettingsRequest name + * @interface IOutputAudioConfig + * @property {google.cloud.dialogflow.cx.v3beta1.OutputAudioEncoding|null} [audioEncoding] OutputAudioConfig audioEncoding + * @property {number|null} [sampleRateHertz] OutputAudioConfig sampleRateHertz + * @property {google.cloud.dialogflow.cx.v3beta1.ISynthesizeSpeechConfig|null} [synthesizeSpeechConfig] OutputAudioConfig synthesizeSpeechConfig */ /** - * Constructs a new GetSecuritySettingsRequest. + * Constructs a new OutputAudioConfig. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a GetSecuritySettingsRequest. - * @implements IGetSecuritySettingsRequest + * @classdesc Represents an OutputAudioConfig. + * @implements IOutputAudioConfig * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IGetSecuritySettingsRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IOutputAudioConfig=} [properties] Properties to set */ - function GetSecuritySettingsRequest(properties) { + function OutputAudioConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -51720,75 +59167,101 @@ } /** - * GetSecuritySettingsRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.GetSecuritySettingsRequest + * OutputAudioConfig audioEncoding. + * @member {google.cloud.dialogflow.cx.v3beta1.OutputAudioEncoding} audioEncoding + * @memberof google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig * @instance */ - GetSecuritySettingsRequest.prototype.name = ""; + OutputAudioConfig.prototype.audioEncoding = 0; /** - * Creates a new GetSecuritySettingsRequest instance using the specified properties. + * OutputAudioConfig sampleRateHertz. + * @member {number} sampleRateHertz + * @memberof google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig + * @instance + */ + OutputAudioConfig.prototype.sampleRateHertz = 0; + + /** + * OutputAudioConfig synthesizeSpeechConfig. + * @member {google.cloud.dialogflow.cx.v3beta1.ISynthesizeSpeechConfig|null|undefined} synthesizeSpeechConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig + * @instance + */ + OutputAudioConfig.prototype.synthesizeSpeechConfig = null; + + /** + * Creates a new OutputAudioConfig instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.GetSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IGetSecuritySettingsRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.GetSecuritySettingsRequest} GetSecuritySettingsRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.IOutputAudioConfig=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig} OutputAudioConfig instance */ - GetSecuritySettingsRequest.create = function create(properties) { - return new GetSecuritySettingsRequest(properties); + OutputAudioConfig.create = function create(properties) { + return new OutputAudioConfig(properties); }; /** - * Encodes the specified GetSecuritySettingsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetSecuritySettingsRequest.verify|verify} messages. + * Encodes the specified OutputAudioConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.GetSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IGetSecuritySettingsRequest} message GetSecuritySettingsRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IOutputAudioConfig} message OutputAudioConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSecuritySettingsRequest.encode = function encode(message, writer) { + OutputAudioConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.audioEncoding != null && Object.hasOwnProperty.call(message, "audioEncoding")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.audioEncoding); + if (message.sampleRateHertz != null && Object.hasOwnProperty.call(message, "sampleRateHertz")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.sampleRateHertz); + if (message.synthesizeSpeechConfig != null && Object.hasOwnProperty.call(message, "synthesizeSpeechConfig")) + $root.google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig.encode(message.synthesizeSpeechConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetSecuritySettingsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetSecuritySettingsRequest.verify|verify} messages. + * Encodes the specified OutputAudioConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.GetSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IGetSecuritySettingsRequest} message GetSecuritySettingsRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IOutputAudioConfig} message OutputAudioConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSecuritySettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + OutputAudioConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetSecuritySettingsRequest message from the specified reader or buffer. + * Decodes an OutputAudioConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.GetSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.GetSecuritySettingsRequest} GetSecuritySettingsRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig} OutputAudioConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetSecuritySettingsRequest.decode = function decode(reader, length) { + OutputAudioConfig.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.GetSecuritySettingsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.audioEncoding = reader.int32(); + break; + case 2: + message.sampleRateHertz = reader.int32(); + break; + case 3: + message.synthesizeSpeechConfig = $root.google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -51799,108 +59272,392 @@ }; /** - * Decodes a GetSecuritySettingsRequest message from the specified reader or buffer, length delimited. + * Decodes an OutputAudioConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.GetSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.GetSecuritySettingsRequest} GetSecuritySettingsRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig} OutputAudioConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetSecuritySettingsRequest.decodeDelimited = function decodeDelimited(reader) { + OutputAudioConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetSecuritySettingsRequest message. + * Verifies an OutputAudioConfig message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.GetSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetSecuritySettingsRequest.verify = function verify(message) { + OutputAudioConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.audioEncoding != null && message.hasOwnProperty("audioEncoding")) + switch (message.audioEncoding) { + default: + return "audioEncoding: enum value expected"; + case 0: + case 1: + case 2: + case 4: + case 3: + case 5: + break; + } + if (message.sampleRateHertz != null && message.hasOwnProperty("sampleRateHertz")) + if (!$util.isInteger(message.sampleRateHertz)) + return "sampleRateHertz: integer expected"; + if (message.synthesizeSpeechConfig != null && message.hasOwnProperty("synthesizeSpeechConfig")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig.verify(message.synthesizeSpeechConfig); + if (error) + return "synthesizeSpeechConfig." + error; + } return null; }; /** - * Creates a GetSecuritySettingsRequest message from a plain object. Also converts values to their respective internal types. + * Creates an OutputAudioConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.GetSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.GetSecuritySettingsRequest} GetSecuritySettingsRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig} OutputAudioConfig + */ + OutputAudioConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig(); + switch (object.audioEncoding) { + case "OUTPUT_AUDIO_ENCODING_UNSPECIFIED": + case 0: + message.audioEncoding = 0; + break; + case "OUTPUT_AUDIO_ENCODING_LINEAR_16": + case 1: + message.audioEncoding = 1; + break; + case "OUTPUT_AUDIO_ENCODING_MP3": + case 2: + message.audioEncoding = 2; + break; + case "OUTPUT_AUDIO_ENCODING_MP3_64_KBPS": + case 4: + message.audioEncoding = 4; + break; + case "OUTPUT_AUDIO_ENCODING_OGG_OPUS": + case 3: + message.audioEncoding = 3; + break; + case "OUTPUT_AUDIO_ENCODING_MULAW": + case 5: + message.audioEncoding = 5; + break; + } + if (object.sampleRateHertz != null) + message.sampleRateHertz = object.sampleRateHertz | 0; + if (object.synthesizeSpeechConfig != null) { + if (typeof object.synthesizeSpeechConfig !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig.synthesizeSpeechConfig: object expected"); + message.synthesizeSpeechConfig = $root.google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig.fromObject(object.synthesizeSpeechConfig); + } + return message; + }; + + /** + * Creates a plain object from an OutputAudioConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig} message OutputAudioConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OutputAudioConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.audioEncoding = options.enums === String ? "OUTPUT_AUDIO_ENCODING_UNSPECIFIED" : 0; + object.sampleRateHertz = 0; + object.synthesizeSpeechConfig = null; + } + if (message.audioEncoding != null && message.hasOwnProperty("audioEncoding")) + object.audioEncoding = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.OutputAudioEncoding[message.audioEncoding] : message.audioEncoding; + if (message.sampleRateHertz != null && message.hasOwnProperty("sampleRateHertz")) + object.sampleRateHertz = message.sampleRateHertz; + if (message.synthesizeSpeechConfig != null && message.hasOwnProperty("synthesizeSpeechConfig")) + object.synthesizeSpeechConfig = $root.google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig.toObject(message.synthesizeSpeechConfig, options); + return object; + }; + + /** + * Converts this OutputAudioConfig to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig + * @instance + * @returns {Object.} JSON object + */ + OutputAudioConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return OutputAudioConfig; + })(); + + /** + * OutputAudioEncoding enum. + * @name google.cloud.dialogflow.cx.v3beta1.OutputAudioEncoding + * @enum {number} + * @property {number} OUTPUT_AUDIO_ENCODING_UNSPECIFIED=0 OUTPUT_AUDIO_ENCODING_UNSPECIFIED value + * @property {number} OUTPUT_AUDIO_ENCODING_LINEAR_16=1 OUTPUT_AUDIO_ENCODING_LINEAR_16 value + * @property {number} OUTPUT_AUDIO_ENCODING_MP3=2 OUTPUT_AUDIO_ENCODING_MP3 value + * @property {number} OUTPUT_AUDIO_ENCODING_MP3_64_KBPS=4 OUTPUT_AUDIO_ENCODING_MP3_64_KBPS value + * @property {number} OUTPUT_AUDIO_ENCODING_OGG_OPUS=3 OUTPUT_AUDIO_ENCODING_OGG_OPUS value + * @property {number} OUTPUT_AUDIO_ENCODING_MULAW=5 OUTPUT_AUDIO_ENCODING_MULAW value + */ + v3beta1.OutputAudioEncoding = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "OUTPUT_AUDIO_ENCODING_UNSPECIFIED"] = 0; + values[valuesById[1] = "OUTPUT_AUDIO_ENCODING_LINEAR_16"] = 1; + values[valuesById[2] = "OUTPUT_AUDIO_ENCODING_MP3"] = 2; + values[valuesById[4] = "OUTPUT_AUDIO_ENCODING_MP3_64_KBPS"] = 4; + values[valuesById[3] = "OUTPUT_AUDIO_ENCODING_OGG_OPUS"] = 3; + values[valuesById[5] = "OUTPUT_AUDIO_ENCODING_MULAW"] = 5; + return values; + })(); + + v3beta1.EntityTypes = (function() { + + /** + * Constructs a new EntityTypes service. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents an EntityTypes + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function EntityTypes(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (EntityTypes.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = EntityTypes; + + /** + * Creates new EntityTypes service using the specified rpc implementation. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityTypes + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {EntityTypes} RPC service. Useful where requests and/or responses are streamed. + */ + EntityTypes.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.EntityTypes#listEntityTypes}. + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityTypes + * @typedef ListEntityTypesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse} [response] ListEntityTypesResponse + */ + + /** + * Calls ListEntityTypes. + * @function listEntityTypes + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityTypes + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IListEntityTypesRequest} request ListEntityTypesRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.EntityTypes.ListEntityTypesCallback} callback Node-style callback called with the error, if any, and ListEntityTypesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(EntityTypes.prototype.listEntityTypes = function listEntityTypes(request, callback) { + return this.rpcCall(listEntityTypes, $root.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest, $root.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse, request, callback); + }, "name", { value: "ListEntityTypes" }); + + /** + * Calls ListEntityTypes. + * @function listEntityTypes + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityTypes + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IListEntityTypesRequest} request ListEntityTypesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.EntityTypes#getEntityType}. + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityTypes + * @typedef GetEntityTypeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3beta1.EntityType} [response] EntityType + */ + + /** + * Calls GetEntityType. + * @function getEntityType + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityTypes + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IGetEntityTypeRequest} request GetEntityTypeRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.EntityTypes.GetEntityTypeCallback} callback Node-style callback called with the error, if any, and EntityType + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(EntityTypes.prototype.getEntityType = function getEntityType(request, callback) { + return this.rpcCall(getEntityType, $root.google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest, $root.google.cloud.dialogflow.cx.v3beta1.EntityType, request, callback); + }, "name", { value: "GetEntityType" }); + + /** + * Calls GetEntityType. + * @function getEntityType + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityTypes + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IGetEntityTypeRequest} request GetEntityTypeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.EntityTypes#createEntityType}. + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityTypes + * @typedef CreateEntityTypeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3beta1.EntityType} [response] EntityType + */ + + /** + * Calls CreateEntityType. + * @function createEntityType + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityTypes + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.ICreateEntityTypeRequest} request CreateEntityTypeRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.EntityTypes.CreateEntityTypeCallback} callback Node-style callback called with the error, if any, and EntityType + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(EntityTypes.prototype.createEntityType = function createEntityType(request, callback) { + return this.rpcCall(createEntityType, $root.google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest, $root.google.cloud.dialogflow.cx.v3beta1.EntityType, request, callback); + }, "name", { value: "CreateEntityType" }); + + /** + * Calls CreateEntityType. + * @function createEntityType + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityTypes + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.ICreateEntityTypeRequest} request CreateEntityTypeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.EntityTypes#updateEntityType}. + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityTypes + * @typedef UpdateEntityTypeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3beta1.EntityType} [response] EntityType + */ + + /** + * Calls UpdateEntityType. + * @function updateEntityType + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityTypes + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateEntityTypeRequest} request UpdateEntityTypeRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.EntityTypes.UpdateEntityTypeCallback} callback Node-style callback called with the error, if any, and EntityType + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(EntityTypes.prototype.updateEntityType = function updateEntityType(request, callback) { + return this.rpcCall(updateEntityType, $root.google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest, $root.google.cloud.dialogflow.cx.v3beta1.EntityType, request, callback); + }, "name", { value: "UpdateEntityType" }); + + /** + * Calls UpdateEntityType. + * @function updateEntityType + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityTypes + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateEntityTypeRequest} request UpdateEntityTypeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.EntityTypes#deleteEntityType}. + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityTypes + * @typedef DeleteEntityTypeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty */ - GetSecuritySettingsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.GetSecuritySettingsRequest) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.GetSecuritySettingsRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; /** - * Creates a plain object from a GetSecuritySettingsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.GetSecuritySettingsRequest - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.GetSecuritySettingsRequest} message GetSecuritySettingsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Calls DeleteEntityType. + * @function deleteEntityType + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityTypes + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteEntityTypeRequest} request DeleteEntityTypeRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.EntityTypes.DeleteEntityTypeCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 */ - GetSecuritySettingsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; + Object.defineProperty(EntityTypes.prototype.deleteEntityType = function deleteEntityType(request, callback) { + return this.rpcCall(deleteEntityType, $root.google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteEntityType" }); /** - * Converts this GetSecuritySettingsRequest to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.GetSecuritySettingsRequest + * Calls DeleteEntityType. + * @function deleteEntityType + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityTypes * @instance - * @returns {Object.} JSON object + * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteEntityTypeRequest} request DeleteEntityTypeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - GetSecuritySettingsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - return GetSecuritySettingsRequest; + return EntityTypes; })(); - v3beta1.UpdateSecuritySettingsRequest = (function() { + v3beta1.EntityType = (function() { /** - * Properties of an UpdateSecuritySettingsRequest. + * Properties of an EntityType. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IUpdateSecuritySettingsRequest - * @property {google.cloud.dialogflow.cx.v3beta1.ISecuritySettings|null} [securitySettings] UpdateSecuritySettingsRequest securitySettings - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateSecuritySettingsRequest updateMask + * @interface IEntityType + * @property {string|null} [name] EntityType name + * @property {string|null} [displayName] EntityType displayName + * @property {google.cloud.dialogflow.cx.v3beta1.EntityType.Kind|null} [kind] EntityType kind + * @property {google.cloud.dialogflow.cx.v3beta1.EntityType.AutoExpansionMode|null} [autoExpansionMode] EntityType autoExpansionMode + * @property {Array.|null} [entities] EntityType entities + * @property {Array.|null} [excludedPhrases] EntityType excludedPhrases + * @property {boolean|null} [enableFuzzyExtraction] EntityType enableFuzzyExtraction */ /** - * Constructs a new UpdateSecuritySettingsRequest. + * Constructs a new EntityType. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents an UpdateSecuritySettingsRequest. - * @implements IUpdateSecuritySettingsRequest + * @classdesc Represents an EntityType. + * @implements IEntityType * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateSecuritySettingsRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IEntityType=} [properties] Properties to set */ - function UpdateSecuritySettingsRequest(properties) { + function EntityType(properties) { + this.entities = []; + this.excludedPhrases = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -51908,88 +59665,159 @@ } /** - * UpdateSecuritySettingsRequest securitySettings. - * @member {google.cloud.dialogflow.cx.v3beta1.ISecuritySettings|null|undefined} securitySettings - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateSecuritySettingsRequest + * EntityType name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType * @instance */ - UpdateSecuritySettingsRequest.prototype.securitySettings = null; + EntityType.prototype.name = ""; /** - * UpdateSecuritySettingsRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateSecuritySettingsRequest + * EntityType displayName. + * @member {string} displayName + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType * @instance */ - UpdateSecuritySettingsRequest.prototype.updateMask = null; + EntityType.prototype.displayName = ""; /** - * Creates a new UpdateSecuritySettingsRequest instance using the specified properties. + * EntityType kind. + * @member {google.cloud.dialogflow.cx.v3beta1.EntityType.Kind} kind + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType + * @instance + */ + EntityType.prototype.kind = 0; + + /** + * EntityType autoExpansionMode. + * @member {google.cloud.dialogflow.cx.v3beta1.EntityType.AutoExpansionMode} autoExpansionMode + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType + * @instance + */ + EntityType.prototype.autoExpansionMode = 0; + + /** + * EntityType entities. + * @member {Array.} entities + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType + * @instance + */ + EntityType.prototype.entities = $util.emptyArray; + + /** + * EntityType excludedPhrases. + * @member {Array.} excludedPhrases + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType + * @instance + */ + EntityType.prototype.excludedPhrases = $util.emptyArray; + + /** + * EntityType enableFuzzyExtraction. + * @member {boolean} enableFuzzyExtraction + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType + * @instance + */ + EntityType.prototype.enableFuzzyExtraction = false; + + /** + * Creates a new EntityType instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateSecuritySettingsRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateSecuritySettingsRequest} UpdateSecuritySettingsRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.IEntityType=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.EntityType} EntityType instance */ - UpdateSecuritySettingsRequest.create = function create(properties) { - return new UpdateSecuritySettingsRequest(properties); + EntityType.create = function create(properties) { + return new EntityType(properties); }; /** - * Encodes the specified UpdateSecuritySettingsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateSecuritySettingsRequest.verify|verify} messages. + * Encodes the specified EntityType message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.EntityType.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateSecuritySettingsRequest} message UpdateSecuritySettingsRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IEntityType} message EntityType message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateSecuritySettingsRequest.encode = function encode(message, writer) { + EntityType.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.securitySettings != null && Object.hasOwnProperty.call(message, "securitySettings")) - $root.google.cloud.dialogflow.cx.v3beta1.SecuritySettings.encode(message.securitySettings, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.kind); + if (message.autoExpansionMode != null && Object.hasOwnProperty.call(message, "autoExpansionMode")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.autoExpansionMode); + if (message.entities != null && message.entities.length) + for (var i = 0; i < message.entities.length; ++i) + $root.google.cloud.dialogflow.cx.v3beta1.EntityType.Entity.encode(message.entities[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.excludedPhrases != null && message.excludedPhrases.length) + for (var i = 0; i < message.excludedPhrases.length; ++i) + $root.google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase.encode(message.excludedPhrases[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.enableFuzzyExtraction != null && Object.hasOwnProperty.call(message, "enableFuzzyExtraction")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.enableFuzzyExtraction); return writer; }; /** - * Encodes the specified UpdateSecuritySettingsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateSecuritySettingsRequest.verify|verify} messages. + * Encodes the specified EntityType message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.EntityType.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateSecuritySettingsRequest} message UpdateSecuritySettingsRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IEntityType} message EntityType message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateSecuritySettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + EntityType.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateSecuritySettingsRequest message from the specified reader or buffer. + * Decodes an EntityType message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateSecuritySettingsRequest} UpdateSecuritySettingsRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.EntityType} EntityType * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateSecuritySettingsRequest.decode = function decode(reader, length) { + EntityType.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.UpdateSecuritySettingsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.EntityType(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.securitySettings = $root.google.cloud.dialogflow.cx.v3beta1.SecuritySettings.decode(reader, reader.uint32()); + message.name = reader.string(); break; case 2: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.displayName = reader.string(); + break; + case 3: + message.kind = reader.int32(); + break; + case 4: + message.autoExpansionMode = reader.int32(); + break; + case 5: + if (!(message.entities && message.entities.length)) + message.entities = []; + message.entities.push($root.google.cloud.dialogflow.cx.v3beta1.EntityType.Entity.decode(reader, reader.uint32())); + break; + case 6: + if (!(message.excludedPhrases && message.excludedPhrases.length)) + message.excludedPhrases = []; + message.excludedPhrases.push($root.google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase.decode(reader, reader.uint32())); + break; + case 7: + message.enableFuzzyExtraction = reader.bool(); break; default: reader.skipType(tag & 7); @@ -52000,590 +59828,676 @@ }; /** - * Decodes an UpdateSecuritySettingsRequest message from the specified reader or buffer, length delimited. + * Decodes an EntityType message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateSecuritySettingsRequest} UpdateSecuritySettingsRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.EntityType} EntityType * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateSecuritySettingsRequest.decodeDelimited = function decodeDelimited(reader) { + EntityType.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateSecuritySettingsRequest message. + * Verifies an EntityType message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateSecuritySettingsRequest.verify = function verify(message) { + EntityType.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.securitySettings != null && message.hasOwnProperty("securitySettings")) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.SecuritySettings.verify(message.securitySettings); - if (error) - return "securitySettings." + error; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.kind != null && message.hasOwnProperty("kind")) + switch (message.kind) { + default: + return "kind: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.autoExpansionMode != null && message.hasOwnProperty("autoExpansionMode")) + switch (message.autoExpansionMode) { + default: + return "autoExpansionMode: enum value expected"; + case 0: + case 1: + break; + } + if (message.entities != null && message.hasOwnProperty("entities")) { + if (!Array.isArray(message.entities)) + return "entities: array expected"; + for (var i = 0; i < message.entities.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.EntityType.Entity.verify(message.entities[i]); + if (error) + return "entities." + error; + } } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; + if (message.excludedPhrases != null && message.hasOwnProperty("excludedPhrases")) { + if (!Array.isArray(message.excludedPhrases)) + return "excludedPhrases: array expected"; + for (var i = 0; i < message.excludedPhrases.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase.verify(message.excludedPhrases[i]); + if (error) + return "excludedPhrases." + error; + } } + if (message.enableFuzzyExtraction != null && message.hasOwnProperty("enableFuzzyExtraction")) + if (typeof message.enableFuzzyExtraction !== "boolean") + return "enableFuzzyExtraction: boolean expected"; return null; }; /** - * Creates an UpdateSecuritySettingsRequest message from a plain object. Also converts values to their respective internal types. + * Creates an EntityType message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateSecuritySettingsRequest} UpdateSecuritySettingsRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.EntityType} EntityType */ - UpdateSecuritySettingsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.UpdateSecuritySettingsRequest) + EntityType.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.EntityType) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.UpdateSecuritySettingsRequest(); - if (object.securitySettings != null) { - if (typeof object.securitySettings !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.UpdateSecuritySettingsRequest.securitySettings: object expected"); - message.securitySettings = $root.google.cloud.dialogflow.cx.v3beta1.SecuritySettings.fromObject(object.securitySettings); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.EntityType(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + switch (object.kind) { + case "KIND_UNSPECIFIED": + case 0: + message.kind = 0; + break; + case "KIND_MAP": + case 1: + message.kind = 1; + break; + case "KIND_LIST": + case 2: + message.kind = 2; + break; + case "KIND_REGEXP": + case 3: + message.kind = 3; + break; } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.UpdateSecuritySettingsRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + switch (object.autoExpansionMode) { + case "AUTO_EXPANSION_MODE_UNSPECIFIED": + case 0: + message.autoExpansionMode = 0; + break; + case "AUTO_EXPANSION_MODE_DEFAULT": + case 1: + message.autoExpansionMode = 1; + break; } - return message; - }; - - /** - * Creates a plain object from an UpdateSecuritySettingsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateSecuritySettingsRequest - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.UpdateSecuritySettingsRequest} message UpdateSecuritySettingsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateSecuritySettingsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.securitySettings = null; - object.updateMask = null; + if (object.entities) { + if (!Array.isArray(object.entities)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.EntityType.entities: array expected"); + message.entities = []; + for (var i = 0; i < object.entities.length; ++i) { + if (typeof object.entities[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.EntityType.entities: object expected"); + message.entities[i] = $root.google.cloud.dialogflow.cx.v3beta1.EntityType.Entity.fromObject(object.entities[i]); + } } - if (message.securitySettings != null && message.hasOwnProperty("securitySettings")) - object.securitySettings = $root.google.cloud.dialogflow.cx.v3beta1.SecuritySettings.toObject(message.securitySettings, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - return object; - }; - - /** - * Converts this UpdateSecuritySettingsRequest to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateSecuritySettingsRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateSecuritySettingsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return UpdateSecuritySettingsRequest; - })(); - - v3beta1.ListSecuritySettingsRequest = (function() { - - /** - * Properties of a ListSecuritySettingsRequest. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IListSecuritySettingsRequest - * @property {string|null} [parent] ListSecuritySettingsRequest parent - * @property {number|null} [pageSize] ListSecuritySettingsRequest pageSize - * @property {string|null} [pageToken] ListSecuritySettingsRequest pageToken - */ - - /** - * Constructs a new ListSecuritySettingsRequest. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a ListSecuritySettingsRequest. - * @implements IListSecuritySettingsRequest - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IListSecuritySettingsRequest=} [properties] Properties to set - */ - function ListSecuritySettingsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListSecuritySettingsRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsRequest - * @instance - */ - ListSecuritySettingsRequest.prototype.parent = ""; - - /** - * ListSecuritySettingsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsRequest - * @instance - */ - ListSecuritySettingsRequest.prototype.pageSize = 0; - - /** - * ListSecuritySettingsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsRequest - * @instance - */ - ListSecuritySettingsRequest.prototype.pageToken = ""; - - /** - * Creates a new ListSecuritySettingsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsRequest - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListSecuritySettingsRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsRequest} ListSecuritySettingsRequest instance - */ - ListSecuritySettingsRequest.create = function create(properties) { - return new ListSecuritySettingsRequest(properties); - }; - - /** - * Encodes the specified ListSecuritySettingsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsRequest - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListSecuritySettingsRequest} message ListSecuritySettingsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListSecuritySettingsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - return writer; - }; - - /** - * Encodes the specified ListSecuritySettingsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsRequest - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListSecuritySettingsRequest} message ListSecuritySettingsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListSecuritySettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListSecuritySettingsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsRequest} ListSecuritySettingsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListSecuritySettingsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + if (object.excludedPhrases) { + if (!Array.isArray(object.excludedPhrases)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.EntityType.excludedPhrases: array expected"); + message.excludedPhrases = []; + for (var i = 0; i < object.excludedPhrases.length; ++i) { + if (typeof object.excludedPhrases[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.EntityType.excludedPhrases: object expected"); + message.excludedPhrases[i] = $root.google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase.fromObject(object.excludedPhrases[i]); } } + if (object.enableFuzzyExtraction != null) + message.enableFuzzyExtraction = Boolean(object.enableFuzzyExtraction); return message; }; /** - * Decodes a ListSecuritySettingsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsRequest} ListSecuritySettingsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListSecuritySettingsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListSecuritySettingsRequest message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListSecuritySettingsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - return null; - }; - - /** - * Creates a ListSecuritySettingsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsRequest} ListSecuritySettingsRequest - */ - ListSecuritySettingsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsRequest) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - return message; - }; - - /** - * Creates a plain object from a ListSecuritySettingsRequest message. Also converts values to other types if specified. + * Creates a plain object from an EntityType message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsRequest} message ListSecuritySettingsRequest + * @param {google.cloud.dialogflow.cx.v3beta1.EntityType} message EntityType * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListSecuritySettingsRequest.toObject = function toObject(message, options) { + EntityType.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) { + object.entities = []; + object.excludedPhrases = []; + } if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; + object.name = ""; + object.displayName = ""; + object.kind = options.enums === String ? "KIND_UNSPECIFIED" : 0; + object.autoExpansionMode = options.enums === String ? "AUTO_EXPANSION_MODE_UNSPECIFIED" : 0; + object.enableFuzzyExtraction = false; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.EntityType.Kind[message.kind] : message.kind; + if (message.autoExpansionMode != null && message.hasOwnProperty("autoExpansionMode")) + object.autoExpansionMode = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.EntityType.AutoExpansionMode[message.autoExpansionMode] : message.autoExpansionMode; + if (message.entities && message.entities.length) { + object.entities = []; + for (var j = 0; j < message.entities.length; ++j) + object.entities[j] = $root.google.cloud.dialogflow.cx.v3beta1.EntityType.Entity.toObject(message.entities[j], options); + } + if (message.excludedPhrases && message.excludedPhrases.length) { + object.excludedPhrases = []; + for (var j = 0; j < message.excludedPhrases.length; ++j) + object.excludedPhrases[j] = $root.google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase.toObject(message.excludedPhrases[j], options); + } + if (message.enableFuzzyExtraction != null && message.hasOwnProperty("enableFuzzyExtraction")) + object.enableFuzzyExtraction = message.enableFuzzyExtraction; return object; }; /** - * Converts this ListSecuritySettingsRequest to JSON. + * Converts this EntityType to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType * @instance * @returns {Object.} JSON object */ - ListSecuritySettingsRequest.prototype.toJSON = function toJSON() { + EntityType.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListSecuritySettingsRequest; - })(); + EntityType.Entity = (function() { - v3beta1.ListSecuritySettingsResponse = (function() { + /** + * Properties of an Entity. + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType + * @interface IEntity + * @property {string|null} [value] Entity value + * @property {Array.|null} [synonyms] Entity synonyms + */ - /** - * Properties of a ListSecuritySettingsResponse. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IListSecuritySettingsResponse - * @property {Array.|null} [securitySettings] ListSecuritySettingsResponse securitySettings - * @property {string|null} [nextPageToken] ListSecuritySettingsResponse nextPageToken - */ + /** + * Constructs a new Entity. + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType + * @classdesc Represents an Entity. + * @implements IEntity + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.EntityType.IEntity=} [properties] Properties to set + */ + function Entity(properties) { + this.synonyms = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Constructs a new ListSecuritySettingsResponse. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a ListSecuritySettingsResponse. - * @implements IListSecuritySettingsResponse - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IListSecuritySettingsResponse=} [properties] Properties to set - */ - function ListSecuritySettingsResponse(properties) { - this.securitySettings = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Entity value. + * @member {string} value + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType.Entity + * @instance + */ + Entity.prototype.value = ""; - /** - * ListSecuritySettingsResponse securitySettings. - * @member {Array.} securitySettings - * @memberof google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsResponse - * @instance - */ - ListSecuritySettingsResponse.prototype.securitySettings = $util.emptyArray; + /** + * Entity synonyms. + * @member {Array.} synonyms + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType.Entity + * @instance + */ + Entity.prototype.synonyms = $util.emptyArray; - /** - * ListSecuritySettingsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsResponse - * @instance - */ - ListSecuritySettingsResponse.prototype.nextPageToken = ""; + /** + * Creates a new Entity instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType.Entity + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.EntityType.IEntity=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.EntityType.Entity} Entity instance + */ + Entity.create = function create(properties) { + return new Entity(properties); + }; - /** - * Creates a new ListSecuritySettingsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsResponse - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListSecuritySettingsResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsResponse} ListSecuritySettingsResponse instance - */ - ListSecuritySettingsResponse.create = function create(properties) { - return new ListSecuritySettingsResponse(properties); - }; + /** + * Encodes the specified Entity message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.EntityType.Entity.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType.Entity + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.EntityType.IEntity} message Entity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Entity.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); + if (message.synonyms != null && message.synonyms.length) + for (var i = 0; i < message.synonyms.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.synonyms[i]); + return writer; + }; - /** - * Encodes the specified ListSecuritySettingsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsResponse - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListSecuritySettingsResponse} message ListSecuritySettingsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListSecuritySettingsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.securitySettings != null && message.securitySettings.length) - for (var i = 0; i < message.securitySettings.length; ++i) - $root.google.cloud.dialogflow.cx.v3beta1.SecuritySettings.encode(message.securitySettings[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - return writer; - }; + /** + * Encodes the specified Entity message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.EntityType.Entity.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType.Entity + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.EntityType.IEntity} message Entity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Entity.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Encodes the specified ListSecuritySettingsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsResponse - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListSecuritySettingsResponse} message ListSecuritySettingsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListSecuritySettingsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Decodes an Entity message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType.Entity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.EntityType.Entity} Entity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Entity.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.EntityType.Entity(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.value = reader.string(); + break; + case 2: + if (!(message.synonyms && message.synonyms.length)) + message.synonyms = []; + message.synonyms.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Decodes a ListSecuritySettingsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsResponse} ListSecuritySettingsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListSecuritySettingsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.securitySettings && message.securitySettings.length)) - message.securitySettings = []; - message.securitySettings.push($root.google.cloud.dialogflow.cx.v3beta1.SecuritySettings.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + /** + * Decodes an Entity message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType.Entity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.EntityType.Entity} Entity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Entity.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Entity message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType.Entity + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Entity.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + if (message.synonyms != null && message.hasOwnProperty("synonyms")) { + if (!Array.isArray(message.synonyms)) + return "synonyms: array expected"; + for (var i = 0; i < message.synonyms.length; ++i) + if (!$util.isString(message.synonyms[i])) + return "synonyms: string[] expected"; + } + return null; + }; + + /** + * Creates an Entity message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType.Entity + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.EntityType.Entity} Entity + */ + Entity.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.EntityType.Entity) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.EntityType.Entity(); + if (object.value != null) + message.value = String(object.value); + if (object.synonyms) { + if (!Array.isArray(object.synonyms)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.EntityType.Entity.synonyms: array expected"); + message.synonyms = []; + for (var i = 0; i < object.synonyms.length; ++i) + message.synonyms[i] = String(object.synonyms[i]); + } + return message; + }; + + /** + * Creates a plain object from an Entity message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType.Entity + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.EntityType.Entity} message Entity + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Entity.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.synonyms = []; + if (options.defaults) + object.value = ""; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + if (message.synonyms && message.synonyms.length) { + object.synonyms = []; + for (var j = 0; j < message.synonyms.length; ++j) + object.synonyms[j] = message.synonyms[j]; + } + return object; + }; + + /** + * Converts this Entity to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType.Entity + * @instance + * @returns {Object.} JSON object + */ + Entity.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Entity; + })(); + + EntityType.ExcludedPhrase = (function() { + + /** + * Properties of an ExcludedPhrase. + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType + * @interface IExcludedPhrase + * @property {string|null} [value] ExcludedPhrase value + */ + + /** + * Constructs a new ExcludedPhrase. + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType + * @classdesc Represents an ExcludedPhrase. + * @implements IExcludedPhrase + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.EntityType.IExcludedPhrase=} [properties] Properties to set + */ + function ExcludedPhrase(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExcludedPhrase value. + * @member {string} value + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase + * @instance + */ + ExcludedPhrase.prototype.value = ""; + + /** + * Creates a new ExcludedPhrase instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.EntityType.IExcludedPhrase=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase} ExcludedPhrase instance + */ + ExcludedPhrase.create = function create(properties) { + return new ExcludedPhrase(properties); + }; + + /** + * Encodes the specified ExcludedPhrase message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.EntityType.IExcludedPhrase} message ExcludedPhrase message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExcludedPhrase.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); + return writer; + }; + + /** + * Encodes the specified ExcludedPhrase message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.EntityType.IExcludedPhrase} message ExcludedPhrase message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExcludedPhrase.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExcludedPhrase message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase} ExcludedPhrase + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExcludedPhrase.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.value = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } } - } - return message; - }; + return message; + }; - /** - * Decodes a ListSecuritySettingsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsResponse} ListSecuritySettingsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListSecuritySettingsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes an ExcludedPhrase message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase} ExcludedPhrase + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExcludedPhrase.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a ListSecuritySettingsResponse message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListSecuritySettingsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.securitySettings != null && message.hasOwnProperty("securitySettings")) { - if (!Array.isArray(message.securitySettings)) - return "securitySettings: array expected"; - for (var i = 0; i < message.securitySettings.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.SecuritySettings.verify(message.securitySettings[i]); - if (error) - return "securitySettings." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; + /** + * Verifies an ExcludedPhrase message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExcludedPhrase.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + return null; + }; - /** - * Creates a ListSecuritySettingsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsResponse} ListSecuritySettingsResponse - */ - ListSecuritySettingsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsResponse) + /** + * Creates an ExcludedPhrase message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase} ExcludedPhrase + */ + ExcludedPhrase.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase(); + if (object.value != null) + message.value = String(object.value); + return message; + }; + + /** + * Creates a plain object from an ExcludedPhrase message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase} message ExcludedPhrase + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExcludedPhrase.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = ""; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsResponse(); - if (object.securitySettings) { - if (!Array.isArray(object.securitySettings)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsResponse.securitySettings: array expected"); - message.securitySettings = []; - for (var i = 0; i < object.securitySettings.length; ++i) { - if (typeof object.securitySettings[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsResponse.securitySettings: object expected"); - message.securitySettings[i] = $root.google.cloud.dialogflow.cx.v3beta1.SecuritySettings.fromObject(object.securitySettings[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; + }; + + /** + * Converts this ExcludedPhrase to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase + * @instance + * @returns {Object.} JSON object + */ + ExcludedPhrase.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ExcludedPhrase; + })(); /** - * Creates a plain object from a ListSecuritySettingsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsResponse - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsResponse} message ListSecuritySettingsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Kind enum. + * @name google.cloud.dialogflow.cx.v3beta1.EntityType.Kind + * @enum {number} + * @property {number} KIND_UNSPECIFIED=0 KIND_UNSPECIFIED value + * @property {number} KIND_MAP=1 KIND_MAP value + * @property {number} KIND_LIST=2 KIND_LIST value + * @property {number} KIND_REGEXP=3 KIND_REGEXP value */ - ListSecuritySettingsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.securitySettings = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.securitySettings && message.securitySettings.length) { - object.securitySettings = []; - for (var j = 0; j < message.securitySettings.length; ++j) - object.securitySettings[j] = $root.google.cloud.dialogflow.cx.v3beta1.SecuritySettings.toObject(message.securitySettings[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; + EntityType.Kind = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "KIND_UNSPECIFIED"] = 0; + values[valuesById[1] = "KIND_MAP"] = 1; + values[valuesById[2] = "KIND_LIST"] = 2; + values[valuesById[3] = "KIND_REGEXP"] = 3; + return values; + })(); /** - * Converts this ListSecuritySettingsResponse to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsResponse - * @instance - * @returns {Object.} JSON object + * AutoExpansionMode enum. + * @name google.cloud.dialogflow.cx.v3beta1.EntityType.AutoExpansionMode + * @enum {number} + * @property {number} AUTO_EXPANSION_MODE_UNSPECIFIED=0 AUTO_EXPANSION_MODE_UNSPECIFIED value + * @property {number} AUTO_EXPANSION_MODE_DEFAULT=1 AUTO_EXPANSION_MODE_DEFAULT value */ - ListSecuritySettingsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + EntityType.AutoExpansionMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "AUTO_EXPANSION_MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "AUTO_EXPANSION_MODE_DEFAULT"] = 1; + return values; + })(); - return ListSecuritySettingsResponse; + return EntityType; })(); - v3beta1.CreateSecuritySettingsRequest = (function() { + v3beta1.ListEntityTypesRequest = (function() { /** - * Properties of a CreateSecuritySettingsRequest. + * Properties of a ListEntityTypesRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface ICreateSecuritySettingsRequest - * @property {string|null} [parent] CreateSecuritySettingsRequest parent - * @property {google.cloud.dialogflow.cx.v3beta1.ISecuritySettings|null} [securitySettings] CreateSecuritySettingsRequest securitySettings + * @interface IListEntityTypesRequest + * @property {string|null} [parent] ListEntityTypesRequest parent + * @property {string|null} [languageCode] ListEntityTypesRequest languageCode + * @property {number|null} [pageSize] ListEntityTypesRequest pageSize + * @property {string|null} [pageToken] ListEntityTypesRequest pageToken */ /** - * Constructs a new CreateSecuritySettingsRequest. + * Constructs a new ListEntityTypesRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a CreateSecuritySettingsRequest. - * @implements ICreateSecuritySettingsRequest + * @classdesc Represents a ListEntityTypesRequest. + * @implements IListEntityTypesRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.ICreateSecuritySettingsRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IListEntityTypesRequest=} [properties] Properties to set */ - function CreateSecuritySettingsRequest(properties) { + function ListEntityTypesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -52591,80 +60505,100 @@ } /** - * CreateSecuritySettingsRequest parent. + * ListEntityTypesRequest parent. * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest * @instance */ - CreateSecuritySettingsRequest.prototype.parent = ""; + ListEntityTypesRequest.prototype.parent = ""; /** - * CreateSecuritySettingsRequest securitySettings. - * @member {google.cloud.dialogflow.cx.v3beta1.ISecuritySettings|null|undefined} securitySettings - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateSecuritySettingsRequest + * ListEntityTypesRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest * @instance */ - CreateSecuritySettingsRequest.prototype.securitySettings = null; + ListEntityTypesRequest.prototype.languageCode = ""; /** - * Creates a new CreateSecuritySettingsRequest instance using the specified properties. + * ListEntityTypesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest + * @instance + */ + ListEntityTypesRequest.prototype.pageSize = 0; + + /** + * ListEntityTypesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest + * @instance + */ + ListEntityTypesRequest.prototype.pageToken = ""; + + /** + * Creates a new ListEntityTypesRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ICreateSecuritySettingsRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.CreateSecuritySettingsRequest} CreateSecuritySettingsRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.IListEntityTypesRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest} ListEntityTypesRequest instance */ - CreateSecuritySettingsRequest.create = function create(properties) { - return new CreateSecuritySettingsRequest(properties); + ListEntityTypesRequest.create = function create(properties) { + return new ListEntityTypesRequest(properties); }; /** - * Encodes the specified CreateSecuritySettingsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateSecuritySettingsRequest.verify|verify} messages. + * Encodes the specified ListEntityTypesRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ICreateSecuritySettingsRequest} message CreateSecuritySettingsRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IListEntityTypesRequest} message ListEntityTypesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateSecuritySettingsRequest.encode = function encode(message, writer) { + ListEntityTypesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.securitySettings != null && Object.hasOwnProperty.call(message, "securitySettings")) - $root.google.cloud.dialogflow.cx.v3beta1.SecuritySettings.encode(message.securitySettings, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); return writer; }; /** - * Encodes the specified CreateSecuritySettingsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateSecuritySettingsRequest.verify|verify} messages. + * Encodes the specified ListEntityTypesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ICreateSecuritySettingsRequest} message CreateSecuritySettingsRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IListEntityTypesRequest} message ListEntityTypesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateSecuritySettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListEntityTypesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateSecuritySettingsRequest message from the specified reader or buffer. + * Decodes a ListEntityTypesRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.CreateSecuritySettingsRequest} CreateSecuritySettingsRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest} ListEntityTypesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateSecuritySettingsRequest.decode = function decode(reader, length) { + ListEntityTypesRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.CreateSecuritySettingsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -52672,7 +60606,13 @@ message.parent = reader.string(); break; case 2: - message.securitySettings = $root.google.cloud.dialogflow.cx.v3beta1.SecuritySettings.decode(reader, reader.uint32()); + message.languageCode = reader.string(); + break; + case 3: + message.pageSize = reader.int32(); + break; + case 4: + message.pageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -52683,121 +60623,134 @@ }; /** - * Decodes a CreateSecuritySettingsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListEntityTypesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.CreateSecuritySettingsRequest} CreateSecuritySettingsRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest} ListEntityTypesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateSecuritySettingsRequest.decodeDelimited = function decodeDelimited(reader) { + ListEntityTypesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateSecuritySettingsRequest message. + * Verifies a ListEntityTypesRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateSecuritySettingsRequest.verify = function verify(message) { + ListEntityTypesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.parent != null && message.hasOwnProperty("parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.securitySettings != null && message.hasOwnProperty("securitySettings")) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.SecuritySettings.verify(message.securitySettings); - if (error) - return "securitySettings." + error; - } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; return null; }; /** - * Creates a CreateSecuritySettingsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListEntityTypesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.CreateSecuritySettingsRequest} CreateSecuritySettingsRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest} ListEntityTypesRequest */ - CreateSecuritySettingsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.CreateSecuritySettingsRequest) + ListEntityTypesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.CreateSecuritySettingsRequest(); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest(); if (object.parent != null) message.parent = String(object.parent); - if (object.securitySettings != null) { - if (typeof object.securitySettings !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.CreateSecuritySettingsRequest.securitySettings: object expected"); - message.securitySettings = $root.google.cloud.dialogflow.cx.v3beta1.SecuritySettings.fromObject(object.securitySettings); - } + if (object.languageCode != null) + message.languageCode = String(object.languageCode); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); return message; }; /** - * Creates a plain object from a CreateSecuritySettingsRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListEntityTypesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.CreateSecuritySettingsRequest} message CreateSecuritySettingsRequest + * @param {google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest} message ListEntityTypesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateSecuritySettingsRequest.toObject = function toObject(message, options) { + ListEntityTypesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.parent = ""; - object.securitySettings = null; + object.languageCode = ""; + object.pageSize = 0; + object.pageToken = ""; } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; - if (message.securitySettings != null && message.hasOwnProperty("securitySettings")) - object.securitySettings = $root.google.cloud.dialogflow.cx.v3beta1.SecuritySettings.toObject(message.securitySettings, options); + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; return object; }; /** - * Converts this CreateSecuritySettingsRequest to JSON. + * Converts this ListEntityTypesRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest * @instance * @returns {Object.} JSON object */ - CreateSecuritySettingsRequest.prototype.toJSON = function toJSON() { + ListEntityTypesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CreateSecuritySettingsRequest; + return ListEntityTypesRequest; })(); - v3beta1.DeleteSecuritySettingsRequest = (function() { + v3beta1.ListEntityTypesResponse = (function() { /** - * Properties of a DeleteSecuritySettingsRequest. + * Properties of a ListEntityTypesResponse. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IDeleteSecuritySettingsRequest - * @property {string|null} [name] DeleteSecuritySettingsRequest name + * @interface IListEntityTypesResponse + * @property {Array.|null} [entityTypes] ListEntityTypesResponse entityTypes + * @property {string|null} [nextPageToken] ListEntityTypesResponse nextPageToken */ /** - * Constructs a new DeleteSecuritySettingsRequest. + * Constructs a new ListEntityTypesResponse. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a DeleteSecuritySettingsRequest. - * @implements IDeleteSecuritySettingsRequest + * @classdesc Represents a ListEntityTypesResponse. + * @implements IListEntityTypesResponse * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteSecuritySettingsRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IListEntityTypesResponse=} [properties] Properties to set */ - function DeleteSecuritySettingsRequest(properties) { + function ListEntityTypesResponse(properties) { + this.entityTypes = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -52805,75 +60758,91 @@ } /** - * DeleteSecuritySettingsRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteSecuritySettingsRequest + * ListEntityTypesResponse entityTypes. + * @member {Array.} entityTypes + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse * @instance */ - DeleteSecuritySettingsRequest.prototype.name = ""; + ListEntityTypesResponse.prototype.entityTypes = $util.emptyArray; /** - * Creates a new DeleteSecuritySettingsRequest instance using the specified properties. + * ListEntityTypesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse + * @instance + */ + ListEntityTypesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListEntityTypesResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteSecuritySettingsRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteSecuritySettingsRequest} DeleteSecuritySettingsRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.IListEntityTypesResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse} ListEntityTypesResponse instance */ - DeleteSecuritySettingsRequest.create = function create(properties) { - return new DeleteSecuritySettingsRequest(properties); + ListEntityTypesResponse.create = function create(properties) { + return new ListEntityTypesResponse(properties); }; /** - * Encodes the specified DeleteSecuritySettingsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeleteSecuritySettingsRequest.verify|verify} messages. + * Encodes the specified ListEntityTypesResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteSecuritySettingsRequest} message DeleteSecuritySettingsRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IListEntityTypesResponse} message ListEntityTypesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteSecuritySettingsRequest.encode = function encode(message, writer) { + ListEntityTypesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.entityTypes != null && message.entityTypes.length) + for (var i = 0; i < message.entityTypes.length; ++i) + $root.google.cloud.dialogflow.cx.v3beta1.EntityType.encode(message.entityTypes[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified DeleteSecuritySettingsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeleteSecuritySettingsRequest.verify|verify} messages. + * Encodes the specified ListEntityTypesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteSecuritySettingsRequest} message DeleteSecuritySettingsRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IListEntityTypesResponse} message ListEntityTypesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteSecuritySettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListEntityTypesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteSecuritySettingsRequest message from the specified reader or buffer. + * Decodes a ListEntityTypesResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteSecuritySettingsRequest} DeleteSecuritySettingsRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse} ListEntityTypesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteSecuritySettingsRequest.decode = function decode(reader, length) { + ListEntityTypesResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.DeleteSecuritySettingsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + if (!(message.entityTypes && message.entityTypes.length)) + message.entityTypes = []; + message.entityTypes.push($root.google.cloud.dialogflow.cx.v3beta1.EntityType.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -52884,114 +60853,134 @@ }; /** - * Decodes a DeleteSecuritySettingsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListEntityTypesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteSecuritySettingsRequest} DeleteSecuritySettingsRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse} ListEntityTypesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteSecuritySettingsRequest.decodeDelimited = function decodeDelimited(reader) { + ListEntityTypesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteSecuritySettingsRequest message. + * Verifies a ListEntityTypesResponse message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteSecuritySettingsRequest.verify = function verify(message) { + ListEntityTypesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.entityTypes != null && message.hasOwnProperty("entityTypes")) { + if (!Array.isArray(message.entityTypes)) + return "entityTypes: array expected"; + for (var i = 0; i < message.entityTypes.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.EntityType.verify(message.entityTypes[i]); + if (error) + return "entityTypes." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a DeleteSecuritySettingsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListEntityTypesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteSecuritySettingsRequest} DeleteSecuritySettingsRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse} ListEntityTypesResponse */ - DeleteSecuritySettingsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.DeleteSecuritySettingsRequest) + ListEntityTypesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.DeleteSecuritySettingsRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse(); + if (object.entityTypes) { + if (!Array.isArray(object.entityTypes)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse.entityTypes: array expected"); + message.entityTypes = []; + for (var i = 0; i < object.entityTypes.length; ++i) { + if (typeof object.entityTypes[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse.entityTypes: object expected"); + message.entityTypes[i] = $root.google.cloud.dialogflow.cx.v3beta1.EntityType.fromObject(object.entityTypes[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a DeleteSecuritySettingsRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListEntityTypesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.DeleteSecuritySettingsRequest} message DeleteSecuritySettingsRequest + * @param {google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse} message ListEntityTypesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteSecuritySettingsRequest.toObject = function toObject(message, options) { + ListEntityTypesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.entityTypes = []; if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + object.nextPageToken = ""; + if (message.entityTypes && message.entityTypes.length) { + object.entityTypes = []; + for (var j = 0; j < message.entityTypes.length; ++j) + object.entityTypes[j] = $root.google.cloud.dialogflow.cx.v3beta1.EntityType.toObject(message.entityTypes[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this DeleteSecuritySettingsRequest to JSON. + * Converts this ListEntityTypesResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse * @instance * @returns {Object.} JSON object */ - DeleteSecuritySettingsRequest.prototype.toJSON = function toJSON() { + ListEntityTypesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeleteSecuritySettingsRequest; + return ListEntityTypesResponse; })(); - v3beta1.SecuritySettings = (function() { + v3beta1.GetEntityTypeRequest = (function() { /** - * Properties of a SecuritySettings. + * Properties of a GetEntityTypeRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface ISecuritySettings - * @property {string|null} [name] SecuritySettings name - * @property {string|null} [displayName] SecuritySettings displayName - * @property {google.cloud.dialogflow.cx.v3beta1.SecuritySettings.RedactionStrategy|null} [redactionStrategy] SecuritySettings redactionStrategy - * @property {google.cloud.dialogflow.cx.v3beta1.SecuritySettings.RedactionScope|null} [redactionScope] SecuritySettings redactionScope - * @property {string|null} [inspectTemplate] SecuritySettings inspectTemplate - * @property {number|null} [retentionWindowDays] SecuritySettings retentionWindowDays - * @property {Array.|null} [purgeDataTypes] SecuritySettings purgeDataTypes + * @interface IGetEntityTypeRequest + * @property {string|null} [name] GetEntityTypeRequest name + * @property {string|null} [languageCode] GetEntityTypeRequest languageCode */ /** - * Constructs a new SecuritySettings. + * Constructs a new GetEntityTypeRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a SecuritySettings. - * @implements ISecuritySettings + * @classdesc Represents a GetEntityTypeRequest. + * @implements IGetEntityTypeRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.ISecuritySettings=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IGetEntityTypeRequest=} [properties] Properties to set */ - function SecuritySettings(properties) { - this.purgeDataTypes = []; + function GetEntityTypeRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -52999,148 +60988,80 @@ } /** - * SecuritySettings name. + * GetEntityTypeRequest name. * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.SecuritySettings - * @instance - */ - SecuritySettings.prototype.name = ""; - - /** - * SecuritySettings displayName. - * @member {string} displayName - * @memberof google.cloud.dialogflow.cx.v3beta1.SecuritySettings - * @instance - */ - SecuritySettings.prototype.displayName = ""; - - /** - * SecuritySettings redactionStrategy. - * @member {google.cloud.dialogflow.cx.v3beta1.SecuritySettings.RedactionStrategy} redactionStrategy - * @memberof google.cloud.dialogflow.cx.v3beta1.SecuritySettings - * @instance - */ - SecuritySettings.prototype.redactionStrategy = 0; - - /** - * SecuritySettings redactionScope. - * @member {google.cloud.dialogflow.cx.v3beta1.SecuritySettings.RedactionScope} redactionScope - * @memberof google.cloud.dialogflow.cx.v3beta1.SecuritySettings - * @instance - */ - SecuritySettings.prototype.redactionScope = 0; - - /** - * SecuritySettings inspectTemplate. - * @member {string} inspectTemplate - * @memberof google.cloud.dialogflow.cx.v3beta1.SecuritySettings - * @instance - */ - SecuritySettings.prototype.inspectTemplate = ""; - - /** - * SecuritySettings retentionWindowDays. - * @member {number} retentionWindowDays - * @memberof google.cloud.dialogflow.cx.v3beta1.SecuritySettings - * @instance - */ - SecuritySettings.prototype.retentionWindowDays = 0; - - /** - * SecuritySettings purgeDataTypes. - * @member {Array.} purgeDataTypes - * @memberof google.cloud.dialogflow.cx.v3beta1.SecuritySettings + * @memberof google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest * @instance */ - SecuritySettings.prototype.purgeDataTypes = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + GetEntityTypeRequest.prototype.name = ""; /** - * SecuritySettings dataRetention. - * @member {"retentionWindowDays"|undefined} dataRetention - * @memberof google.cloud.dialogflow.cx.v3beta1.SecuritySettings + * GetEntityTypeRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest * @instance */ - Object.defineProperty(SecuritySettings.prototype, "dataRetention", { - get: $util.oneOfGetter($oneOfFields = ["retentionWindowDays"]), - set: $util.oneOfSetter($oneOfFields) - }); + GetEntityTypeRequest.prototype.languageCode = ""; /** - * Creates a new SecuritySettings instance using the specified properties. + * Creates a new GetEntityTypeRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.SecuritySettings + * @memberof google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ISecuritySettings=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.SecuritySettings} SecuritySettings instance + * @param {google.cloud.dialogflow.cx.v3beta1.IGetEntityTypeRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest} GetEntityTypeRequest instance */ - SecuritySettings.create = function create(properties) { - return new SecuritySettings(properties); + GetEntityTypeRequest.create = function create(properties) { + return new GetEntityTypeRequest(properties); }; /** - * Encodes the specified SecuritySettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SecuritySettings.verify|verify} messages. + * Encodes the specified GetEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.SecuritySettings + * @memberof google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ISecuritySettings} message SecuritySettings message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IGetEntityTypeRequest} message GetEntityTypeRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SecuritySettings.encode = function encode(message, writer) { + GetEntityTypeRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.redactionStrategy != null && Object.hasOwnProperty.call(message, "redactionStrategy")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.redactionStrategy); - if (message.redactionScope != null && Object.hasOwnProperty.call(message, "redactionScope")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.redactionScope); - if (message.retentionWindowDays != null && Object.hasOwnProperty.call(message, "retentionWindowDays")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.retentionWindowDays); - if (message.purgeDataTypes != null && message.purgeDataTypes.length) { - writer.uint32(/* id 8, wireType 2 =*/66).fork(); - for (var i = 0; i < message.purgeDataTypes.length; ++i) - writer.int32(message.purgeDataTypes[i]); - writer.ldelim(); - } - if (message.inspectTemplate != null && Object.hasOwnProperty.call(message, "inspectTemplate")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.inspectTemplate); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); return writer; }; /** - * Encodes the specified SecuritySettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SecuritySettings.verify|verify} messages. + * Encodes the specified GetEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.SecuritySettings + * @memberof google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ISecuritySettings} message SecuritySettings message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IGetEntityTypeRequest} message GetEntityTypeRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SecuritySettings.encodeDelimited = function encodeDelimited(message, writer) { + GetEntityTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SecuritySettings message from the specified reader or buffer. + * Decodes a GetEntityTypeRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.SecuritySettings + * @memberof google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.SecuritySettings} SecuritySettings + * @returns {google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest} GetEntityTypeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SecuritySettings.decode = function decode(reader, length) { + GetEntityTypeRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.SecuritySettings(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -53148,29 +61069,7 @@ message.name = reader.string(); break; case 2: - message.displayName = reader.string(); - break; - case 3: - message.redactionStrategy = reader.int32(); - break; - case 4: - message.redactionScope = reader.int32(); - break; - case 9: - message.inspectTemplate = reader.string(); - break; - case 6: - message.retentionWindowDays = reader.int32(); - break; - case 8: - if (!(message.purgeDataTypes && message.purgeDataTypes.length)) - message.purgeDataTypes = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.purgeDataTypes.push(reader.int32()); - } else - message.purgeDataTypes.push(reader.int32()); + message.languageCode = reader.string(); break; default: reader.skipType(tag & 7); @@ -53181,260 +61080,118 @@ }; /** - * Decodes a SecuritySettings message from the specified reader or buffer, length delimited. + * Decodes a GetEntityTypeRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.SecuritySettings + * @memberof google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.SecuritySettings} SecuritySettings + * @returns {google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest} GetEntityTypeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SecuritySettings.decodeDelimited = function decodeDelimited(reader) { + GetEntityTypeRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SecuritySettings message. + * Verifies a GetEntityTypeRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.SecuritySettings + * @memberof google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SecuritySettings.verify = function verify(message) { + GetEntityTypeRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.redactionStrategy != null && message.hasOwnProperty("redactionStrategy")) - switch (message.redactionStrategy) { - default: - return "redactionStrategy: enum value expected"; - case 0: - case 1: - break; - } - if (message.redactionScope != null && message.hasOwnProperty("redactionScope")) - switch (message.redactionScope) { - default: - return "redactionScope: enum value expected"; - case 0: - case 2: - break; - } - if (message.inspectTemplate != null && message.hasOwnProperty("inspectTemplate")) - if (!$util.isString(message.inspectTemplate)) - return "inspectTemplate: string expected"; - if (message.retentionWindowDays != null && message.hasOwnProperty("retentionWindowDays")) { - properties.dataRetention = 1; - if (!$util.isInteger(message.retentionWindowDays)) - return "retentionWindowDays: integer expected"; - } - if (message.purgeDataTypes != null && message.hasOwnProperty("purgeDataTypes")) { - if (!Array.isArray(message.purgeDataTypes)) - return "purgeDataTypes: array expected"; - for (var i = 0; i < message.purgeDataTypes.length; ++i) - switch (message.purgeDataTypes[i]) { - default: - return "purgeDataTypes: enum value[] expected"; - case 0: - case 1: - break; - } - } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; return null; }; /** - * Creates a SecuritySettings message from a plain object. Also converts values to their respective internal types. + * Creates a GetEntityTypeRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.SecuritySettings + * @memberof google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.SecuritySettings} SecuritySettings + * @returns {google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest} GetEntityTypeRequest */ - SecuritySettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.SecuritySettings) + GetEntityTypeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.SecuritySettings(); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest(); if (object.name != null) message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - switch (object.redactionStrategy) { - case "REDACTION_STRATEGY_UNSPECIFIED": - case 0: - message.redactionStrategy = 0; - break; - case "REDACT_WITH_SERVICE": - case 1: - message.redactionStrategy = 1; - break; - } - switch (object.redactionScope) { - case "REDACTION_SCOPE_UNSPECIFIED": - case 0: - message.redactionScope = 0; - break; - case "REDACT_DISK_STORAGE": - case 2: - message.redactionScope = 2; - break; - } - if (object.inspectTemplate != null) - message.inspectTemplate = String(object.inspectTemplate); - if (object.retentionWindowDays != null) - message.retentionWindowDays = object.retentionWindowDays | 0; - if (object.purgeDataTypes) { - if (!Array.isArray(object.purgeDataTypes)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.SecuritySettings.purgeDataTypes: array expected"); - message.purgeDataTypes = []; - for (var i = 0; i < object.purgeDataTypes.length; ++i) - switch (object.purgeDataTypes[i]) { - default: - case "PURGE_DATA_TYPE_UNSPECIFIED": - case 0: - message.purgeDataTypes[i] = 0; - break; - case "DIALOGFLOW_HISTORY": - case 1: - message.purgeDataTypes[i] = 1; - break; - } - } + if (object.languageCode != null) + message.languageCode = String(object.languageCode); return message; }; /** - * Creates a plain object from a SecuritySettings message. Also converts values to other types if specified. + * Creates a plain object from a GetEntityTypeRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.SecuritySettings + * @memberof google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.SecuritySettings} message SecuritySettings + * @param {google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest} message GetEntityTypeRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SecuritySettings.toObject = function toObject(message, options) { + GetEntityTypeRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.purgeDataTypes = []; if (options.defaults) { object.name = ""; - object.displayName = ""; - object.redactionStrategy = options.enums === String ? "REDACTION_STRATEGY_UNSPECIFIED" : 0; - object.redactionScope = options.enums === String ? "REDACTION_SCOPE_UNSPECIFIED" : 0; - object.inspectTemplate = ""; + object.languageCode = ""; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.redactionStrategy != null && message.hasOwnProperty("redactionStrategy")) - object.redactionStrategy = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.SecuritySettings.RedactionStrategy[message.redactionStrategy] : message.redactionStrategy; - if (message.redactionScope != null && message.hasOwnProperty("redactionScope")) - object.redactionScope = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.SecuritySettings.RedactionScope[message.redactionScope] : message.redactionScope; - if (message.retentionWindowDays != null && message.hasOwnProperty("retentionWindowDays")) { - object.retentionWindowDays = message.retentionWindowDays; - if (options.oneofs) - object.dataRetention = "retentionWindowDays"; - } - if (message.purgeDataTypes && message.purgeDataTypes.length) { - object.purgeDataTypes = []; - for (var j = 0; j < message.purgeDataTypes.length; ++j) - object.purgeDataTypes[j] = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.SecuritySettings.PurgeDataType[message.purgeDataTypes[j]] : message.purgeDataTypes[j]; - } - if (message.inspectTemplate != null && message.hasOwnProperty("inspectTemplate")) - object.inspectTemplate = message.inspectTemplate; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; return object; }; /** - * Converts this SecuritySettings to JSON. + * Converts this GetEntityTypeRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.SecuritySettings + * @memberof google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest * @instance * @returns {Object.} JSON object */ - SecuritySettings.prototype.toJSON = function toJSON() { + GetEntityTypeRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * RedactionStrategy enum. - * @name google.cloud.dialogflow.cx.v3beta1.SecuritySettings.RedactionStrategy - * @enum {number} - * @property {number} REDACTION_STRATEGY_UNSPECIFIED=0 REDACTION_STRATEGY_UNSPECIFIED value - * @property {number} REDACT_WITH_SERVICE=1 REDACT_WITH_SERVICE value - */ - SecuritySettings.RedactionStrategy = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "REDACTION_STRATEGY_UNSPECIFIED"] = 0; - values[valuesById[1] = "REDACT_WITH_SERVICE"] = 1; - return values; - })(); - - /** - * RedactionScope enum. - * @name google.cloud.dialogflow.cx.v3beta1.SecuritySettings.RedactionScope - * @enum {number} - * @property {number} REDACTION_SCOPE_UNSPECIFIED=0 REDACTION_SCOPE_UNSPECIFIED value - * @property {number} REDACT_DISK_STORAGE=2 REDACT_DISK_STORAGE value - */ - SecuritySettings.RedactionScope = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "REDACTION_SCOPE_UNSPECIFIED"] = 0; - values[valuesById[2] = "REDACT_DISK_STORAGE"] = 2; - return values; - })(); - - /** - * PurgeDataType enum. - * @name google.cloud.dialogflow.cx.v3beta1.SecuritySettings.PurgeDataType - * @enum {number} - * @property {number} PURGE_DATA_TYPE_UNSPECIFIED=0 PURGE_DATA_TYPE_UNSPECIFIED value - * @property {number} DIALOGFLOW_HISTORY=1 DIALOGFLOW_HISTORY value - */ - SecuritySettings.PurgeDataType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PURGE_DATA_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DIALOGFLOW_HISTORY"] = 1; - return values; - })(); - - return SecuritySettings; + return GetEntityTypeRequest; })(); - v3beta1.SpeechWordInfo = (function() { + v3beta1.CreateEntityTypeRequest = (function() { /** - * Properties of a SpeechWordInfo. + * Properties of a CreateEntityTypeRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface ISpeechWordInfo - * @property {string|null} [word] SpeechWordInfo word - * @property {google.protobuf.IDuration|null} [startOffset] SpeechWordInfo startOffset - * @property {google.protobuf.IDuration|null} [endOffset] SpeechWordInfo endOffset - * @property {number|null} [confidence] SpeechWordInfo confidence + * @interface ICreateEntityTypeRequest + * @property {string|null} [parent] CreateEntityTypeRequest parent + * @property {google.cloud.dialogflow.cx.v3beta1.IEntityType|null} [entityType] CreateEntityTypeRequest entityType + * @property {string|null} [languageCode] CreateEntityTypeRequest languageCode */ /** - * Constructs a new SpeechWordInfo. + * Constructs a new CreateEntityTypeRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a SpeechWordInfo. - * @implements ISpeechWordInfo + * @classdesc Represents a CreateEntityTypeRequest. + * @implements ICreateEntityTypeRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.ISpeechWordInfo=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.ICreateEntityTypeRequest=} [properties] Properties to set */ - function SpeechWordInfo(properties) { + function CreateEntityTypeRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -53442,114 +61199,101 @@ } /** - * SpeechWordInfo word. - * @member {string} word - * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo - * @instance - */ - SpeechWordInfo.prototype.word = ""; - - /** - * SpeechWordInfo startOffset. - * @member {google.protobuf.IDuration|null|undefined} startOffset - * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo + * CreateEntityTypeRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest * @instance */ - SpeechWordInfo.prototype.startOffset = null; + CreateEntityTypeRequest.prototype.parent = ""; /** - * SpeechWordInfo endOffset. - * @member {google.protobuf.IDuration|null|undefined} endOffset - * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo + * CreateEntityTypeRequest entityType. + * @member {google.cloud.dialogflow.cx.v3beta1.IEntityType|null|undefined} entityType + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest * @instance */ - SpeechWordInfo.prototype.endOffset = null; + CreateEntityTypeRequest.prototype.entityType = null; /** - * SpeechWordInfo confidence. - * @member {number} confidence - * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo + * CreateEntityTypeRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest * @instance */ - SpeechWordInfo.prototype.confidence = 0; + CreateEntityTypeRequest.prototype.languageCode = ""; /** - * Creates a new SpeechWordInfo instance using the specified properties. + * Creates a new CreateEntityTypeRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ISpeechWordInfo=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo} SpeechWordInfo instance + * @param {google.cloud.dialogflow.cx.v3beta1.ICreateEntityTypeRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest} CreateEntityTypeRequest instance */ - SpeechWordInfo.create = function create(properties) { - return new SpeechWordInfo(properties); + CreateEntityTypeRequest.create = function create(properties) { + return new CreateEntityTypeRequest(properties); }; /** - * Encodes the specified SpeechWordInfo message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo.verify|verify} messages. + * Encodes the specified CreateEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ISpeechWordInfo} message SpeechWordInfo message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.ICreateEntityTypeRequest} message CreateEntityTypeRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SpeechWordInfo.encode = function encode(message, writer) { + CreateEntityTypeRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.startOffset != null && Object.hasOwnProperty.call(message, "startOffset")) - $root.google.protobuf.Duration.encode(message.startOffset, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.endOffset != null && Object.hasOwnProperty.call(message, "endOffset")) - $root.google.protobuf.Duration.encode(message.endOffset, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.word != null && Object.hasOwnProperty.call(message, "word")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.word); - if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) - writer.uint32(/* id 4, wireType 5 =*/37).float(message.confidence); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.entityType != null && Object.hasOwnProperty.call(message, "entityType")) + $root.google.cloud.dialogflow.cx.v3beta1.EntityType.encode(message.entityType, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.languageCode); return writer; }; /** - * Encodes the specified SpeechWordInfo message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo.verify|verify} messages. + * Encodes the specified CreateEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ISpeechWordInfo} message SpeechWordInfo message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.ICreateEntityTypeRequest} message CreateEntityTypeRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SpeechWordInfo.encodeDelimited = function encodeDelimited(message, writer) { + CreateEntityTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SpeechWordInfo message from the specified reader or buffer. + * Decodes a CreateEntityTypeRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo} SpeechWordInfo + * @returns {google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest} CreateEntityTypeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SpeechWordInfo.decode = function decode(reader, length) { + CreateEntityTypeRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 3: - message.word = reader.string(); - break; case 1: - message.startOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + message.parent = reader.string(); break; case 2: - message.endOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + message.entityType = $root.google.cloud.dialogflow.cx.v3beta1.EntityType.decode(reader, reader.uint32()); break; - case 4: - message.confidence = reader.float(); + case 3: + message.languageCode = reader.string(); break; default: reader.skipType(tag & 7); @@ -53560,175 +61304,131 @@ }; /** - * Decodes a SpeechWordInfo message from the specified reader or buffer, length delimited. + * Decodes a CreateEntityTypeRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo} SpeechWordInfo + * @returns {google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest} CreateEntityTypeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SpeechWordInfo.decodeDelimited = function decodeDelimited(reader) { + CreateEntityTypeRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SpeechWordInfo message. + * Verifies a CreateEntityTypeRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SpeechWordInfo.verify = function verify(message) { + CreateEntityTypeRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.word != null && message.hasOwnProperty("word")) - if (!$util.isString(message.word)) - return "word: string expected"; - if (message.startOffset != null && message.hasOwnProperty("startOffset")) { - var error = $root.google.protobuf.Duration.verify(message.startOffset); - if (error) - return "startOffset." + error; - } - if (message.endOffset != null && message.hasOwnProperty("endOffset")) { - var error = $root.google.protobuf.Duration.verify(message.endOffset); + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.entityType != null && message.hasOwnProperty("entityType")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.EntityType.verify(message.entityType); if (error) - return "endOffset." + error; + return "entityType." + error; } - if (message.confidence != null && message.hasOwnProperty("confidence")) - if (typeof message.confidence !== "number") - return "confidence: number expected"; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; return null; }; /** - * Creates a SpeechWordInfo message from a plain object. Also converts values to their respective internal types. + * Creates a CreateEntityTypeRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo} SpeechWordInfo + * @returns {google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest} CreateEntityTypeRequest */ - SpeechWordInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo) + CreateEntityTypeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo(); - if (object.word != null) - message.word = String(object.word); - if (object.startOffset != null) { - if (typeof object.startOffset !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo.startOffset: object expected"); - message.startOffset = $root.google.protobuf.Duration.fromObject(object.startOffset); - } - if (object.endOffset != null) { - if (typeof object.endOffset !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo.endOffset: object expected"); - message.endOffset = $root.google.protobuf.Duration.fromObject(object.endOffset); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.entityType != null) { + if (typeof object.entityType !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest.entityType: object expected"); + message.entityType = $root.google.cloud.dialogflow.cx.v3beta1.EntityType.fromObject(object.entityType); } - if (object.confidence != null) - message.confidence = Number(object.confidence); + if (object.languageCode != null) + message.languageCode = String(object.languageCode); return message; }; /** - * Creates a plain object from a SpeechWordInfo message. Also converts values to other types if specified. + * Creates a plain object from a CreateEntityTypeRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo} message SpeechWordInfo + * @param {google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest} message CreateEntityTypeRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SpeechWordInfo.toObject = function toObject(message, options) { + CreateEntityTypeRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.startOffset = null; - object.endOffset = null; - object.word = ""; - object.confidence = 0; + object.parent = ""; + object.entityType = null; + object.languageCode = ""; } - if (message.startOffset != null && message.hasOwnProperty("startOffset")) - object.startOffset = $root.google.protobuf.Duration.toObject(message.startOffset, options); - if (message.endOffset != null && message.hasOwnProperty("endOffset")) - object.endOffset = $root.google.protobuf.Duration.toObject(message.endOffset, options); - if (message.word != null && message.hasOwnProperty("word")) - object.word = message.word; - if (message.confidence != null && message.hasOwnProperty("confidence")) - object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.entityType != null && message.hasOwnProperty("entityType")) + object.entityType = $root.google.cloud.dialogflow.cx.v3beta1.EntityType.toObject(message.entityType, options); + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; return object; }; /** - * Converts this SpeechWordInfo to JSON. + * Converts this CreateEntityTypeRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest * @instance * @returns {Object.} JSON object */ - SpeechWordInfo.prototype.toJSON = function toJSON() { + CreateEntityTypeRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return SpeechWordInfo; - })(); - - /** - * AudioEncoding enum. - * @name google.cloud.dialogflow.cx.v3beta1.AudioEncoding - * @enum {number} - * @property {number} AUDIO_ENCODING_UNSPECIFIED=0 AUDIO_ENCODING_UNSPECIFIED value - * @property {number} AUDIO_ENCODING_LINEAR_16=1 AUDIO_ENCODING_LINEAR_16 value - * @property {number} AUDIO_ENCODING_FLAC=2 AUDIO_ENCODING_FLAC value - * @property {number} AUDIO_ENCODING_MULAW=3 AUDIO_ENCODING_MULAW value - * @property {number} AUDIO_ENCODING_AMR=4 AUDIO_ENCODING_AMR value - * @property {number} AUDIO_ENCODING_AMR_WB=5 AUDIO_ENCODING_AMR_WB value - * @property {number} AUDIO_ENCODING_OGG_OPUS=6 AUDIO_ENCODING_OGG_OPUS value - * @property {number} AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE=7 AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE value - */ - v3beta1.AudioEncoding = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "AUDIO_ENCODING_UNSPECIFIED"] = 0; - values[valuesById[1] = "AUDIO_ENCODING_LINEAR_16"] = 1; - values[valuesById[2] = "AUDIO_ENCODING_FLAC"] = 2; - values[valuesById[3] = "AUDIO_ENCODING_MULAW"] = 3; - values[valuesById[4] = "AUDIO_ENCODING_AMR"] = 4; - values[valuesById[5] = "AUDIO_ENCODING_AMR_WB"] = 5; - values[valuesById[6] = "AUDIO_ENCODING_OGG_OPUS"] = 6; - values[valuesById[7] = "AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE"] = 7; - return values; + return CreateEntityTypeRequest; })(); - v3beta1.InputAudioConfig = (function() { + v3beta1.UpdateEntityTypeRequest = (function() { /** - * Properties of an InputAudioConfig. + * Properties of an UpdateEntityTypeRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IInputAudioConfig - * @property {google.cloud.dialogflow.cx.v3beta1.AudioEncoding|null} [audioEncoding] InputAudioConfig audioEncoding - * @property {number|null} [sampleRateHertz] InputAudioConfig sampleRateHertz - * @property {boolean|null} [enableWordInfo] InputAudioConfig enableWordInfo - * @property {Array.|null} [phraseHints] InputAudioConfig phraseHints - * @property {string|null} [model] InputAudioConfig model - * @property {google.cloud.dialogflow.cx.v3beta1.SpeechModelVariant|null} [modelVariant] InputAudioConfig modelVariant - * @property {boolean|null} [singleUtterance] InputAudioConfig singleUtterance + * @interface IUpdateEntityTypeRequest + * @property {google.cloud.dialogflow.cx.v3beta1.IEntityType|null} [entityType] UpdateEntityTypeRequest entityType + * @property {string|null} [languageCode] UpdateEntityTypeRequest languageCode + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateEntityTypeRequest updateMask */ /** - * Constructs a new InputAudioConfig. + * Constructs a new UpdateEntityTypeRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents an InputAudioConfig. - * @implements IInputAudioConfig + * @classdesc Represents an UpdateEntityTypeRequest. + * @implements IUpdateEntityTypeRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IInputAudioConfig=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateEntityTypeRequest=} [properties] Properties to set */ - function InputAudioConfig(properties) { - this.phraseHints = []; + function UpdateEntityTypeRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -53736,156 +61436,101 @@ } /** - * InputAudioConfig audioEncoding. - * @member {google.cloud.dialogflow.cx.v3beta1.AudioEncoding} audioEncoding - * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig - * @instance - */ - InputAudioConfig.prototype.audioEncoding = 0; - - /** - * InputAudioConfig sampleRateHertz. - * @member {number} sampleRateHertz - * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig - * @instance - */ - InputAudioConfig.prototype.sampleRateHertz = 0; - - /** - * InputAudioConfig enableWordInfo. - * @member {boolean} enableWordInfo - * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig - * @instance - */ - InputAudioConfig.prototype.enableWordInfo = false; - - /** - * InputAudioConfig phraseHints. - * @member {Array.} phraseHints - * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig - * @instance - */ - InputAudioConfig.prototype.phraseHints = $util.emptyArray; - - /** - * InputAudioConfig model. - * @member {string} model - * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig + * UpdateEntityTypeRequest entityType. + * @member {google.cloud.dialogflow.cx.v3beta1.IEntityType|null|undefined} entityType + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest * @instance */ - InputAudioConfig.prototype.model = ""; + UpdateEntityTypeRequest.prototype.entityType = null; /** - * InputAudioConfig modelVariant. - * @member {google.cloud.dialogflow.cx.v3beta1.SpeechModelVariant} modelVariant - * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig + * UpdateEntityTypeRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest * @instance */ - InputAudioConfig.prototype.modelVariant = 0; + UpdateEntityTypeRequest.prototype.languageCode = ""; /** - * InputAudioConfig singleUtterance. - * @member {boolean} singleUtterance - * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig + * UpdateEntityTypeRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest * @instance */ - InputAudioConfig.prototype.singleUtterance = false; + UpdateEntityTypeRequest.prototype.updateMask = null; /** - * Creates a new InputAudioConfig instance using the specified properties. + * Creates a new UpdateEntityTypeRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IInputAudioConfig=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.InputAudioConfig} InputAudioConfig instance + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateEntityTypeRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest} UpdateEntityTypeRequest instance */ - InputAudioConfig.create = function create(properties) { - return new InputAudioConfig(properties); + UpdateEntityTypeRequest.create = function create(properties) { + return new UpdateEntityTypeRequest(properties); }; /** - * Encodes the specified InputAudioConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.InputAudioConfig.verify|verify} messages. + * Encodes the specified UpdateEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IInputAudioConfig} message InputAudioConfig message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateEntityTypeRequest} message UpdateEntityTypeRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - InputAudioConfig.encode = function encode(message, writer) { + UpdateEntityTypeRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.audioEncoding != null && Object.hasOwnProperty.call(message, "audioEncoding")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.audioEncoding); - if (message.sampleRateHertz != null && Object.hasOwnProperty.call(message, "sampleRateHertz")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.sampleRateHertz); - if (message.phraseHints != null && message.phraseHints.length) - for (var i = 0; i < message.phraseHints.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.phraseHints[i]); - if (message.model != null && Object.hasOwnProperty.call(message, "model")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.model); - if (message.singleUtterance != null && Object.hasOwnProperty.call(message, "singleUtterance")) - writer.uint32(/* id 8, wireType 0 =*/64).bool(message.singleUtterance); - if (message.modelVariant != null && Object.hasOwnProperty.call(message, "modelVariant")) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.modelVariant); - if (message.enableWordInfo != null && Object.hasOwnProperty.call(message, "enableWordInfo")) - writer.uint32(/* id 13, wireType 0 =*/104).bool(message.enableWordInfo); + if (message.entityType != null && Object.hasOwnProperty.call(message, "entityType")) + $root.google.cloud.dialogflow.cx.v3beta1.EntityType.encode(message.entityType, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified InputAudioConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.InputAudioConfig.verify|verify} messages. + * Encodes the specified UpdateEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IInputAudioConfig} message InputAudioConfig message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateEntityTypeRequest} message UpdateEntityTypeRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - InputAudioConfig.encodeDelimited = function encodeDelimited(message, writer) { + UpdateEntityTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an InputAudioConfig message from the specified reader or buffer. + * Decodes an UpdateEntityTypeRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.InputAudioConfig} InputAudioConfig + * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest} UpdateEntityTypeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - InputAudioConfig.decode = function decode(reader, length) { + UpdateEntityTypeRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.InputAudioConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.audioEncoding = reader.int32(); + message.entityType = $root.google.cloud.dialogflow.cx.v3beta1.EntityType.decode(reader, reader.uint32()); break; case 2: - message.sampleRateHertz = reader.int32(); - break; - case 13: - message.enableWordInfo = reader.bool(); - break; - case 4: - if (!(message.phraseHints && message.phraseHints.length)) - message.phraseHints = []; - message.phraseHints.push(reader.string()); - break; - case 7: - message.model = reader.string(); - break; - case 10: - message.modelVariant = reader.int32(); + message.languageCode = reader.string(); break; - case 8: - message.singleUtterance = reader.bool(); + case 3: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -53896,254 +61541,135 @@ }; /** - * Decodes an InputAudioConfig message from the specified reader or buffer, length delimited. + * Decodes an UpdateEntityTypeRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.InputAudioConfig} InputAudioConfig + * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest} UpdateEntityTypeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - InputAudioConfig.decodeDelimited = function decodeDelimited(reader) { + UpdateEntityTypeRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an InputAudioConfig message. + * Verifies an UpdateEntityTypeRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - InputAudioConfig.verify = function verify(message) { + UpdateEntityTypeRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.audioEncoding != null && message.hasOwnProperty("audioEncoding")) - switch (message.audioEncoding) { - default: - return "audioEncoding: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - break; - } - if (message.sampleRateHertz != null && message.hasOwnProperty("sampleRateHertz")) - if (!$util.isInteger(message.sampleRateHertz)) - return "sampleRateHertz: integer expected"; - if (message.enableWordInfo != null && message.hasOwnProperty("enableWordInfo")) - if (typeof message.enableWordInfo !== "boolean") - return "enableWordInfo: boolean expected"; - if (message.phraseHints != null && message.hasOwnProperty("phraseHints")) { - if (!Array.isArray(message.phraseHints)) - return "phraseHints: array expected"; - for (var i = 0; i < message.phraseHints.length; ++i) - if (!$util.isString(message.phraseHints[i])) - return "phraseHints: string[] expected"; + if (message.entityType != null && message.hasOwnProperty("entityType")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.EntityType.verify(message.entityType); + if (error) + return "entityType." + error; + } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; } - if (message.model != null && message.hasOwnProperty("model")) - if (!$util.isString(message.model)) - return "model: string expected"; - if (message.modelVariant != null && message.hasOwnProperty("modelVariant")) - switch (message.modelVariant) { - default: - return "modelVariant: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.singleUtterance != null && message.hasOwnProperty("singleUtterance")) - if (typeof message.singleUtterance !== "boolean") - return "singleUtterance: boolean expected"; return null; }; /** - * Creates an InputAudioConfig message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateEntityTypeRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.InputAudioConfig} InputAudioConfig + * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest} UpdateEntityTypeRequest */ - InputAudioConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.InputAudioConfig) + UpdateEntityTypeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.InputAudioConfig(); - switch (object.audioEncoding) { - case "AUDIO_ENCODING_UNSPECIFIED": - case 0: - message.audioEncoding = 0; - break; - case "AUDIO_ENCODING_LINEAR_16": - case 1: - message.audioEncoding = 1; - break; - case "AUDIO_ENCODING_FLAC": - case 2: - message.audioEncoding = 2; - break; - case "AUDIO_ENCODING_MULAW": - case 3: - message.audioEncoding = 3; - break; - case "AUDIO_ENCODING_AMR": - case 4: - message.audioEncoding = 4; - break; - case "AUDIO_ENCODING_AMR_WB": - case 5: - message.audioEncoding = 5; - break; - case "AUDIO_ENCODING_OGG_OPUS": - case 6: - message.audioEncoding = 6; - break; - case "AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE": - case 7: - message.audioEncoding = 7; - break; - } - if (object.sampleRateHertz != null) - message.sampleRateHertz = object.sampleRateHertz | 0; - if (object.enableWordInfo != null) - message.enableWordInfo = Boolean(object.enableWordInfo); - if (object.phraseHints) { - if (!Array.isArray(object.phraseHints)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.InputAudioConfig.phraseHints: array expected"); - message.phraseHints = []; - for (var i = 0; i < object.phraseHints.length; ++i) - message.phraseHints[i] = String(object.phraseHints[i]); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest(); + if (object.entityType != null) { + if (typeof object.entityType !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest.entityType: object expected"); + message.entityType = $root.google.cloud.dialogflow.cx.v3beta1.EntityType.fromObject(object.entityType); } - if (object.model != null) - message.model = String(object.model); - switch (object.modelVariant) { - case "SPEECH_MODEL_VARIANT_UNSPECIFIED": - case 0: - message.modelVariant = 0; - break; - case "USE_BEST_AVAILABLE": - case 1: - message.modelVariant = 1; - break; - case "USE_STANDARD": - case 2: - message.modelVariant = 2; - break; - case "USE_ENHANCED": - case 3: - message.modelVariant = 3; - break; + if (object.languageCode != null) + message.languageCode = String(object.languageCode); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } - if (object.singleUtterance != null) - message.singleUtterance = Boolean(object.singleUtterance); return message; }; /** - * Creates a plain object from an InputAudioConfig message. Also converts values to other types if specified. + * Creates a plain object from an UpdateEntityTypeRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.InputAudioConfig} message InputAudioConfig + * @param {google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest} message UpdateEntityTypeRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - InputAudioConfig.toObject = function toObject(message, options) { + UpdateEntityTypeRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.phraseHints = []; if (options.defaults) { - object.audioEncoding = options.enums === String ? "AUDIO_ENCODING_UNSPECIFIED" : 0; - object.sampleRateHertz = 0; - object.model = ""; - object.singleUtterance = false; - object.modelVariant = options.enums === String ? "SPEECH_MODEL_VARIANT_UNSPECIFIED" : 0; - object.enableWordInfo = false; - } - if (message.audioEncoding != null && message.hasOwnProperty("audioEncoding")) - object.audioEncoding = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.AudioEncoding[message.audioEncoding] : message.audioEncoding; - if (message.sampleRateHertz != null && message.hasOwnProperty("sampleRateHertz")) - object.sampleRateHertz = message.sampleRateHertz; - if (message.phraseHints && message.phraseHints.length) { - object.phraseHints = []; - for (var j = 0; j < message.phraseHints.length; ++j) - object.phraseHints[j] = message.phraseHints[j]; + object.entityType = null; + object.languageCode = ""; + object.updateMask = null; } - if (message.model != null && message.hasOwnProperty("model")) - object.model = message.model; - if (message.singleUtterance != null && message.hasOwnProperty("singleUtterance")) - object.singleUtterance = message.singleUtterance; - if (message.modelVariant != null && message.hasOwnProperty("modelVariant")) - object.modelVariant = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.SpeechModelVariant[message.modelVariant] : message.modelVariant; - if (message.enableWordInfo != null && message.hasOwnProperty("enableWordInfo")) - object.enableWordInfo = message.enableWordInfo; + if (message.entityType != null && message.hasOwnProperty("entityType")) + object.entityType = $root.google.cloud.dialogflow.cx.v3beta1.EntityType.toObject(message.entityType, options); + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this InputAudioConfig to JSON. + * Converts this UpdateEntityTypeRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest * @instance * @returns {Object.} JSON object */ - InputAudioConfig.prototype.toJSON = function toJSON() { + UpdateEntityTypeRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return InputAudioConfig; - })(); - - /** - * SpeechModelVariant enum. - * @name google.cloud.dialogflow.cx.v3beta1.SpeechModelVariant - * @enum {number} - * @property {number} SPEECH_MODEL_VARIANT_UNSPECIFIED=0 SPEECH_MODEL_VARIANT_UNSPECIFIED value - * @property {number} USE_BEST_AVAILABLE=1 USE_BEST_AVAILABLE value - * @property {number} USE_STANDARD=2 USE_STANDARD value - * @property {number} USE_ENHANCED=3 USE_ENHANCED value - */ - v3beta1.SpeechModelVariant = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SPEECH_MODEL_VARIANT_UNSPECIFIED"] = 0; - values[valuesById[1] = "USE_BEST_AVAILABLE"] = 1; - values[valuesById[2] = "USE_STANDARD"] = 2; - values[valuesById[3] = "USE_ENHANCED"] = 3; - return values; + return UpdateEntityTypeRequest; })(); - v3beta1.VoiceSelectionParams = (function() { + v3beta1.DeleteEntityTypeRequest = (function() { /** - * Properties of a VoiceSelectionParams. + * Properties of a DeleteEntityTypeRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IVoiceSelectionParams - * @property {string|null} [name] VoiceSelectionParams name - * @property {google.cloud.dialogflow.cx.v3beta1.SsmlVoiceGender|null} [ssmlGender] VoiceSelectionParams ssmlGender + * @interface IDeleteEntityTypeRequest + * @property {string|null} [name] DeleteEntityTypeRequest name + * @property {boolean|null} [force] DeleteEntityTypeRequest force */ /** - * Constructs a new VoiceSelectionParams. + * Constructs a new DeleteEntityTypeRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a VoiceSelectionParams. - * @implements IVoiceSelectionParams + * @classdesc Represents a DeleteEntityTypeRequest. + * @implements IDeleteEntityTypeRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IVoiceSelectionParams=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteEntityTypeRequest=} [properties] Properties to set */ - function VoiceSelectionParams(properties) { + function DeleteEntityTypeRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -54151,80 +61677,80 @@ } /** - * VoiceSelectionParams name. + * DeleteEntityTypeRequest name. * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest * @instance */ - VoiceSelectionParams.prototype.name = ""; + DeleteEntityTypeRequest.prototype.name = ""; /** - * VoiceSelectionParams ssmlGender. - * @member {google.cloud.dialogflow.cx.v3beta1.SsmlVoiceGender} ssmlGender - * @memberof google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams + * DeleteEntityTypeRequest force. + * @member {boolean} force + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest * @instance */ - VoiceSelectionParams.prototype.ssmlGender = 0; + DeleteEntityTypeRequest.prototype.force = false; /** - * Creates a new VoiceSelectionParams instance using the specified properties. + * Creates a new DeleteEntityTypeRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IVoiceSelectionParams=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams} VoiceSelectionParams instance + * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteEntityTypeRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest} DeleteEntityTypeRequest instance */ - VoiceSelectionParams.create = function create(properties) { - return new VoiceSelectionParams(properties); + DeleteEntityTypeRequest.create = function create(properties) { + return new DeleteEntityTypeRequest(properties); }; /** - * Encodes the specified VoiceSelectionParams message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams.verify|verify} messages. + * Encodes the specified DeleteEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IVoiceSelectionParams} message VoiceSelectionParams message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteEntityTypeRequest} message DeleteEntityTypeRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VoiceSelectionParams.encode = function encode(message, writer) { + DeleteEntityTypeRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.ssmlGender != null && Object.hasOwnProperty.call(message, "ssmlGender")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.ssmlGender); + if (message.force != null && Object.hasOwnProperty.call(message, "force")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.force); return writer; }; /** - * Encodes the specified VoiceSelectionParams message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams.verify|verify} messages. + * Encodes the specified DeleteEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IVoiceSelectionParams} message VoiceSelectionParams message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteEntityTypeRequest} message DeleteEntityTypeRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VoiceSelectionParams.encodeDelimited = function encodeDelimited(message, writer) { + DeleteEntityTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a VoiceSelectionParams message from the specified reader or buffer. + * Decodes a DeleteEntityTypeRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams} VoiceSelectionParams + * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest} DeleteEntityTypeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VoiceSelectionParams.decode = function decode(reader, length) { + DeleteEntityTypeRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -54232,7 +61758,7 @@ message.name = reader.string(); break; case 2: - message.ssmlGender = reader.int32(); + message.force = reader.bool(); break; default: reader.skipType(tag & 7); @@ -54243,144 +61769,354 @@ }; /** - * Decodes a VoiceSelectionParams message from the specified reader or buffer, length delimited. + * Decodes a DeleteEntityTypeRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams} VoiceSelectionParams + * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest} DeleteEntityTypeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VoiceSelectionParams.decodeDelimited = function decodeDelimited(reader) { + DeleteEntityTypeRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a VoiceSelectionParams message. + * Verifies a DeleteEntityTypeRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - VoiceSelectionParams.verify = function verify(message) { + DeleteEntityTypeRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.ssmlGender != null && message.hasOwnProperty("ssmlGender")) - switch (message.ssmlGender) { - default: - return "ssmlGender: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } + if (message.force != null && message.hasOwnProperty("force")) + if (typeof message.force !== "boolean") + return "force: boolean expected"; return null; }; /** - * Creates a VoiceSelectionParams message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteEntityTypeRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams} VoiceSelectionParams + * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest} DeleteEntityTypeRequest */ - VoiceSelectionParams.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams) + DeleteEntityTypeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams(); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest(); if (object.name != null) message.name = String(object.name); - switch (object.ssmlGender) { - case "SSML_VOICE_GENDER_UNSPECIFIED": - case 0: - message.ssmlGender = 0; - break; - case "SSML_VOICE_GENDER_MALE": - case 1: - message.ssmlGender = 1; - break; - case "SSML_VOICE_GENDER_FEMALE": - case 2: - message.ssmlGender = 2; - break; - case "SSML_VOICE_GENDER_NEUTRAL": - case 3: - message.ssmlGender = 3; - break; - } + if (object.force != null) + message.force = Boolean(object.force); return message; }; /** - * Creates a plain object from a VoiceSelectionParams message. Also converts values to other types if specified. + * Creates a plain object from a DeleteEntityTypeRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams} message VoiceSelectionParams + * @param {google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest} message DeleteEntityTypeRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - VoiceSelectionParams.toObject = function toObject(message, options) { + DeleteEntityTypeRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.name = ""; - object.ssmlGender = options.enums === String ? "SSML_VOICE_GENDER_UNSPECIFIED" : 0; + object.force = false; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.ssmlGender != null && message.hasOwnProperty("ssmlGender")) - object.ssmlGender = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.SsmlVoiceGender[message.ssmlGender] : message.ssmlGender; + if (message.force != null && message.hasOwnProperty("force")) + object.force = message.force; return object; }; /** - * Converts this VoiceSelectionParams to JSON. + * Converts this DeleteEntityTypeRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest * @instance * @returns {Object.} JSON object */ - VoiceSelectionParams.prototype.toJSON = function toJSON() { + DeleteEntityTypeRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return VoiceSelectionParams; + return DeleteEntityTypeRequest; })(); - v3beta1.SynthesizeSpeechConfig = (function() { + v3beta1.Environments = (function() { /** - * Properties of a SynthesizeSpeechConfig. + * Constructs a new Environments service. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface ISynthesizeSpeechConfig - * @property {number|null} [speakingRate] SynthesizeSpeechConfig speakingRate - * @property {number|null} [pitch] SynthesizeSpeechConfig pitch - * @property {number|null} [volumeGainDb] SynthesizeSpeechConfig volumeGainDb - * @property {Array.|null} [effectsProfileId] SynthesizeSpeechConfig effectsProfileId - * @property {google.cloud.dialogflow.cx.v3beta1.IVoiceSelectionParams|null} [voice] SynthesizeSpeechConfig voice + * @classdesc Represents an Environments + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited */ + function Environments(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Environments.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Environments; /** - * Constructs a new SynthesizeSpeechConfig. + * Creates new Environments service using the specified rpc implementation. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.Environments + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Environments} RPC service. Useful where requests and/or responses are streamed. + */ + Environments.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Environments#listEnvironments}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Environments + * @typedef ListEnvironmentsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse} [response] ListEnvironmentsResponse + */ + + /** + * Calls ListEnvironments. + * @function listEnvironments + * @memberof google.cloud.dialogflow.cx.v3beta1.Environments + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IListEnvironmentsRequest} request ListEnvironmentsRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.Environments.ListEnvironmentsCallback} callback Node-style callback called with the error, if any, and ListEnvironmentsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Environments.prototype.listEnvironments = function listEnvironments(request, callback) { + return this.rpcCall(listEnvironments, $root.google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest, $root.google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse, request, callback); + }, "name", { value: "ListEnvironments" }); + + /** + * Calls ListEnvironments. + * @function listEnvironments + * @memberof google.cloud.dialogflow.cx.v3beta1.Environments + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IListEnvironmentsRequest} request ListEnvironmentsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Environments#getEnvironment}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Environments + * @typedef GetEnvironmentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3beta1.Environment} [response] Environment + */ + + /** + * Calls GetEnvironment. + * @function getEnvironment + * @memberof google.cloud.dialogflow.cx.v3beta1.Environments + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IGetEnvironmentRequest} request GetEnvironmentRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.Environments.GetEnvironmentCallback} callback Node-style callback called with the error, if any, and Environment + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Environments.prototype.getEnvironment = function getEnvironment(request, callback) { + return this.rpcCall(getEnvironment, $root.google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest, $root.google.cloud.dialogflow.cx.v3beta1.Environment, request, callback); + }, "name", { value: "GetEnvironment" }); + + /** + * Calls GetEnvironment. + * @function getEnvironment + * @memberof google.cloud.dialogflow.cx.v3beta1.Environments + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IGetEnvironmentRequest} request GetEnvironmentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Environments#createEnvironment}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Environments + * @typedef CreateEnvironmentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateEnvironment. + * @function createEnvironment + * @memberof google.cloud.dialogflow.cx.v3beta1.Environments + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.ICreateEnvironmentRequest} request CreateEnvironmentRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.Environments.CreateEnvironmentCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Environments.prototype.createEnvironment = function createEnvironment(request, callback) { + return this.rpcCall(createEnvironment, $root.google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateEnvironment" }); + + /** + * Calls CreateEnvironment. + * @function createEnvironment + * @memberof google.cloud.dialogflow.cx.v3beta1.Environments + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.ICreateEnvironmentRequest} request CreateEnvironmentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Environments#updateEnvironment}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Environments + * @typedef UpdateEnvironmentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateEnvironment. + * @function updateEnvironment + * @memberof google.cloud.dialogflow.cx.v3beta1.Environments + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateEnvironmentRequest} request UpdateEnvironmentRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.Environments.UpdateEnvironmentCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Environments.prototype.updateEnvironment = function updateEnvironment(request, callback) { + return this.rpcCall(updateEnvironment, $root.google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateEnvironment" }); + + /** + * Calls UpdateEnvironment. + * @function updateEnvironment + * @memberof google.cloud.dialogflow.cx.v3beta1.Environments + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateEnvironmentRequest} request UpdateEnvironmentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Environments#deleteEnvironment}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Environments + * @typedef DeleteEnvironmentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteEnvironment. + * @function deleteEnvironment + * @memberof google.cloud.dialogflow.cx.v3beta1.Environments + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteEnvironmentRequest} request DeleteEnvironmentRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.Environments.DeleteEnvironmentCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Environments.prototype.deleteEnvironment = function deleteEnvironment(request, callback) { + return this.rpcCall(deleteEnvironment, $root.google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteEnvironment" }); + + /** + * Calls DeleteEnvironment. + * @function deleteEnvironment + * @memberof google.cloud.dialogflow.cx.v3beta1.Environments + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteEnvironmentRequest} request DeleteEnvironmentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Environments#lookupEnvironmentHistory}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Environments + * @typedef LookupEnvironmentHistoryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse} [response] LookupEnvironmentHistoryResponse + */ + + /** + * Calls LookupEnvironmentHistory. + * @function lookupEnvironmentHistory + * @memberof google.cloud.dialogflow.cx.v3beta1.Environments + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.ILookupEnvironmentHistoryRequest} request LookupEnvironmentHistoryRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.Environments.LookupEnvironmentHistoryCallback} callback Node-style callback called with the error, if any, and LookupEnvironmentHistoryResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Environments.prototype.lookupEnvironmentHistory = function lookupEnvironmentHistory(request, callback) { + return this.rpcCall(lookupEnvironmentHistory, $root.google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest, $root.google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse, request, callback); + }, "name", { value: "LookupEnvironmentHistory" }); + + /** + * Calls LookupEnvironmentHistory. + * @function lookupEnvironmentHistory + * @memberof google.cloud.dialogflow.cx.v3beta1.Environments + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.ILookupEnvironmentHistoryRequest} request LookupEnvironmentHistoryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Environments; + })(); + + v3beta1.Environment = (function() { + + /** + * Properties of an Environment. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a SynthesizeSpeechConfig. - * @implements ISynthesizeSpeechConfig + * @interface IEnvironment + * @property {string|null} [name] Environment name + * @property {string|null} [displayName] Environment displayName + * @property {string|null} [description] Environment description + * @property {Array.|null} [versionConfigs] Environment versionConfigs + * @property {google.protobuf.ITimestamp|null} [updateTime] Environment updateTime + */ + + /** + * Constructs a new Environment. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents an Environment. + * @implements IEnvironment * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.ISynthesizeSpeechConfig=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IEnvironment=} [properties] Properties to set */ - function SynthesizeSpeechConfig(properties) { - this.effectsProfileId = []; + function Environment(properties) { + this.versionConfigs = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -54388,130 +62124,130 @@ } /** - * SynthesizeSpeechConfig speakingRate. - * @member {number} speakingRate - * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig + * Environment name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3beta1.Environment * @instance */ - SynthesizeSpeechConfig.prototype.speakingRate = 0; + Environment.prototype.name = ""; /** - * SynthesizeSpeechConfig pitch. - * @member {number} pitch - * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig + * Environment displayName. + * @member {string} displayName + * @memberof google.cloud.dialogflow.cx.v3beta1.Environment * @instance */ - SynthesizeSpeechConfig.prototype.pitch = 0; + Environment.prototype.displayName = ""; /** - * SynthesizeSpeechConfig volumeGainDb. - * @member {number} volumeGainDb - * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig + * Environment description. + * @member {string} description + * @memberof google.cloud.dialogflow.cx.v3beta1.Environment * @instance */ - SynthesizeSpeechConfig.prototype.volumeGainDb = 0; + Environment.prototype.description = ""; /** - * SynthesizeSpeechConfig effectsProfileId. - * @member {Array.} effectsProfileId - * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig + * Environment versionConfigs. + * @member {Array.} versionConfigs + * @memberof google.cloud.dialogflow.cx.v3beta1.Environment * @instance */ - SynthesizeSpeechConfig.prototype.effectsProfileId = $util.emptyArray; + Environment.prototype.versionConfigs = $util.emptyArray; /** - * SynthesizeSpeechConfig voice. - * @member {google.cloud.dialogflow.cx.v3beta1.IVoiceSelectionParams|null|undefined} voice - * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig + * Environment updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dialogflow.cx.v3beta1.Environment * @instance */ - SynthesizeSpeechConfig.prototype.voice = null; + Environment.prototype.updateTime = null; /** - * Creates a new SynthesizeSpeechConfig instance using the specified properties. + * Creates a new Environment instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.Environment * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ISynthesizeSpeechConfig=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig} SynthesizeSpeechConfig instance + * @param {google.cloud.dialogflow.cx.v3beta1.IEnvironment=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.Environment} Environment instance */ - SynthesizeSpeechConfig.create = function create(properties) { - return new SynthesizeSpeechConfig(properties); + Environment.create = function create(properties) { + return new Environment(properties); }; /** - * Encodes the specified SynthesizeSpeechConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig.verify|verify} messages. + * Encodes the specified Environment message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Environment.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.Environment * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ISynthesizeSpeechConfig} message SynthesizeSpeechConfig message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IEnvironment} message Environment message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SynthesizeSpeechConfig.encode = function encode(message, writer) { + Environment.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.speakingRate != null && Object.hasOwnProperty.call(message, "speakingRate")) - writer.uint32(/* id 1, wireType 1 =*/9).double(message.speakingRate); - if (message.pitch != null && Object.hasOwnProperty.call(message, "pitch")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.pitch); - if (message.volumeGainDb != null && Object.hasOwnProperty.call(message, "volumeGainDb")) - writer.uint32(/* id 3, wireType 1 =*/25).double(message.volumeGainDb); - if (message.voice != null && Object.hasOwnProperty.call(message, "voice")) - $root.google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams.encode(message.voice, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.effectsProfileId != null && message.effectsProfileId.length) - for (var i = 0; i < message.effectsProfileId.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.effectsProfileId[i]); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.versionConfigs != null && message.versionConfigs.length) + for (var i = 0; i < message.versionConfigs.length; ++i) + $root.google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig.encode(message.versionConfigs[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; /** - * Encodes the specified SynthesizeSpeechConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig.verify|verify} messages. + * Encodes the specified Environment message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Environment.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.Environment * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ISynthesizeSpeechConfig} message SynthesizeSpeechConfig message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IEnvironment} message Environment message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SynthesizeSpeechConfig.encodeDelimited = function encodeDelimited(message, writer) { + Environment.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SynthesizeSpeechConfig message from the specified reader or buffer. + * Decodes an Environment message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.Environment * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig} SynthesizeSpeechConfig + * @returns {google.cloud.dialogflow.cx.v3beta1.Environment} Environment * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SynthesizeSpeechConfig.decode = function decode(reader, length) { + Environment.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Environment(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.speakingRate = reader.double(); + message.name = reader.string(); break; case 2: - message.pitch = reader.double(); + message.displayName = reader.string(); break; case 3: - message.volumeGainDb = reader.double(); + message.description = reader.string(); break; - case 5: - if (!(message.effectsProfileId && message.effectsProfileId.length)) - message.effectsProfileId = []; - message.effectsProfileId.push(reader.string()); + case 6: + if (!(message.versionConfigs && message.versionConfigs.length)) + message.versionConfigs = []; + message.versionConfigs.push($root.google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig.decode(reader, reader.uint32())); break; - case 4: - message.voice = $root.google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams.decode(reader, reader.uint32()); + case 5: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -54522,178 +62258,352 @@ }; /** - * Decodes a SynthesizeSpeechConfig message from the specified reader or buffer, length delimited. + * Decodes an Environment message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.Environment * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig} SynthesizeSpeechConfig + * @returns {google.cloud.dialogflow.cx.v3beta1.Environment} Environment * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SynthesizeSpeechConfig.decodeDelimited = function decodeDelimited(reader) { + Environment.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SynthesizeSpeechConfig message. + * Verifies an Environment message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.Environment * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SynthesizeSpeechConfig.verify = function verify(message) { + Environment.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.speakingRate != null && message.hasOwnProperty("speakingRate")) - if (typeof message.speakingRate !== "number") - return "speakingRate: number expected"; - if (message.pitch != null && message.hasOwnProperty("pitch")) - if (typeof message.pitch !== "number") - return "pitch: number expected"; - if (message.volumeGainDb != null && message.hasOwnProperty("volumeGainDb")) - if (typeof message.volumeGainDb !== "number") - return "volumeGainDb: number expected"; - if (message.effectsProfileId != null && message.hasOwnProperty("effectsProfileId")) { - if (!Array.isArray(message.effectsProfileId)) - return "effectsProfileId: array expected"; - for (var i = 0; i < message.effectsProfileId.length; ++i) - if (!$util.isString(message.effectsProfileId[i])) - return "effectsProfileId: string[] expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.versionConfigs != null && message.hasOwnProperty("versionConfigs")) { + if (!Array.isArray(message.versionConfigs)) + return "versionConfigs: array expected"; + for (var i = 0; i < message.versionConfigs.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig.verify(message.versionConfigs[i]); + if (error) + return "versionConfigs." + error; + } } - if (message.voice != null && message.hasOwnProperty("voice")) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams.verify(message.voice); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); if (error) - return "voice." + error; + return "updateTime." + error; } return null; }; /** - * Creates a SynthesizeSpeechConfig message from a plain object. Also converts values to their respective internal types. + * Creates an Environment message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.Environment * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig} SynthesizeSpeechConfig + * @returns {google.cloud.dialogflow.cx.v3beta1.Environment} Environment */ - SynthesizeSpeechConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig) + Environment.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Environment) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig(); - if (object.speakingRate != null) - message.speakingRate = Number(object.speakingRate); - if (object.pitch != null) - message.pitch = Number(object.pitch); - if (object.volumeGainDb != null) - message.volumeGainDb = Number(object.volumeGainDb); - if (object.effectsProfileId) { - if (!Array.isArray(object.effectsProfileId)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig.effectsProfileId: array expected"); - message.effectsProfileId = []; - for (var i = 0; i < object.effectsProfileId.length; ++i) - message.effectsProfileId[i] = String(object.effectsProfileId[i]); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.Environment(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.description != null) + message.description = String(object.description); + if (object.versionConfigs) { + if (!Array.isArray(object.versionConfigs)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Environment.versionConfigs: array expected"); + message.versionConfigs = []; + for (var i = 0; i < object.versionConfigs.length; ++i) { + if (typeof object.versionConfigs[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Environment.versionConfigs: object expected"); + message.versionConfigs[i] = $root.google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig.fromObject(object.versionConfigs[i]); + } } - if (object.voice != null) { - if (typeof object.voice !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig.voice: object expected"); - message.voice = $root.google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams.fromObject(object.voice); + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Environment.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); } return message; }; /** - * Creates a plain object from a SynthesizeSpeechConfig message. Also converts values to other types if specified. + * Creates a plain object from an Environment message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.Environment * @static - * @param {google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig} message SynthesizeSpeechConfig + * @param {google.cloud.dialogflow.cx.v3beta1.Environment} message Environment * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SynthesizeSpeechConfig.toObject = function toObject(message, options) { + Environment.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.effectsProfileId = []; + object.versionConfigs = []; if (options.defaults) { - object.speakingRate = 0; - object.pitch = 0; - object.volumeGainDb = 0; - object.voice = null; + object.name = ""; + object.displayName = ""; + object.description = ""; + object.updateTime = null; } - if (message.speakingRate != null && message.hasOwnProperty("speakingRate")) - object.speakingRate = options.json && !isFinite(message.speakingRate) ? String(message.speakingRate) : message.speakingRate; - if (message.pitch != null && message.hasOwnProperty("pitch")) - object.pitch = options.json && !isFinite(message.pitch) ? String(message.pitch) : message.pitch; - if (message.volumeGainDb != null && message.hasOwnProperty("volumeGainDb")) - object.volumeGainDb = options.json && !isFinite(message.volumeGainDb) ? String(message.volumeGainDb) : message.volumeGainDb; - if (message.voice != null && message.hasOwnProperty("voice")) - object.voice = $root.google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams.toObject(message.voice, options); - if (message.effectsProfileId && message.effectsProfileId.length) { - object.effectsProfileId = []; - for (var j = 0; j < message.effectsProfileId.length; ++j) - object.effectsProfileId[j] = message.effectsProfileId[j]; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.versionConfigs && message.versionConfigs.length) { + object.versionConfigs = []; + for (var j = 0; j < message.versionConfigs.length; ++j) + object.versionConfigs[j] = $root.google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig.toObject(message.versionConfigs[j], options); } return object; }; /** - * Converts this SynthesizeSpeechConfig to JSON. + * Converts this Environment to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.Environment * @instance * @returns {Object.} JSON object */ - SynthesizeSpeechConfig.prototype.toJSON = function toJSON() { + Environment.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return SynthesizeSpeechConfig; - })(); + Environment.VersionConfig = (function() { - /** - * SsmlVoiceGender enum. - * @name google.cloud.dialogflow.cx.v3beta1.SsmlVoiceGender - * @enum {number} - * @property {number} SSML_VOICE_GENDER_UNSPECIFIED=0 SSML_VOICE_GENDER_UNSPECIFIED value - * @property {number} SSML_VOICE_GENDER_MALE=1 SSML_VOICE_GENDER_MALE value - * @property {number} SSML_VOICE_GENDER_FEMALE=2 SSML_VOICE_GENDER_FEMALE value - * @property {number} SSML_VOICE_GENDER_NEUTRAL=3 SSML_VOICE_GENDER_NEUTRAL value - */ - v3beta1.SsmlVoiceGender = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SSML_VOICE_GENDER_UNSPECIFIED"] = 0; - values[valuesById[1] = "SSML_VOICE_GENDER_MALE"] = 1; - values[valuesById[2] = "SSML_VOICE_GENDER_FEMALE"] = 2; - values[valuesById[3] = "SSML_VOICE_GENDER_NEUTRAL"] = 3; - return values; + /** + * Properties of a VersionConfig. + * @memberof google.cloud.dialogflow.cx.v3beta1.Environment + * @interface IVersionConfig + * @property {string|null} [version] VersionConfig version + */ + + /** + * Constructs a new VersionConfig. + * @memberof google.cloud.dialogflow.cx.v3beta1.Environment + * @classdesc Represents a VersionConfig. + * @implements IVersionConfig + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.Environment.IVersionConfig=} [properties] Properties to set + */ + function VersionConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * VersionConfig version. + * @member {string} version + * @memberof google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig + * @instance + */ + VersionConfig.prototype.version = ""; + + /** + * Creates a new VersionConfig instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Environment.IVersionConfig=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig} VersionConfig instance + */ + VersionConfig.create = function create(properties) { + return new VersionConfig(properties); + }; + + /** + * Encodes the specified VersionConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Environment.IVersionConfig} message VersionConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VersionConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); + return writer; + }; + + /** + * Encodes the specified VersionConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Environment.IVersionConfig} message VersionConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VersionConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VersionConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig} VersionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VersionConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.version = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VersionConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig} VersionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VersionConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VersionConfig message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VersionConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + return null; + }; + + /** + * Creates a VersionConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig} VersionConfig + */ + VersionConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig(); + if (object.version != null) + message.version = String(object.version); + return message; + }; + + /** + * Creates a plain object from a VersionConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig} message VersionConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VersionConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.version = ""; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + return object; + }; + + /** + * Converts this VersionConfig to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig + * @instance + * @returns {Object.} JSON object + */ + VersionConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return VersionConfig; + })(); + + return Environment; })(); - v3beta1.OutputAudioConfig = (function() { + v3beta1.ListEnvironmentsRequest = (function() { /** - * Properties of an OutputAudioConfig. + * Properties of a ListEnvironmentsRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IOutputAudioConfig - * @property {google.cloud.dialogflow.cx.v3beta1.OutputAudioEncoding|null} [audioEncoding] OutputAudioConfig audioEncoding - * @property {number|null} [sampleRateHertz] OutputAudioConfig sampleRateHertz - * @property {google.cloud.dialogflow.cx.v3beta1.ISynthesizeSpeechConfig|null} [synthesizeSpeechConfig] OutputAudioConfig synthesizeSpeechConfig + * @interface IListEnvironmentsRequest + * @property {string|null} [parent] ListEnvironmentsRequest parent + * @property {number|null} [pageSize] ListEnvironmentsRequest pageSize + * @property {string|null} [pageToken] ListEnvironmentsRequest pageToken */ /** - * Constructs a new OutputAudioConfig. + * Constructs a new ListEnvironmentsRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents an OutputAudioConfig. - * @implements IOutputAudioConfig + * @classdesc Represents a ListEnvironmentsRequest. + * @implements IListEnvironmentsRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IOutputAudioConfig=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IListEnvironmentsRequest=} [properties] Properties to set */ - function OutputAudioConfig(properties) { + function ListEnvironmentsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -54701,101 +62611,101 @@ } /** - * OutputAudioConfig audioEncoding. - * @member {google.cloud.dialogflow.cx.v3beta1.OutputAudioEncoding} audioEncoding - * @memberof google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig + * ListEnvironmentsRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest * @instance */ - OutputAudioConfig.prototype.audioEncoding = 0; + ListEnvironmentsRequest.prototype.parent = ""; /** - * OutputAudioConfig sampleRateHertz. - * @member {number} sampleRateHertz - * @memberof google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig + * ListEnvironmentsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest * @instance */ - OutputAudioConfig.prototype.sampleRateHertz = 0; + ListEnvironmentsRequest.prototype.pageSize = 0; /** - * OutputAudioConfig synthesizeSpeechConfig. - * @member {google.cloud.dialogflow.cx.v3beta1.ISynthesizeSpeechConfig|null|undefined} synthesizeSpeechConfig - * @memberof google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig + * ListEnvironmentsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest * @instance */ - OutputAudioConfig.prototype.synthesizeSpeechConfig = null; + ListEnvironmentsRequest.prototype.pageToken = ""; /** - * Creates a new OutputAudioConfig instance using the specified properties. + * Creates a new ListEnvironmentsRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IOutputAudioConfig=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig} OutputAudioConfig instance + * @param {google.cloud.dialogflow.cx.v3beta1.IListEnvironmentsRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest} ListEnvironmentsRequest instance */ - OutputAudioConfig.create = function create(properties) { - return new OutputAudioConfig(properties); + ListEnvironmentsRequest.create = function create(properties) { + return new ListEnvironmentsRequest(properties); }; /** - * Encodes the specified OutputAudioConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig.verify|verify} messages. + * Encodes the specified ListEnvironmentsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IOutputAudioConfig} message OutputAudioConfig message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IListEnvironmentsRequest} message ListEnvironmentsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OutputAudioConfig.encode = function encode(message, writer) { + ListEnvironmentsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.audioEncoding != null && Object.hasOwnProperty.call(message, "audioEncoding")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.audioEncoding); - if (message.sampleRateHertz != null && Object.hasOwnProperty.call(message, "sampleRateHertz")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.sampleRateHertz); - if (message.synthesizeSpeechConfig != null && Object.hasOwnProperty.call(message, "synthesizeSpeechConfig")) - $root.google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig.encode(message.synthesizeSpeechConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); return writer; }; /** - * Encodes the specified OutputAudioConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig.verify|verify} messages. + * Encodes the specified ListEnvironmentsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IOutputAudioConfig} message OutputAudioConfig message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IListEnvironmentsRequest} message ListEnvironmentsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OutputAudioConfig.encodeDelimited = function encodeDelimited(message, writer) { + ListEnvironmentsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an OutputAudioConfig message from the specified reader or buffer. + * Decodes a ListEnvironmentsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig} OutputAudioConfig + * @returns {google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest} ListEnvironmentsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OutputAudioConfig.decode = function decode(reader, length) { + ListEnvironmentsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.audioEncoding = reader.int32(); + message.parent = reader.string(); break; case 2: - message.sampleRateHertz = reader.int32(); + message.pageSize = reader.int32(); break; case 3: - message.synthesizeSpeechConfig = $root.google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig.decode(reader, reader.uint32()); + message.pageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -54806,392 +62716,126 @@ }; /** - * Decodes an OutputAudioConfig message from the specified reader or buffer, length delimited. + * Decodes a ListEnvironmentsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig} OutputAudioConfig + * @returns {google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest} ListEnvironmentsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OutputAudioConfig.decodeDelimited = function decodeDelimited(reader) { + ListEnvironmentsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an OutputAudioConfig message. + * Verifies a ListEnvironmentsRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - OutputAudioConfig.verify = function verify(message) { + ListEnvironmentsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.audioEncoding != null && message.hasOwnProperty("audioEncoding")) - switch (message.audioEncoding) { - default: - return "audioEncoding: enum value expected"; - case 0: - case 1: - case 2: - case 4: - case 3: - case 5: - break; - } - if (message.sampleRateHertz != null && message.hasOwnProperty("sampleRateHertz")) - if (!$util.isInteger(message.sampleRateHertz)) - return "sampleRateHertz: integer expected"; - if (message.synthesizeSpeechConfig != null && message.hasOwnProperty("synthesizeSpeechConfig")) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig.verify(message.synthesizeSpeechConfig); - if (error) - return "synthesizeSpeechConfig." + error; - } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; return null; }; /** - * Creates an OutputAudioConfig message from a plain object. Also converts values to their respective internal types. + * Creates a ListEnvironmentsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig} OutputAudioConfig + * @returns {google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest} ListEnvironmentsRequest */ - OutputAudioConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig) + ListEnvironmentsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig(); - switch (object.audioEncoding) { - case "OUTPUT_AUDIO_ENCODING_UNSPECIFIED": - case 0: - message.audioEncoding = 0; - break; - case "OUTPUT_AUDIO_ENCODING_LINEAR_16": - case 1: - message.audioEncoding = 1; - break; - case "OUTPUT_AUDIO_ENCODING_MP3": - case 2: - message.audioEncoding = 2; - break; - case "OUTPUT_AUDIO_ENCODING_MP3_64_KBPS": - case 4: - message.audioEncoding = 4; - break; - case "OUTPUT_AUDIO_ENCODING_OGG_OPUS": - case 3: - message.audioEncoding = 3; - break; - case "OUTPUT_AUDIO_ENCODING_MULAW": - case 5: - message.audioEncoding = 5; - break; - } - if (object.sampleRateHertz != null) - message.sampleRateHertz = object.sampleRateHertz | 0; - if (object.synthesizeSpeechConfig != null) { - if (typeof object.synthesizeSpeechConfig !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig.synthesizeSpeechConfig: object expected"); - message.synthesizeSpeechConfig = $root.google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig.fromObject(object.synthesizeSpeechConfig); - } + var message = new $root.google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); return message; }; /** - * Creates a plain object from an OutputAudioConfig message. Also converts values to other types if specified. + * Creates a plain object from a ListEnvironmentsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig} message OutputAudioConfig + * @param {google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest} message ListEnvironmentsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - OutputAudioConfig.toObject = function toObject(message, options) { + ListEnvironmentsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.audioEncoding = options.enums === String ? "OUTPUT_AUDIO_ENCODING_UNSPECIFIED" : 0; - object.sampleRateHertz = 0; - object.synthesizeSpeechConfig = null; + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; } - if (message.audioEncoding != null && message.hasOwnProperty("audioEncoding")) - object.audioEncoding = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.OutputAudioEncoding[message.audioEncoding] : message.audioEncoding; - if (message.sampleRateHertz != null && message.hasOwnProperty("sampleRateHertz")) - object.sampleRateHertz = message.sampleRateHertz; - if (message.synthesizeSpeechConfig != null && message.hasOwnProperty("synthesizeSpeechConfig")) - object.synthesizeSpeechConfig = $root.google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig.toObject(message.synthesizeSpeechConfig, options); + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; return object; }; /** - * Converts this OutputAudioConfig to JSON. + * Converts this ListEnvironmentsRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest * @instance * @returns {Object.} JSON object */ - OutputAudioConfig.prototype.toJSON = function toJSON() { + ListEnvironmentsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return OutputAudioConfig; - })(); - - /** - * OutputAudioEncoding enum. - * @name google.cloud.dialogflow.cx.v3beta1.OutputAudioEncoding - * @enum {number} - * @property {number} OUTPUT_AUDIO_ENCODING_UNSPECIFIED=0 OUTPUT_AUDIO_ENCODING_UNSPECIFIED value - * @property {number} OUTPUT_AUDIO_ENCODING_LINEAR_16=1 OUTPUT_AUDIO_ENCODING_LINEAR_16 value - * @property {number} OUTPUT_AUDIO_ENCODING_MP3=2 OUTPUT_AUDIO_ENCODING_MP3 value - * @property {number} OUTPUT_AUDIO_ENCODING_MP3_64_KBPS=4 OUTPUT_AUDIO_ENCODING_MP3_64_KBPS value - * @property {number} OUTPUT_AUDIO_ENCODING_OGG_OPUS=3 OUTPUT_AUDIO_ENCODING_OGG_OPUS value - * @property {number} OUTPUT_AUDIO_ENCODING_MULAW=5 OUTPUT_AUDIO_ENCODING_MULAW value - */ - v3beta1.OutputAudioEncoding = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "OUTPUT_AUDIO_ENCODING_UNSPECIFIED"] = 0; - values[valuesById[1] = "OUTPUT_AUDIO_ENCODING_LINEAR_16"] = 1; - values[valuesById[2] = "OUTPUT_AUDIO_ENCODING_MP3"] = 2; - values[valuesById[4] = "OUTPUT_AUDIO_ENCODING_MP3_64_KBPS"] = 4; - values[valuesById[3] = "OUTPUT_AUDIO_ENCODING_OGG_OPUS"] = 3; - values[valuesById[5] = "OUTPUT_AUDIO_ENCODING_MULAW"] = 5; - return values; - })(); - - v3beta1.EntityTypes = (function() { - - /** - * Constructs a new EntityTypes service. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents an EntityTypes - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function EntityTypes(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (EntityTypes.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = EntityTypes; - - /** - * Creates new EntityTypes service using the specified rpc implementation. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityTypes - * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {EntityTypes} RPC service. Useful where requests and/or responses are streamed. - */ - EntityTypes.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.EntityTypes#listEntityTypes}. - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityTypes - * @typedef ListEntityTypesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse} [response] ListEntityTypesResponse - */ - - /** - * Calls ListEntityTypes. - * @function listEntityTypes - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityTypes - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IListEntityTypesRequest} request ListEntityTypesRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.EntityTypes.ListEntityTypesCallback} callback Node-style callback called with the error, if any, and ListEntityTypesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(EntityTypes.prototype.listEntityTypes = function listEntityTypes(request, callback) { - return this.rpcCall(listEntityTypes, $root.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest, $root.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse, request, callback); - }, "name", { value: "ListEntityTypes" }); - - /** - * Calls ListEntityTypes. - * @function listEntityTypes - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityTypes - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IListEntityTypesRequest} request ListEntityTypesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.EntityTypes#getEntityType}. - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityTypes - * @typedef GetEntityTypeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3beta1.EntityType} [response] EntityType - */ - - /** - * Calls GetEntityType. - * @function getEntityType - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityTypes - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IGetEntityTypeRequest} request GetEntityTypeRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.EntityTypes.GetEntityTypeCallback} callback Node-style callback called with the error, if any, and EntityType - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(EntityTypes.prototype.getEntityType = function getEntityType(request, callback) { - return this.rpcCall(getEntityType, $root.google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest, $root.google.cloud.dialogflow.cx.v3beta1.EntityType, request, callback); - }, "name", { value: "GetEntityType" }); - - /** - * Calls GetEntityType. - * @function getEntityType - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityTypes - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IGetEntityTypeRequest} request GetEntityTypeRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.EntityTypes#createEntityType}. - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityTypes - * @typedef CreateEntityTypeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3beta1.EntityType} [response] EntityType - */ - - /** - * Calls CreateEntityType. - * @function createEntityType - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityTypes - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.ICreateEntityTypeRequest} request CreateEntityTypeRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.EntityTypes.CreateEntityTypeCallback} callback Node-style callback called with the error, if any, and EntityType - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(EntityTypes.prototype.createEntityType = function createEntityType(request, callback) { - return this.rpcCall(createEntityType, $root.google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest, $root.google.cloud.dialogflow.cx.v3beta1.EntityType, request, callback); - }, "name", { value: "CreateEntityType" }); - - /** - * Calls CreateEntityType. - * @function createEntityType - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityTypes - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.ICreateEntityTypeRequest} request CreateEntityTypeRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.EntityTypes#updateEntityType}. - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityTypes - * @typedef UpdateEntityTypeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3beta1.EntityType} [response] EntityType - */ - - /** - * Calls UpdateEntityType. - * @function updateEntityType - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityTypes - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateEntityTypeRequest} request UpdateEntityTypeRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.EntityTypes.UpdateEntityTypeCallback} callback Node-style callback called with the error, if any, and EntityType - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(EntityTypes.prototype.updateEntityType = function updateEntityType(request, callback) { - return this.rpcCall(updateEntityType, $root.google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest, $root.google.cloud.dialogflow.cx.v3beta1.EntityType, request, callback); - }, "name", { value: "UpdateEntityType" }); - - /** - * Calls UpdateEntityType. - * @function updateEntityType - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityTypes - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateEntityTypeRequest} request UpdateEntityTypeRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.EntityTypes#deleteEntityType}. - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityTypes - * @typedef DeleteEntityTypeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls DeleteEntityType. - * @function deleteEntityType - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityTypes - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteEntityTypeRequest} request DeleteEntityTypeRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.EntityTypes.DeleteEntityTypeCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(EntityTypes.prototype.deleteEntityType = function deleteEntityType(request, callback) { - return this.rpcCall(deleteEntityType, $root.google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteEntityType" }); - - /** - * Calls DeleteEntityType. - * @function deleteEntityType - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityTypes - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteEntityTypeRequest} request DeleteEntityTypeRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return EntityTypes; + return ListEnvironmentsRequest; })(); - v3beta1.EntityType = (function() { + v3beta1.ListEnvironmentsResponse = (function() { /** - * Properties of an EntityType. + * Properties of a ListEnvironmentsResponse. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IEntityType - * @property {string|null} [name] EntityType name - * @property {string|null} [displayName] EntityType displayName - * @property {google.cloud.dialogflow.cx.v3beta1.EntityType.Kind|null} [kind] EntityType kind - * @property {google.cloud.dialogflow.cx.v3beta1.EntityType.AutoExpansionMode|null} [autoExpansionMode] EntityType autoExpansionMode - * @property {Array.|null} [entities] EntityType entities - * @property {Array.|null} [excludedPhrases] EntityType excludedPhrases - * @property {boolean|null} [enableFuzzyExtraction] EntityType enableFuzzyExtraction + * @interface IListEnvironmentsResponse + * @property {Array.|null} [environments] ListEnvironmentsResponse environments + * @property {string|null} [nextPageToken] ListEnvironmentsResponse nextPageToken */ /** - * Constructs a new EntityType. + * Constructs a new ListEnvironmentsResponse. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents an EntityType. - * @implements IEntityType + * @classdesc Represents a ListEnvironmentsResponse. + * @implements IListEnvironmentsResponse * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IEntityType=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IListEnvironmentsResponse=} [properties] Properties to set */ - function EntityType(properties) { - this.entities = []; - this.excludedPhrases = []; + function ListEnvironmentsResponse(properties) { + this.environments = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -55199,159 +62843,91 @@ } /** - * EntityType name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType - * @instance - */ - EntityType.prototype.name = ""; - - /** - * EntityType displayName. - * @member {string} displayName - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType - * @instance - */ - EntityType.prototype.displayName = ""; - - /** - * EntityType kind. - * @member {google.cloud.dialogflow.cx.v3beta1.EntityType.Kind} kind - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType - * @instance - */ - EntityType.prototype.kind = 0; - - /** - * EntityType autoExpansionMode. - * @member {google.cloud.dialogflow.cx.v3beta1.EntityType.AutoExpansionMode} autoExpansionMode - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType - * @instance - */ - EntityType.prototype.autoExpansionMode = 0; - - /** - * EntityType entities. - * @member {Array.} entities - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType - * @instance - */ - EntityType.prototype.entities = $util.emptyArray; - - /** - * EntityType excludedPhrases. - * @member {Array.} excludedPhrases - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType + * ListEnvironmentsResponse environments. + * @member {Array.} environments + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse * @instance */ - EntityType.prototype.excludedPhrases = $util.emptyArray; + ListEnvironmentsResponse.prototype.environments = $util.emptyArray; /** - * EntityType enableFuzzyExtraction. - * @member {boolean} enableFuzzyExtraction - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType + * ListEnvironmentsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse * @instance */ - EntityType.prototype.enableFuzzyExtraction = false; + ListEnvironmentsResponse.prototype.nextPageToken = ""; /** - * Creates a new EntityType instance using the specified properties. + * Creates a new ListEnvironmentsResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IEntityType=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.EntityType} EntityType instance + * @param {google.cloud.dialogflow.cx.v3beta1.IListEnvironmentsResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse} ListEnvironmentsResponse instance */ - EntityType.create = function create(properties) { - return new EntityType(properties); + ListEnvironmentsResponse.create = function create(properties) { + return new ListEnvironmentsResponse(properties); }; /** - * Encodes the specified EntityType message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.EntityType.verify|verify} messages. + * Encodes the specified ListEnvironmentsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IEntityType} message EntityType message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IListEnvironmentsResponse} message ListEnvironmentsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EntityType.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.kind); - if (message.autoExpansionMode != null && Object.hasOwnProperty.call(message, "autoExpansionMode")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.autoExpansionMode); - if (message.entities != null && message.entities.length) - for (var i = 0; i < message.entities.length; ++i) - $root.google.cloud.dialogflow.cx.v3beta1.EntityType.Entity.encode(message.entities[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.excludedPhrases != null && message.excludedPhrases.length) - for (var i = 0; i < message.excludedPhrases.length; ++i) - $root.google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase.encode(message.excludedPhrases[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.enableFuzzyExtraction != null && Object.hasOwnProperty.call(message, "enableFuzzyExtraction")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.enableFuzzyExtraction); + ListEnvironmentsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.environments != null && message.environments.length) + for (var i = 0; i < message.environments.length; ++i) + $root.google.cloud.dialogflow.cx.v3beta1.Environment.encode(message.environments[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified EntityType message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.EntityType.verify|verify} messages. + * Encodes the specified ListEnvironmentsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IEntityType} message EntityType message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IListEnvironmentsResponse} message ListEnvironmentsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EntityType.encodeDelimited = function encodeDelimited(message, writer) { + ListEnvironmentsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an EntityType message from the specified reader or buffer. + * Decodes a ListEnvironmentsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.EntityType} EntityType + * @returns {google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse} ListEnvironmentsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EntityType.decode = function decode(reader, length) { + ListEnvironmentsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.EntityType(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + if (!(message.environments && message.environments.length)) + message.environments = []; + message.environments.push($root.google.cloud.dialogflow.cx.v3beta1.Environment.decode(reader, reader.uint32())); break; case 2: - message.displayName = reader.string(); - break; - case 3: - message.kind = reader.int32(); - break; - case 4: - message.autoExpansionMode = reader.int32(); - break; - case 5: - if (!(message.entities && message.entities.length)) - message.entities = []; - message.entities.push($root.google.cloud.dialogflow.cx.v3beta1.EntityType.Entity.decode(reader, reader.uint32())); - break; - case 6: - if (!(message.excludedPhrases && message.excludedPhrases.length)) - message.excludedPhrases = []; - message.excludedPhrases.push($root.google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase.decode(reader, reader.uint32())); - break; - case 7: - message.enableFuzzyExtraction = reader.bool(); + message.nextPageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -55362,676 +62938,321 @@ }; /** - * Decodes an EntityType message from the specified reader or buffer, length delimited. + * Decodes a ListEnvironmentsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.EntityType} EntityType + * @returns {google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse} ListEnvironmentsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EntityType.decodeDelimited = function decodeDelimited(reader) { + ListEnvironmentsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an EntityType message. + * Verifies a ListEnvironmentsResponse message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - EntityType.verify = function verify(message) { + ListEnvironmentsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.kind != null && message.hasOwnProperty("kind")) - switch (message.kind) { - default: - return "kind: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.autoExpansionMode != null && message.hasOwnProperty("autoExpansionMode")) - switch (message.autoExpansionMode) { - default: - return "autoExpansionMode: enum value expected"; - case 0: - case 1: - break; - } - if (message.entities != null && message.hasOwnProperty("entities")) { - if (!Array.isArray(message.entities)) - return "entities: array expected"; - for (var i = 0; i < message.entities.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.EntityType.Entity.verify(message.entities[i]); - if (error) - return "entities." + error; - } - } - if (message.excludedPhrases != null && message.hasOwnProperty("excludedPhrases")) { - if (!Array.isArray(message.excludedPhrases)) - return "excludedPhrases: array expected"; - for (var i = 0; i < message.excludedPhrases.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase.verify(message.excludedPhrases[i]); + if (message.environments != null && message.hasOwnProperty("environments")) { + if (!Array.isArray(message.environments)) + return "environments: array expected"; + for (var i = 0; i < message.environments.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.Environment.verify(message.environments[i]); if (error) - return "excludedPhrases." + error; + return "environments." + error; } } - if (message.enableFuzzyExtraction != null && message.hasOwnProperty("enableFuzzyExtraction")) - if (typeof message.enableFuzzyExtraction !== "boolean") - return "enableFuzzyExtraction: boolean expected"; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates an EntityType message from a plain object. Also converts values to their respective internal types. + * Creates a ListEnvironmentsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.EntityType} EntityType + * @returns {google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse} ListEnvironmentsResponse */ - EntityType.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.EntityType) + ListEnvironmentsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.EntityType(); - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - switch (object.kind) { - case "KIND_UNSPECIFIED": - case 0: - message.kind = 0; - break; - case "KIND_MAP": - case 1: - message.kind = 1; - break; - case "KIND_LIST": - case 2: - message.kind = 2; - break; - case "KIND_REGEXP": - case 3: - message.kind = 3; - break; - } - switch (object.autoExpansionMode) { - case "AUTO_EXPANSION_MODE_UNSPECIFIED": - case 0: - message.autoExpansionMode = 0; - break; - case "AUTO_EXPANSION_MODE_DEFAULT": - case 1: - message.autoExpansionMode = 1; - break; - } - if (object.entities) { - if (!Array.isArray(object.entities)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.EntityType.entities: array expected"); - message.entities = []; - for (var i = 0; i < object.entities.length; ++i) { - if (typeof object.entities[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.EntityType.entities: object expected"); - message.entities[i] = $root.google.cloud.dialogflow.cx.v3beta1.EntityType.Entity.fromObject(object.entities[i]); - } - } - if (object.excludedPhrases) { - if (!Array.isArray(object.excludedPhrases)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.EntityType.excludedPhrases: array expected"); - message.excludedPhrases = []; - for (var i = 0; i < object.excludedPhrases.length; ++i) { - if (typeof object.excludedPhrases[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.EntityType.excludedPhrases: object expected"); - message.excludedPhrases[i] = $root.google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase.fromObject(object.excludedPhrases[i]); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse(); + if (object.environments) { + if (!Array.isArray(object.environments)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse.environments: array expected"); + message.environments = []; + for (var i = 0; i < object.environments.length; ++i) { + if (typeof object.environments[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse.environments: object expected"); + message.environments[i] = $root.google.cloud.dialogflow.cx.v3beta1.Environment.fromObject(object.environments[i]); } } - if (object.enableFuzzyExtraction != null) - message.enableFuzzyExtraction = Boolean(object.enableFuzzyExtraction); + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from an EntityType message. Also converts values to other types if specified. + * Creates a plain object from a ListEnvironmentsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.EntityType} message EntityType + * @param {google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse} message ListEnvironmentsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EntityType.toObject = function toObject(message, options) { + ListEnvironmentsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.entities = []; - object.excludedPhrases = []; - } - if (options.defaults) { - object.name = ""; - object.displayName = ""; - object.kind = options.enums === String ? "KIND_UNSPECIFIED" : 0; - object.autoExpansionMode = options.enums === String ? "AUTO_EXPANSION_MODE_UNSPECIFIED" : 0; - object.enableFuzzyExtraction = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.kind != null && message.hasOwnProperty("kind")) - object.kind = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.EntityType.Kind[message.kind] : message.kind; - if (message.autoExpansionMode != null && message.hasOwnProperty("autoExpansionMode")) - object.autoExpansionMode = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.EntityType.AutoExpansionMode[message.autoExpansionMode] : message.autoExpansionMode; - if (message.entities && message.entities.length) { - object.entities = []; - for (var j = 0; j < message.entities.length; ++j) - object.entities[j] = $root.google.cloud.dialogflow.cx.v3beta1.EntityType.Entity.toObject(message.entities[j], options); - } - if (message.excludedPhrases && message.excludedPhrases.length) { - object.excludedPhrases = []; - for (var j = 0; j < message.excludedPhrases.length; ++j) - object.excludedPhrases[j] = $root.google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase.toObject(message.excludedPhrases[j], options); + if (options.arrays || options.defaults) + object.environments = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.environments && message.environments.length) { + object.environments = []; + for (var j = 0; j < message.environments.length; ++j) + object.environments[j] = $root.google.cloud.dialogflow.cx.v3beta1.Environment.toObject(message.environments[j], options); } - if (message.enableFuzzyExtraction != null && message.hasOwnProperty("enableFuzzyExtraction")) - object.enableFuzzyExtraction = message.enableFuzzyExtraction; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this EntityType to JSON. + * Converts this ListEnvironmentsResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse * @instance * @returns {Object.} JSON object */ - EntityType.prototype.toJSON = function toJSON() { + ListEnvironmentsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - EntityType.Entity = (function() { - - /** - * Properties of an Entity. - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType - * @interface IEntity - * @property {string|null} [value] Entity value - * @property {Array.|null} [synonyms] Entity synonyms - */ - - /** - * Constructs a new Entity. - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType - * @classdesc Represents an Entity. - * @implements IEntity - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.EntityType.IEntity=} [properties] Properties to set - */ - function Entity(properties) { - this.synonyms = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Entity value. - * @member {string} value - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType.Entity - * @instance - */ - Entity.prototype.value = ""; - - /** - * Entity synonyms. - * @member {Array.} synonyms - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType.Entity - * @instance - */ - Entity.prototype.synonyms = $util.emptyArray; - - /** - * Creates a new Entity instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType.Entity - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.EntityType.IEntity=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.EntityType.Entity} Entity instance - */ - Entity.create = function create(properties) { - return new Entity(properties); - }; - - /** - * Encodes the specified Entity message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.EntityType.Entity.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType.Entity - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.EntityType.IEntity} message Entity message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Entity.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); - if (message.synonyms != null && message.synonyms.length) - for (var i = 0; i < message.synonyms.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.synonyms[i]); - return writer; - }; - - /** - * Encodes the specified Entity message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.EntityType.Entity.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType.Entity - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.EntityType.IEntity} message Entity message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Entity.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Entity message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType.Entity - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.EntityType.Entity} Entity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Entity.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.EntityType.Entity(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.value = reader.string(); - break; - case 2: - if (!(message.synonyms && message.synonyms.length)) - message.synonyms = []; - message.synonyms.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Entity message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType.Entity - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.EntityType.Entity} Entity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Entity.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Entity message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType.Entity - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Entity.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isString(message.value)) - return "value: string expected"; - if (message.synonyms != null && message.hasOwnProperty("synonyms")) { - if (!Array.isArray(message.synonyms)) - return "synonyms: array expected"; - for (var i = 0; i < message.synonyms.length; ++i) - if (!$util.isString(message.synonyms[i])) - return "synonyms: string[] expected"; - } - return null; - }; - - /** - * Creates an Entity message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType.Entity - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.EntityType.Entity} Entity - */ - Entity.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.EntityType.Entity) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.EntityType.Entity(); - if (object.value != null) - message.value = String(object.value); - if (object.synonyms) { - if (!Array.isArray(object.synonyms)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.EntityType.Entity.synonyms: array expected"); - message.synonyms = []; - for (var i = 0; i < object.synonyms.length; ++i) - message.synonyms[i] = String(object.synonyms[i]); - } - return message; - }; - - /** - * Creates a plain object from an Entity message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType.Entity - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.EntityType.Entity} message Entity - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Entity.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.synonyms = []; - if (options.defaults) - object.value = ""; - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; - if (message.synonyms && message.synonyms.length) { - object.synonyms = []; - for (var j = 0; j < message.synonyms.length; ++j) - object.synonyms[j] = message.synonyms[j]; - } - return object; - }; - - /** - * Converts this Entity to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType.Entity - * @instance - * @returns {Object.} JSON object - */ - Entity.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Entity; - })(); + return ListEnvironmentsResponse; + })(); - EntityType.ExcludedPhrase = (function() { + v3beta1.GetEnvironmentRequest = (function() { - /** - * Properties of an ExcludedPhrase. - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType - * @interface IExcludedPhrase - * @property {string|null} [value] ExcludedPhrase value - */ + /** + * Properties of a GetEnvironmentRequest. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @interface IGetEnvironmentRequest + * @property {string|null} [name] GetEnvironmentRequest name + */ - /** - * Constructs a new ExcludedPhrase. - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType - * @classdesc Represents an ExcludedPhrase. - * @implements IExcludedPhrase - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.EntityType.IExcludedPhrase=} [properties] Properties to set - */ - function ExcludedPhrase(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Constructs a new GetEnvironmentRequest. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents a GetEnvironmentRequest. + * @implements IGetEnvironmentRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.IGetEnvironmentRequest=} [properties] Properties to set + */ + function GetEnvironmentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * ExcludedPhrase value. - * @member {string} value - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase - * @instance - */ - ExcludedPhrase.prototype.value = ""; + /** + * GetEnvironmentRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest + * @instance + */ + GetEnvironmentRequest.prototype.name = ""; - /** - * Creates a new ExcludedPhrase instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.EntityType.IExcludedPhrase=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase} ExcludedPhrase instance - */ - ExcludedPhrase.create = function create(properties) { - return new ExcludedPhrase(properties); - }; + /** + * Creates a new GetEnvironmentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IGetEnvironmentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest} GetEnvironmentRequest instance + */ + GetEnvironmentRequest.create = function create(properties) { + return new GetEnvironmentRequest(properties); + }; - /** - * Encodes the specified ExcludedPhrase message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.EntityType.IExcludedPhrase} message ExcludedPhrase message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExcludedPhrase.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); - return writer; - }; + /** + * Encodes the specified GetEnvironmentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IGetEnvironmentRequest} message GetEnvironmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetEnvironmentRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; - /** - * Encodes the specified ExcludedPhrase message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.EntityType.IExcludedPhrase} message ExcludedPhrase message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExcludedPhrase.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified GetEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IGetEnvironmentRequest} message GetEnvironmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes an ExcludedPhrase message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase} ExcludedPhrase - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExcludedPhrase.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.value = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } + /** + * Decodes a GetEnvironmentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest} GetEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetEnvironmentRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } - return message; - }; - - /** - * Decodes an ExcludedPhrase message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase} ExcludedPhrase - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExcludedPhrase.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + } + return message; + }; - /** - * Verifies an ExcludedPhrase message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExcludedPhrase.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isString(message.value)) - return "value: string expected"; - return null; - }; + /** + * Decodes a GetEnvironmentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest} GetEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetEnvironmentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates an ExcludedPhrase message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase} ExcludedPhrase - */ - ExcludedPhrase.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase(); - if (object.value != null) - message.value = String(object.value); - return message; - }; + /** + * Verifies a GetEnvironmentRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetEnvironmentRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; - /** - * Creates a plain object from an ExcludedPhrase message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase} message ExcludedPhrase - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExcludedPhrase.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.value = ""; - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; + /** + * Creates a GetEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest} GetEnvironmentRequest + */ + GetEnvironmentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest) return object; - }; - - /** - * Converts this ExcludedPhrase to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase - * @instance - * @returns {Object.} JSON object - */ - ExcludedPhrase.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ExcludedPhrase; - })(); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; /** - * Kind enum. - * @name google.cloud.dialogflow.cx.v3beta1.EntityType.Kind - * @enum {number} - * @property {number} KIND_UNSPECIFIED=0 KIND_UNSPECIFIED value - * @property {number} KIND_MAP=1 KIND_MAP value - * @property {number} KIND_LIST=2 KIND_LIST value - * @property {number} KIND_REGEXP=3 KIND_REGEXP value + * Creates a plain object from a GetEnvironmentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest} message GetEnvironmentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - EntityType.Kind = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "KIND_UNSPECIFIED"] = 0; - values[valuesById[1] = "KIND_MAP"] = 1; - values[valuesById[2] = "KIND_LIST"] = 2; - values[valuesById[3] = "KIND_REGEXP"] = 3; - return values; - })(); + GetEnvironmentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; /** - * AutoExpansionMode enum. - * @name google.cloud.dialogflow.cx.v3beta1.EntityType.AutoExpansionMode - * @enum {number} - * @property {number} AUTO_EXPANSION_MODE_UNSPECIFIED=0 AUTO_EXPANSION_MODE_UNSPECIFIED value - * @property {number} AUTO_EXPANSION_MODE_DEFAULT=1 AUTO_EXPANSION_MODE_DEFAULT value + * Converts this GetEnvironmentRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest + * @instance + * @returns {Object.} JSON object */ - EntityType.AutoExpansionMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "AUTO_EXPANSION_MODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "AUTO_EXPANSION_MODE_DEFAULT"] = 1; - return values; - })(); + GetEnvironmentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return EntityType; + return GetEnvironmentRequest; })(); - v3beta1.ListEntityTypesRequest = (function() { + v3beta1.CreateEnvironmentRequest = (function() { /** - * Properties of a ListEntityTypesRequest. + * Properties of a CreateEnvironmentRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IListEntityTypesRequest - * @property {string|null} [parent] ListEntityTypesRequest parent - * @property {string|null} [languageCode] ListEntityTypesRequest languageCode - * @property {number|null} [pageSize] ListEntityTypesRequest pageSize - * @property {string|null} [pageToken] ListEntityTypesRequest pageToken + * @interface ICreateEnvironmentRequest + * @property {string|null} [parent] CreateEnvironmentRequest parent + * @property {google.cloud.dialogflow.cx.v3beta1.IEnvironment|null} [environment] CreateEnvironmentRequest environment */ /** - * Constructs a new ListEntityTypesRequest. + * Constructs a new CreateEnvironmentRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a ListEntityTypesRequest. - * @implements IListEntityTypesRequest + * @classdesc Represents a CreateEnvironmentRequest. + * @implements ICreateEnvironmentRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IListEntityTypesRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.ICreateEnvironmentRequest=} [properties] Properties to set */ - function ListEntityTypesRequest(properties) { + function CreateEnvironmentRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -56039,100 +63260,80 @@ } /** - * ListEntityTypesRequest parent. + * CreateEnvironmentRequest parent. * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest - * @instance - */ - ListEntityTypesRequest.prototype.parent = ""; - - /** - * ListEntityTypesRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest - * @instance - */ - ListEntityTypesRequest.prototype.languageCode = ""; - - /** - * ListEntityTypesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest * @instance */ - ListEntityTypesRequest.prototype.pageSize = 0; + CreateEnvironmentRequest.prototype.parent = ""; /** - * ListEntityTypesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest + * CreateEnvironmentRequest environment. + * @member {google.cloud.dialogflow.cx.v3beta1.IEnvironment|null|undefined} environment + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest * @instance */ - ListEntityTypesRequest.prototype.pageToken = ""; + CreateEnvironmentRequest.prototype.environment = null; /** - * Creates a new ListEntityTypesRequest instance using the specified properties. + * Creates a new CreateEnvironmentRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListEntityTypesRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest} ListEntityTypesRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.ICreateEnvironmentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest} CreateEnvironmentRequest instance */ - ListEntityTypesRequest.create = function create(properties) { - return new ListEntityTypesRequest(properties); + CreateEnvironmentRequest.create = function create(properties) { + return new CreateEnvironmentRequest(properties); }; /** - * Encodes the specified ListEntityTypesRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest.verify|verify} messages. + * Encodes the specified CreateEnvironmentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListEntityTypesRequest} message ListEntityTypesRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.ICreateEnvironmentRequest} message CreateEnvironmentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListEntityTypesRequest.encode = function encode(message, writer) { + CreateEnvironmentRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); + if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) + $root.google.cloud.dialogflow.cx.v3beta1.Environment.encode(message.environment, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListEntityTypesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest.verify|verify} messages. + * Encodes the specified CreateEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListEntityTypesRequest} message ListEntityTypesRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.ICreateEnvironmentRequest} message CreateEnvironmentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListEntityTypesRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreateEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListEntityTypesRequest message from the specified reader or buffer. + * Decodes a CreateEnvironmentRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest} ListEntityTypesRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest} CreateEnvironmentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListEntityTypesRequest.decode = function decode(reader, length) { + CreateEnvironmentRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -56140,13 +63341,7 @@ message.parent = reader.string(); break; case 2: - message.languageCode = reader.string(); - break; - case 3: - message.pageSize = reader.int32(); - break; - case 4: - message.pageToken = reader.string(); + message.environment = $root.google.cloud.dialogflow.cx.v3beta1.Environment.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -56157,134 +63352,122 @@ }; /** - * Decodes a ListEntityTypesRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateEnvironmentRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest} ListEntityTypesRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest} CreateEnvironmentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListEntityTypesRequest.decodeDelimited = function decodeDelimited(reader) { + CreateEnvironmentRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListEntityTypesRequest message. + * Verifies a CreateEnvironmentRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListEntityTypesRequest.verify = function verify(message) { + CreateEnvironmentRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.parent != null && message.hasOwnProperty("parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; + if (message.environment != null && message.hasOwnProperty("environment")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.Environment.verify(message.environment); + if (error) + return "environment." + error; + } return null; }; /** - * Creates a ListEntityTypesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateEnvironmentRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest} ListEntityTypesRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest} CreateEnvironmentRequest */ - ListEntityTypesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest) + CreateEnvironmentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest(); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest(); if (object.parent != null) message.parent = String(object.parent); - if (object.languageCode != null) - message.languageCode = String(object.languageCode); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); + if (object.environment != null) { + if (typeof object.environment !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest.environment: object expected"); + message.environment = $root.google.cloud.dialogflow.cx.v3beta1.Environment.fromObject(object.environment); + } return message; }; /** - * Creates a plain object from a ListEntityTypesRequest message. Also converts values to other types if specified. + * Creates a plain object from a CreateEnvironmentRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest} message ListEntityTypesRequest + * @param {google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest} message CreateEnvironmentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListEntityTypesRequest.toObject = function toObject(message, options) { + CreateEnvironmentRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.parent = ""; - object.languageCode = ""; - object.pageSize = 0; - object.pageToken = ""; + object.environment = null; } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; + if (message.environment != null && message.hasOwnProperty("environment")) + object.environment = $root.google.cloud.dialogflow.cx.v3beta1.Environment.toObject(message.environment, options); return object; }; /** - * Converts this ListEntityTypesRequest to JSON. + * Converts this CreateEnvironmentRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest * @instance * @returns {Object.} JSON object */ - ListEntityTypesRequest.prototype.toJSON = function toJSON() { + CreateEnvironmentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListEntityTypesRequest; + return CreateEnvironmentRequest; })(); - v3beta1.ListEntityTypesResponse = (function() { + v3beta1.UpdateEnvironmentRequest = (function() { /** - * Properties of a ListEntityTypesResponse. + * Properties of an UpdateEnvironmentRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IListEntityTypesResponse - * @property {Array.|null} [entityTypes] ListEntityTypesResponse entityTypes - * @property {string|null} [nextPageToken] ListEntityTypesResponse nextPageToken + * @interface IUpdateEnvironmentRequest + * @property {google.cloud.dialogflow.cx.v3beta1.IEnvironment|null} [environment] UpdateEnvironmentRequest environment + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateEnvironmentRequest updateMask */ /** - * Constructs a new ListEntityTypesResponse. + * Constructs a new UpdateEnvironmentRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a ListEntityTypesResponse. - * @implements IListEntityTypesResponse + * @classdesc Represents an UpdateEnvironmentRequest. + * @implements IUpdateEnvironmentRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IListEntityTypesResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateEnvironmentRequest=} [properties] Properties to set */ - function ListEntityTypesResponse(properties) { - this.entityTypes = []; + function UpdateEnvironmentRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -56292,91 +63475,88 @@ } /** - * ListEntityTypesResponse entityTypes. - * @member {Array.} entityTypes - * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse + * UpdateEnvironmentRequest environment. + * @member {google.cloud.dialogflow.cx.v3beta1.IEnvironment|null|undefined} environment + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest * @instance */ - ListEntityTypesResponse.prototype.entityTypes = $util.emptyArray; + UpdateEnvironmentRequest.prototype.environment = null; /** - * ListEntityTypesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse + * UpdateEnvironmentRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest * @instance */ - ListEntityTypesResponse.prototype.nextPageToken = ""; + UpdateEnvironmentRequest.prototype.updateMask = null; /** - * Creates a new ListEntityTypesResponse instance using the specified properties. + * Creates a new UpdateEnvironmentRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListEntityTypesResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse} ListEntityTypesResponse instance + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateEnvironmentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest} UpdateEnvironmentRequest instance */ - ListEntityTypesResponse.create = function create(properties) { - return new ListEntityTypesResponse(properties); + UpdateEnvironmentRequest.create = function create(properties) { + return new UpdateEnvironmentRequest(properties); }; /** - * Encodes the specified ListEntityTypesResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse.verify|verify} messages. + * Encodes the specified UpdateEnvironmentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListEntityTypesResponse} message ListEntityTypesResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateEnvironmentRequest} message UpdateEnvironmentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListEntityTypesResponse.encode = function encode(message, writer) { + UpdateEnvironmentRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.entityTypes != null && message.entityTypes.length) - for (var i = 0; i < message.entityTypes.length; ++i) - $root.google.cloud.dialogflow.cx.v3beta1.EntityType.encode(message.entityTypes[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) + $root.google.cloud.dialogflow.cx.v3beta1.Environment.encode(message.environment, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListEntityTypesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse.verify|verify} messages. + * Encodes the specified UpdateEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListEntityTypesResponse} message ListEntityTypesResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateEnvironmentRequest} message UpdateEnvironmentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListEntityTypesResponse.encodeDelimited = function encodeDelimited(message, writer) { + UpdateEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListEntityTypesResponse message from the specified reader or buffer. + * Decodes an UpdateEnvironmentRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse} ListEntityTypesResponse + * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest} UpdateEnvironmentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListEntityTypesResponse.decode = function decode(reader, length) { + UpdateEnvironmentRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.entityTypes && message.entityTypes.length)) - message.entityTypes = []; - message.entityTypes.push($root.google.cloud.dialogflow.cx.v3beta1.EntityType.decode(reader, reader.uint32())); + message.environment = $root.google.cloud.dialogflow.cx.v3beta1.Environment.decode(reader, reader.uint32()); break; case 2: - message.nextPageToken = reader.string(); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -56387,134 +63567,126 @@ }; /** - * Decodes a ListEntityTypesResponse message from the specified reader or buffer, length delimited. + * Decodes an UpdateEnvironmentRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse} ListEntityTypesResponse + * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest} UpdateEnvironmentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListEntityTypesResponse.decodeDelimited = function decodeDelimited(reader) { + UpdateEnvironmentRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListEntityTypesResponse message. + * Verifies an UpdateEnvironmentRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListEntityTypesResponse.verify = function verify(message) { + UpdateEnvironmentRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.entityTypes != null && message.hasOwnProperty("entityTypes")) { - if (!Array.isArray(message.entityTypes)) - return "entityTypes: array expected"; - for (var i = 0; i < message.entityTypes.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.EntityType.verify(message.entityTypes[i]); - if (error) - return "entityTypes." + error; - } + if (message.environment != null && message.hasOwnProperty("environment")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.Environment.verify(message.environment); + if (error) + return "environment." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; return null; }; /** - * Creates a ListEntityTypesResponse message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateEnvironmentRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse} ListEntityTypesResponse + * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest} UpdateEnvironmentRequest */ - ListEntityTypesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse) + UpdateEnvironmentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse(); - if (object.entityTypes) { - if (!Array.isArray(object.entityTypes)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse.entityTypes: array expected"); - message.entityTypes = []; - for (var i = 0; i < object.entityTypes.length; ++i) { - if (typeof object.entityTypes[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse.entityTypes: object expected"); - message.entityTypes[i] = $root.google.cloud.dialogflow.cx.v3beta1.EntityType.fromObject(object.entityTypes[i]); - } + var message = new $root.google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest(); + if (object.environment != null) { + if (typeof object.environment !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest.environment: object expected"); + message.environment = $root.google.cloud.dialogflow.cx.v3beta1.Environment.fromObject(object.environment); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a ListEntityTypesResponse message. Also converts values to other types if specified. + * Creates a plain object from an UpdateEnvironmentRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse} message ListEntityTypesResponse + * @param {google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest} message UpdateEnvironmentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListEntityTypesResponse.toObject = function toObject(message, options) { + UpdateEnvironmentRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.entityTypes = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.entityTypes && message.entityTypes.length) { - object.entityTypes = []; - for (var j = 0; j < message.entityTypes.length; ++j) - object.entityTypes[j] = $root.google.cloud.dialogflow.cx.v3beta1.EntityType.toObject(message.entityTypes[j], options); + if (options.defaults) { + object.environment = null; + object.updateMask = null; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + if (message.environment != null && message.hasOwnProperty("environment")) + object.environment = $root.google.cloud.dialogflow.cx.v3beta1.Environment.toObject(message.environment, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this ListEntityTypesResponse to JSON. + * Converts this UpdateEnvironmentRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest * @instance * @returns {Object.} JSON object */ - ListEntityTypesResponse.prototype.toJSON = function toJSON() { + UpdateEnvironmentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListEntityTypesResponse; + return UpdateEnvironmentRequest; })(); - v3beta1.GetEntityTypeRequest = (function() { + v3beta1.DeleteEnvironmentRequest = (function() { /** - * Properties of a GetEntityTypeRequest. + * Properties of a DeleteEnvironmentRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IGetEntityTypeRequest - * @property {string|null} [name] GetEntityTypeRequest name - * @property {string|null} [languageCode] GetEntityTypeRequest languageCode + * @interface IDeleteEnvironmentRequest + * @property {string|null} [name] DeleteEnvironmentRequest name */ /** - * Constructs a new GetEntityTypeRequest. + * Constructs a new DeleteEnvironmentRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a GetEntityTypeRequest. - * @implements IGetEntityTypeRequest + * @classdesc Represents a DeleteEnvironmentRequest. + * @implements IDeleteEnvironmentRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IGetEntityTypeRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteEnvironmentRequest=} [properties] Properties to set */ - function GetEntityTypeRequest(properties) { + function DeleteEnvironmentRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -56522,89 +63694,76 @@ } /** - * GetEntityTypeRequest name. + * DeleteEnvironmentRequest name. * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest - * @instance - */ - GetEntityTypeRequest.prototype.name = ""; - - /** - * GetEntityTypeRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest * @instance */ - GetEntityTypeRequest.prototype.languageCode = ""; + DeleteEnvironmentRequest.prototype.name = ""; /** - * Creates a new GetEntityTypeRequest instance using the specified properties. + * Creates a new DeleteEnvironmentRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IGetEntityTypeRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest} GetEntityTypeRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteEnvironmentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest} DeleteEnvironmentRequest instance */ - GetEntityTypeRequest.create = function create(properties) { - return new GetEntityTypeRequest(properties); + DeleteEnvironmentRequest.create = function create(properties) { + return new DeleteEnvironmentRequest(properties); }; /** - * Encodes the specified GetEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest.verify|verify} messages. + * Encodes the specified DeleteEnvironmentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IGetEntityTypeRequest} message GetEntityTypeRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteEnvironmentRequest} message DeleteEnvironmentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetEntityTypeRequest.encode = function encode(message, writer) { + DeleteEnvironmentRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); return writer; }; /** - * Encodes the specified GetEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest.verify|verify} messages. + * Encodes the specified DeleteEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IGetEntityTypeRequest} message GetEntityTypeRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteEnvironmentRequest} message DeleteEnvironmentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetEntityTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeleteEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetEntityTypeRequest message from the specified reader or buffer. + * Decodes a DeleteEnvironmentRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest} GetEntityTypeRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest} DeleteEnvironmentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetEntityTypeRequest.decode = function decode(reader, length) { + DeleteEnvironmentRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: message.name = reader.string(); break; - case 2: - message.languageCode = reader.string(); - break; default: reader.skipType(tag & 7); break; @@ -56614,118 +63773,109 @@ }; /** - * Decodes a GetEntityTypeRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteEnvironmentRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest} GetEntityTypeRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest} DeleteEnvironmentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetEntityTypeRequest.decodeDelimited = function decodeDelimited(reader) { + DeleteEnvironmentRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetEntityTypeRequest message. + * Verifies a DeleteEnvironmentRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetEntityTypeRequest.verify = function verify(message) { + DeleteEnvironmentRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; return null; }; /** - * Creates a GetEntityTypeRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteEnvironmentRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest} GetEntityTypeRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest} DeleteEnvironmentRequest */ - GetEntityTypeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest) + DeleteEnvironmentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest(); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest(); if (object.name != null) message.name = String(object.name); - if (object.languageCode != null) - message.languageCode = String(object.languageCode); return message; }; /** - * Creates a plain object from a GetEntityTypeRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeleteEnvironmentRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest} message GetEntityTypeRequest + * @param {google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest} message DeleteEnvironmentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetEntityTypeRequest.toObject = function toObject(message, options) { + DeleteEnvironmentRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { + if (options.defaults) object.name = ""; - object.languageCode = ""; - } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; return object; }; /** - * Converts this GetEntityTypeRequest to JSON. + * Converts this DeleteEnvironmentRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest * @instance * @returns {Object.} JSON object */ - GetEntityTypeRequest.prototype.toJSON = function toJSON() { + DeleteEnvironmentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetEntityTypeRequest; + return DeleteEnvironmentRequest; })(); - v3beta1.CreateEntityTypeRequest = (function() { + v3beta1.LookupEnvironmentHistoryRequest = (function() { /** - * Properties of a CreateEntityTypeRequest. + * Properties of a LookupEnvironmentHistoryRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface ICreateEntityTypeRequest - * @property {string|null} [parent] CreateEntityTypeRequest parent - * @property {google.cloud.dialogflow.cx.v3beta1.IEntityType|null} [entityType] CreateEntityTypeRequest entityType - * @property {string|null} [languageCode] CreateEntityTypeRequest languageCode + * @interface ILookupEnvironmentHistoryRequest + * @property {string|null} [name] LookupEnvironmentHistoryRequest name + * @property {number|null} [pageSize] LookupEnvironmentHistoryRequest pageSize + * @property {string|null} [pageToken] LookupEnvironmentHistoryRequest pageToken */ /** - * Constructs a new CreateEntityTypeRequest. + * Constructs a new LookupEnvironmentHistoryRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a CreateEntityTypeRequest. - * @implements ICreateEntityTypeRequest + * @classdesc Represents a LookupEnvironmentHistoryRequest. + * @implements ILookupEnvironmentHistoryRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.ICreateEntityTypeRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.ILookupEnvironmentHistoryRequest=} [properties] Properties to set */ - function CreateEntityTypeRequest(properties) { + function LookupEnvironmentHistoryRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -56733,101 +63883,101 @@ } /** - * CreateEntityTypeRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest + * LookupEnvironmentHistoryRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest * @instance */ - CreateEntityTypeRequest.prototype.parent = ""; + LookupEnvironmentHistoryRequest.prototype.name = ""; /** - * CreateEntityTypeRequest entityType. - * @member {google.cloud.dialogflow.cx.v3beta1.IEntityType|null|undefined} entityType - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest + * LookupEnvironmentHistoryRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest * @instance */ - CreateEntityTypeRequest.prototype.entityType = null; + LookupEnvironmentHistoryRequest.prototype.pageSize = 0; /** - * CreateEntityTypeRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest + * LookupEnvironmentHistoryRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest * @instance */ - CreateEntityTypeRequest.prototype.languageCode = ""; + LookupEnvironmentHistoryRequest.prototype.pageToken = ""; /** - * Creates a new CreateEntityTypeRequest instance using the specified properties. + * Creates a new LookupEnvironmentHistoryRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ICreateEntityTypeRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest} CreateEntityTypeRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.ILookupEnvironmentHistoryRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest} LookupEnvironmentHistoryRequest instance */ - CreateEntityTypeRequest.create = function create(properties) { - return new CreateEntityTypeRequest(properties); + LookupEnvironmentHistoryRequest.create = function create(properties) { + return new LookupEnvironmentHistoryRequest(properties); }; /** - * Encodes the specified CreateEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest.verify|verify} messages. + * Encodes the specified LookupEnvironmentHistoryRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ICreateEntityTypeRequest} message CreateEntityTypeRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.ILookupEnvironmentHistoryRequest} message LookupEnvironmentHistoryRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateEntityTypeRequest.encode = function encode(message, writer) { + LookupEnvironmentHistoryRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.entityType != null && Object.hasOwnProperty.call(message, "entityType")) - $root.google.cloud.dialogflow.cx.v3beta1.EntityType.encode(message.entityType, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.languageCode); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); return writer; }; /** - * Encodes the specified CreateEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest.verify|verify} messages. + * Encodes the specified LookupEnvironmentHistoryRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ICreateEntityTypeRequest} message CreateEntityTypeRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.ILookupEnvironmentHistoryRequest} message LookupEnvironmentHistoryRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateEntityTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { + LookupEnvironmentHistoryRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateEntityTypeRequest message from the specified reader or buffer. + * Decodes a LookupEnvironmentHistoryRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest} CreateEntityTypeRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest} LookupEnvironmentHistoryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateEntityTypeRequest.decode = function decode(reader, length) { + LookupEnvironmentHistoryRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); + message.name = reader.string(); break; case 2: - message.entityType = $root.google.cloud.dialogflow.cx.v3beta1.EntityType.decode(reader, reader.uint32()); + message.pageSize = reader.int32(); break; case 3: - message.languageCode = reader.string(); + message.pageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -56838,131 +63988,126 @@ }; /** - * Decodes a CreateEntityTypeRequest message from the specified reader or buffer, length delimited. + * Decodes a LookupEnvironmentHistoryRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest} CreateEntityTypeRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest} LookupEnvironmentHistoryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateEntityTypeRequest.decodeDelimited = function decodeDelimited(reader) { + LookupEnvironmentHistoryRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateEntityTypeRequest message. + * Verifies a LookupEnvironmentHistoryRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateEntityTypeRequest.verify = function verify(message) { + LookupEnvironmentHistoryRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.entityType != null && message.hasOwnProperty("entityType")) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.EntityType.verify(message.entityType); - if (error) - return "entityType." + error; - } - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; return null; }; /** - * Creates a CreateEntityTypeRequest message from a plain object. Also converts values to their respective internal types. + * Creates a LookupEnvironmentHistoryRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest} CreateEntityTypeRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest} LookupEnvironmentHistoryRequest */ - CreateEntityTypeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest) + LookupEnvironmentHistoryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.entityType != null) { - if (typeof object.entityType !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest.entityType: object expected"); - message.entityType = $root.google.cloud.dialogflow.cx.v3beta1.EntityType.fromObject(object.entityType); - } - if (object.languageCode != null) - message.languageCode = String(object.languageCode); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); return message; }; /** - * Creates a plain object from a CreateEntityTypeRequest message. Also converts values to other types if specified. + * Creates a plain object from a LookupEnvironmentHistoryRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest} message CreateEntityTypeRequest + * @param {google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest} message LookupEnvironmentHistoryRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateEntityTypeRequest.toObject = function toObject(message, options) { + LookupEnvironmentHistoryRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.entityType = null; - object.languageCode = ""; + object.name = ""; + object.pageSize = 0; + object.pageToken = ""; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.entityType != null && message.hasOwnProperty("entityType")) - object.entityType = $root.google.cloud.dialogflow.cx.v3beta1.EntityType.toObject(message.entityType, options); - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; return object; }; /** - * Converts this CreateEntityTypeRequest to JSON. + * Converts this LookupEnvironmentHistoryRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest * @instance * @returns {Object.} JSON object */ - CreateEntityTypeRequest.prototype.toJSON = function toJSON() { + LookupEnvironmentHistoryRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CreateEntityTypeRequest; + return LookupEnvironmentHistoryRequest; })(); - v3beta1.UpdateEntityTypeRequest = (function() { + v3beta1.LookupEnvironmentHistoryResponse = (function() { /** - * Properties of an UpdateEntityTypeRequest. + * Properties of a LookupEnvironmentHistoryResponse. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IUpdateEntityTypeRequest - * @property {google.cloud.dialogflow.cx.v3beta1.IEntityType|null} [entityType] UpdateEntityTypeRequest entityType - * @property {string|null} [languageCode] UpdateEntityTypeRequest languageCode - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateEntityTypeRequest updateMask + * @interface ILookupEnvironmentHistoryResponse + * @property {Array.|null} [environments] LookupEnvironmentHistoryResponse environments + * @property {string|null} [nextPageToken] LookupEnvironmentHistoryResponse nextPageToken */ /** - * Constructs a new UpdateEntityTypeRequest. + * Constructs a new LookupEnvironmentHistoryResponse. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents an UpdateEntityTypeRequest. - * @implements IUpdateEntityTypeRequest + * @classdesc Represents a LookupEnvironmentHistoryResponse. + * @implements ILookupEnvironmentHistoryResponse * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateEntityTypeRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.ILookupEnvironmentHistoryResponse=} [properties] Properties to set */ - function UpdateEntityTypeRequest(properties) { + function LookupEnvironmentHistoryResponse(properties) { + this.environments = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -56970,101 +64115,91 @@ } /** - * UpdateEntityTypeRequest entityType. - * @member {google.cloud.dialogflow.cx.v3beta1.IEntityType|null|undefined} entityType - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest - * @instance - */ - UpdateEntityTypeRequest.prototype.entityType = null; - - /** - * UpdateEntityTypeRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest + * LookupEnvironmentHistoryResponse environments. + * @member {Array.} environments + * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse * @instance */ - UpdateEntityTypeRequest.prototype.languageCode = ""; + LookupEnvironmentHistoryResponse.prototype.environments = $util.emptyArray; /** - * UpdateEntityTypeRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest + * LookupEnvironmentHistoryResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse * @instance */ - UpdateEntityTypeRequest.prototype.updateMask = null; + LookupEnvironmentHistoryResponse.prototype.nextPageToken = ""; /** - * Creates a new UpdateEntityTypeRequest instance using the specified properties. + * Creates a new LookupEnvironmentHistoryResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateEntityTypeRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest} UpdateEntityTypeRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.ILookupEnvironmentHistoryResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse} LookupEnvironmentHistoryResponse instance */ - UpdateEntityTypeRequest.create = function create(properties) { - return new UpdateEntityTypeRequest(properties); + LookupEnvironmentHistoryResponse.create = function create(properties) { + return new LookupEnvironmentHistoryResponse(properties); }; /** - * Encodes the specified UpdateEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest.verify|verify} messages. + * Encodes the specified LookupEnvironmentHistoryResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateEntityTypeRequest} message UpdateEntityTypeRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.ILookupEnvironmentHistoryResponse} message LookupEnvironmentHistoryResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateEntityTypeRequest.encode = function encode(message, writer) { + LookupEnvironmentHistoryResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.entityType != null && Object.hasOwnProperty.call(message, "entityType")) - $root.google.cloud.dialogflow.cx.v3beta1.EntityType.encode(message.entityType, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.environments != null && message.environments.length) + for (var i = 0; i < message.environments.length; ++i) + $root.google.cloud.dialogflow.cx.v3beta1.Environment.encode(message.environments[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified UpdateEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest.verify|verify} messages. + * Encodes the specified LookupEnvironmentHistoryResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateEntityTypeRequest} message UpdateEntityTypeRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.ILookupEnvironmentHistoryResponse} message LookupEnvironmentHistoryResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateEntityTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { + LookupEnvironmentHistoryResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateEntityTypeRequest message from the specified reader or buffer. + * Decodes a LookupEnvironmentHistoryResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest} UpdateEntityTypeRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse} LookupEnvironmentHistoryResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateEntityTypeRequest.decode = function decode(reader, length) { + LookupEnvironmentHistoryResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.entityType = $root.google.cloud.dialogflow.cx.v3beta1.EntityType.decode(reader, reader.uint32()); + if (!(message.environments && message.environments.length)) + message.environments = []; + message.environments.push($root.google.cloud.dialogflow.cx.v3beta1.Environment.decode(reader, reader.uint32())); break; case 2: - message.languageCode = reader.string(); - break; - case 3: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.nextPageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -57075,135 +64210,411 @@ }; /** - * Decodes an UpdateEntityTypeRequest message from the specified reader or buffer, length delimited. + * Decodes a LookupEnvironmentHistoryResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest} UpdateEntityTypeRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse} LookupEnvironmentHistoryResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateEntityTypeRequest.decodeDelimited = function decodeDelimited(reader) { + LookupEnvironmentHistoryResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateEntityTypeRequest message. + * Verifies a LookupEnvironmentHistoryResponse message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateEntityTypeRequest.verify = function verify(message) { + LookupEnvironmentHistoryResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.entityType != null && message.hasOwnProperty("entityType")) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.EntityType.verify(message.entityType); - if (error) - return "entityType." + error; - } - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; + if (message.environments != null && message.hasOwnProperty("environments")) { + if (!Array.isArray(message.environments)) + return "environments: array expected"; + for (var i = 0; i < message.environments.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.Environment.verify(message.environments[i]); + if (error) + return "environments." + error; + } } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates an UpdateEntityTypeRequest message from a plain object. Also converts values to their respective internal types. + * Creates a LookupEnvironmentHistoryResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest} UpdateEntityTypeRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse} LookupEnvironmentHistoryResponse */ - UpdateEntityTypeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest) + LookupEnvironmentHistoryResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest(); - if (object.entityType != null) { - if (typeof object.entityType !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest.entityType: object expected"); - message.entityType = $root.google.cloud.dialogflow.cx.v3beta1.EntityType.fromObject(object.entityType); - } - if (object.languageCode != null) - message.languageCode = String(object.languageCode); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse(); + if (object.environments) { + if (!Array.isArray(object.environments)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse.environments: array expected"); + message.environments = []; + for (var i = 0; i < object.environments.length; ++i) { + if (typeof object.environments[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse.environments: object expected"); + message.environments[i] = $root.google.cloud.dialogflow.cx.v3beta1.Environment.fromObject(object.environments[i]); + } } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from an UpdateEntityTypeRequest message. Also converts values to other types if specified. + * Creates a plain object from a LookupEnvironmentHistoryResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest} message UpdateEntityTypeRequest + * @param {google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse} message LookupEnvironmentHistoryResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateEntityTypeRequest.toObject = function toObject(message, options) { + LookupEnvironmentHistoryResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.entityType = null; - object.languageCode = ""; - object.updateMask = null; + if (options.arrays || options.defaults) + object.environments = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.environments && message.environments.length) { + object.environments = []; + for (var j = 0; j < message.environments.length; ++j) + object.environments[j] = $root.google.cloud.dialogflow.cx.v3beta1.Environment.toObject(message.environments[j], options); } - if (message.entityType != null && message.hasOwnProperty("entityType")) - object.entityType = $root.google.cloud.dialogflow.cx.v3beta1.EntityType.toObject(message.entityType, options); - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this UpdateEntityTypeRequest to JSON. + * Converts this LookupEnvironmentHistoryResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse * @instance * @returns {Object.} JSON object */ - UpdateEntityTypeRequest.prototype.toJSON = function toJSON() { + LookupEnvironmentHistoryResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UpdateEntityTypeRequest; + return LookupEnvironmentHistoryResponse; })(); - v3beta1.DeleteEntityTypeRequest = (function() { + v3beta1.Experiments = (function() { /** - * Properties of a DeleteEntityTypeRequest. + * Constructs a new Experiments service. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IDeleteEntityTypeRequest - * @property {string|null} [name] DeleteEntityTypeRequest name - * @property {boolean|null} [force] DeleteEntityTypeRequest force + * @classdesc Represents an Experiments + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Experiments(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Experiments.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Experiments; + + /** + * Creates new Experiments service using the specified rpc implementation. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiments + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Experiments} RPC service. Useful where requests and/or responses are streamed. */ + Experiments.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; /** - * Constructs a new DeleteEntityTypeRequest. + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Experiments#listExperiments}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiments + * @typedef ListExperimentsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse} [response] ListExperimentsResponse + */ + + /** + * Calls ListExperiments. + * @function listExperiments + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiments + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IListExperimentsRequest} request ListExperimentsRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.Experiments.ListExperimentsCallback} callback Node-style callback called with the error, if any, and ListExperimentsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Experiments.prototype.listExperiments = function listExperiments(request, callback) { + return this.rpcCall(listExperiments, $root.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest, $root.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse, request, callback); + }, "name", { value: "ListExperiments" }); + + /** + * Calls ListExperiments. + * @function listExperiments + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiments + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IListExperimentsRequest} request ListExperimentsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Experiments#getExperiment}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiments + * @typedef GetExperimentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3beta1.Experiment} [response] Experiment + */ + + /** + * Calls GetExperiment. + * @function getExperiment + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiments + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IGetExperimentRequest} request GetExperimentRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.Experiments.GetExperimentCallback} callback Node-style callback called with the error, if any, and Experiment + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Experiments.prototype.getExperiment = function getExperiment(request, callback) { + return this.rpcCall(getExperiment, $root.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest, $root.google.cloud.dialogflow.cx.v3beta1.Experiment, request, callback); + }, "name", { value: "GetExperiment" }); + + /** + * Calls GetExperiment. + * @function getExperiment + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiments + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IGetExperimentRequest} request GetExperimentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Experiments#createExperiment}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiments + * @typedef CreateExperimentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3beta1.Experiment} [response] Experiment + */ + + /** + * Calls CreateExperiment. + * @function createExperiment + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiments + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.ICreateExperimentRequest} request CreateExperimentRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.Experiments.CreateExperimentCallback} callback Node-style callback called with the error, if any, and Experiment + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Experiments.prototype.createExperiment = function createExperiment(request, callback) { + return this.rpcCall(createExperiment, $root.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest, $root.google.cloud.dialogflow.cx.v3beta1.Experiment, request, callback); + }, "name", { value: "CreateExperiment" }); + + /** + * Calls CreateExperiment. + * @function createExperiment + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiments + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.ICreateExperimentRequest} request CreateExperimentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Experiments#updateExperiment}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiments + * @typedef UpdateExperimentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3beta1.Experiment} [response] Experiment + */ + + /** + * Calls UpdateExperiment. + * @function updateExperiment + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiments + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateExperimentRequest} request UpdateExperimentRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.Experiments.UpdateExperimentCallback} callback Node-style callback called with the error, if any, and Experiment + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Experiments.prototype.updateExperiment = function updateExperiment(request, callback) { + return this.rpcCall(updateExperiment, $root.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest, $root.google.cloud.dialogflow.cx.v3beta1.Experiment, request, callback); + }, "name", { value: "UpdateExperiment" }); + + /** + * Calls UpdateExperiment. + * @function updateExperiment + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiments + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateExperimentRequest} request UpdateExperimentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Experiments#deleteExperiment}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiments + * @typedef DeleteExperimentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteExperiment. + * @function deleteExperiment + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiments + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteExperimentRequest} request DeleteExperimentRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.Experiments.DeleteExperimentCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Experiments.prototype.deleteExperiment = function deleteExperiment(request, callback) { + return this.rpcCall(deleteExperiment, $root.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteExperiment" }); + + /** + * Calls DeleteExperiment. + * @function deleteExperiment + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiments + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteExperimentRequest} request DeleteExperimentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Experiments#startExperiment}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiments + * @typedef StartExperimentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3beta1.Experiment} [response] Experiment + */ + + /** + * Calls StartExperiment. + * @function startExperiment + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiments + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IStartExperimentRequest} request StartExperimentRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.Experiments.StartExperimentCallback} callback Node-style callback called with the error, if any, and Experiment + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Experiments.prototype.startExperiment = function startExperiment(request, callback) { + return this.rpcCall(startExperiment, $root.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest, $root.google.cloud.dialogflow.cx.v3beta1.Experiment, request, callback); + }, "name", { value: "StartExperiment" }); + + /** + * Calls StartExperiment. + * @function startExperiment + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiments + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IStartExperimentRequest} request StartExperimentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Experiments#stopExperiment}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiments + * @typedef StopExperimentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3beta1.Experiment} [response] Experiment + */ + + /** + * Calls StopExperiment. + * @function stopExperiment + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiments + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IStopExperimentRequest} request StopExperimentRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.Experiments.StopExperimentCallback} callback Node-style callback called with the error, if any, and Experiment + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Experiments.prototype.stopExperiment = function stopExperiment(request, callback) { + return this.rpcCall(stopExperiment, $root.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest, $root.google.cloud.dialogflow.cx.v3beta1.Experiment, request, callback); + }, "name", { value: "StopExperiment" }); + + /** + * Calls StopExperiment. + * @function stopExperiment + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiments + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IStopExperimentRequest} request StopExperimentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Experiments; + })(); + + v3beta1.Experiment = (function() { + + /** + * Properties of an Experiment. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a DeleteEntityTypeRequest. - * @implements IDeleteEntityTypeRequest + * @interface IExperiment + * @property {string|null} [name] Experiment name + * @property {string|null} [displayName] Experiment displayName + * @property {string|null} [description] Experiment description + * @property {google.cloud.dialogflow.cx.v3beta1.Experiment.State|null} [state] Experiment state + * @property {google.cloud.dialogflow.cx.v3beta1.Experiment.IDefinition|null} [definition] Experiment definition + * @property {google.cloud.dialogflow.cx.v3beta1.Experiment.IResult|null} [result] Experiment result + * @property {google.protobuf.ITimestamp|null} [createTime] Experiment createTime + * @property {google.protobuf.ITimestamp|null} [startTime] Experiment startTime + * @property {google.protobuf.ITimestamp|null} [endTime] Experiment endTime + * @property {google.protobuf.ITimestamp|null} [lastUpdateTime] Experiment lastUpdateTime + * @property {google.protobuf.IDuration|null} [experimentLength] Experiment experimentLength + * @property {Array.|null} [variantsHistory] Experiment variantsHistory + */ + + /** + * Constructs a new Experiment. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents an Experiment. + * @implements IExperiment * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteEntityTypeRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IExperiment=} [properties] Properties to set */ - function DeleteEntityTypeRequest(properties) { + function Experiment(properties) { + this.variantsHistory = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -57211,80 +64622,181 @@ } /** - * DeleteEntityTypeRequest name. + * Experiment name. * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment * @instance */ - DeleteEntityTypeRequest.prototype.name = ""; + Experiment.prototype.name = ""; /** - * DeleteEntityTypeRequest force. - * @member {boolean} force - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest + * Experiment displayName. + * @member {string} displayName + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment * @instance */ - DeleteEntityTypeRequest.prototype.force = false; + Experiment.prototype.displayName = ""; /** - * Creates a new DeleteEntityTypeRequest instance using the specified properties. + * Experiment description. + * @member {string} description + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment + * @instance + */ + Experiment.prototype.description = ""; + + /** + * Experiment state. + * @member {google.cloud.dialogflow.cx.v3beta1.Experiment.State} state + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment + * @instance + */ + Experiment.prototype.state = 0; + + /** + * Experiment definition. + * @member {google.cloud.dialogflow.cx.v3beta1.Experiment.IDefinition|null|undefined} definition + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment + * @instance + */ + Experiment.prototype.definition = null; + + /** + * Experiment result. + * @member {google.cloud.dialogflow.cx.v3beta1.Experiment.IResult|null|undefined} result + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment + * @instance + */ + Experiment.prototype.result = null; + + /** + * Experiment createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment + * @instance + */ + Experiment.prototype.createTime = null; + + /** + * Experiment startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment + * @instance + */ + Experiment.prototype.startTime = null; + + /** + * Experiment endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment + * @instance + */ + Experiment.prototype.endTime = null; + + /** + * Experiment lastUpdateTime. + * @member {google.protobuf.ITimestamp|null|undefined} lastUpdateTime + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment + * @instance + */ + Experiment.prototype.lastUpdateTime = null; + + /** + * Experiment experimentLength. + * @member {google.protobuf.IDuration|null|undefined} experimentLength + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment + * @instance + */ + Experiment.prototype.experimentLength = null; + + /** + * Experiment variantsHistory. + * @member {Array.} variantsHistory + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment + * @instance + */ + Experiment.prototype.variantsHistory = $util.emptyArray; + + /** + * Creates a new Experiment instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteEntityTypeRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest} DeleteEntityTypeRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.IExperiment=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.Experiment} Experiment instance */ - DeleteEntityTypeRequest.create = function create(properties) { - return new DeleteEntityTypeRequest(properties); + Experiment.create = function create(properties) { + return new Experiment(properties); }; /** - * Encodes the specified DeleteEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest.verify|verify} messages. + * Encodes the specified Experiment message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Experiment.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteEntityTypeRequest} message DeleteEntityTypeRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IExperiment} message Experiment message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteEntityTypeRequest.encode = function encode(message, writer) { + Experiment.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.force != null && Object.hasOwnProperty.call(message, "force")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.force); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.state); + if (message.definition != null && Object.hasOwnProperty.call(message, "definition")) + $root.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition.encode(message.definition, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.result != null && Object.hasOwnProperty.call(message, "result")) + $root.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.encode(message.result, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.lastUpdateTime != null && Object.hasOwnProperty.call(message, "lastUpdateTime")) + $root.google.protobuf.Timestamp.encode(message.lastUpdateTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.experimentLength != null && Object.hasOwnProperty.call(message, "experimentLength")) + $root.google.protobuf.Duration.encode(message.experimentLength, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.variantsHistory != null && message.variantsHistory.length) + for (var i = 0; i < message.variantsHistory.length; ++i) + $root.google.cloud.dialogflow.cx.v3beta1.VariantsHistory.encode(message.variantsHistory[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); return writer; }; /** - * Encodes the specified DeleteEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest.verify|verify} messages. + * Encodes the specified Experiment message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Experiment.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteEntityTypeRequest} message DeleteEntityTypeRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IExperiment} message Experiment message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteEntityTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { + Experiment.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteEntityTypeRequest message from the specified reader or buffer. + * Decodes an Experiment message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest} DeleteEntityTypeRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.Experiment} Experiment * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteEntityTypeRequest.decode = function decode(reader, length) { + Experiment.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Experiment(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -57292,7 +64804,39 @@ message.name = reader.string(); break; case 2: - message.force = reader.bool(); + message.displayName = reader.string(); + break; + case 3: + message.description = reader.string(); + break; + case 4: + message.state = reader.int32(); + break; + case 5: + message.definition = $root.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition.decode(reader, reader.uint32()); + break; + case 6: + message.result = $root.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.decode(reader, reader.uint32()); + break; + case 7: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 8: + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 9: + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 10: + message.lastUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 11: + message.experimentLength = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 12: + if (!(message.variantsHistory && message.variantsHistory.length)) + message.variantsHistory = []; + message.variantsHistory.push($root.google.cloud.dialogflow.cx.v3beta1.VariantsHistory.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -57303,485 +64847,1659 @@ }; /** - * Decodes a DeleteEntityTypeRequest message from the specified reader or buffer, length delimited. + * Decodes an Experiment message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest} DeleteEntityTypeRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.Experiment} Experiment * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteEntityTypeRequest.decodeDelimited = function decodeDelimited(reader) { + Experiment.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteEntityTypeRequest message. + * Verifies an Experiment message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteEntityTypeRequest.verify = function verify(message) { + Experiment.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.force != null && message.hasOwnProperty("force")) - if (typeof message.force !== "boolean") - return "force: boolean expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.definition != null && message.hasOwnProperty("definition")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition.verify(message.definition); + if (error) + return "definition." + error; + } + if (message.result != null && message.hasOwnProperty("result")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.verify(message.result); + if (error) + return "result." + error; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.lastUpdateTime != null && message.hasOwnProperty("lastUpdateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.lastUpdateTime); + if (error) + return "lastUpdateTime." + error; + } + if (message.experimentLength != null && message.hasOwnProperty("experimentLength")) { + var error = $root.google.protobuf.Duration.verify(message.experimentLength); + if (error) + return "experimentLength." + error; + } + if (message.variantsHistory != null && message.hasOwnProperty("variantsHistory")) { + if (!Array.isArray(message.variantsHistory)) + return "variantsHistory: array expected"; + for (var i = 0; i < message.variantsHistory.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.VariantsHistory.verify(message.variantsHistory[i]); + if (error) + return "variantsHistory." + error; + } + } return null; }; /** - * Creates a DeleteEntityTypeRequest message from a plain object. Also converts values to their respective internal types. + * Creates an Experiment message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest} DeleteEntityTypeRequest - */ - DeleteEntityTypeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest) + * @returns {google.cloud.dialogflow.cx.v3beta1.Experiment} Experiment + */ + Experiment.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Experiment) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest(); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.Experiment(); if (object.name != null) message.name = String(object.name); - if (object.force != null) - message.force = Boolean(object.force); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.description != null) + message.description = String(object.description); + switch (object.state) { + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "DRAFT": + case 1: + message.state = 1; + break; + case "RUNNING": + case 2: + message.state = 2; + break; + case "DONE": + case 3: + message.state = 3; + break; + } + if (object.definition != null) { + if (typeof object.definition !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Experiment.definition: object expected"); + message.definition = $root.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition.fromObject(object.definition); + } + if (object.result != null) { + if (typeof object.result !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Experiment.result: object expected"); + message.result = $root.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.fromObject(object.result); + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Experiment.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Experiment.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Experiment.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + if (object.lastUpdateTime != null) { + if (typeof object.lastUpdateTime !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Experiment.lastUpdateTime: object expected"); + message.lastUpdateTime = $root.google.protobuf.Timestamp.fromObject(object.lastUpdateTime); + } + if (object.experimentLength != null) { + if (typeof object.experimentLength !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Experiment.experimentLength: object expected"); + message.experimentLength = $root.google.protobuf.Duration.fromObject(object.experimentLength); + } + if (object.variantsHistory) { + if (!Array.isArray(object.variantsHistory)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Experiment.variantsHistory: array expected"); + message.variantsHistory = []; + for (var i = 0; i < object.variantsHistory.length; ++i) { + if (typeof object.variantsHistory[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Experiment.variantsHistory: object expected"); + message.variantsHistory[i] = $root.google.cloud.dialogflow.cx.v3beta1.VariantsHistory.fromObject(object.variantsHistory[i]); + } + } return message; }; /** - * Creates a plain object from a DeleteEntityTypeRequest message. Also converts values to other types if specified. + * Creates a plain object from an Experiment message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment * @static - * @param {google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest} message DeleteEntityTypeRequest + * @param {google.cloud.dialogflow.cx.v3beta1.Experiment} message Experiment * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteEntityTypeRequest.toObject = function toObject(message, options) { + Experiment.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.variantsHistory = []; if (options.defaults) { object.name = ""; - object.force = false; + object.displayName = ""; + object.description = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.definition = null; + object.result = null; + object.createTime = null; + object.startTime = null; + object.endTime = null; + object.lastUpdateTime = null; + object.experimentLength = null; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.force != null && message.hasOwnProperty("force")) - object.force = message.force; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.Experiment.State[message.state] : message.state; + if (message.definition != null && message.hasOwnProperty("definition")) + object.definition = $root.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition.toObject(message.definition, options); + if (message.result != null && message.hasOwnProperty("result")) + object.result = $root.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.toObject(message.result, options); + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.lastUpdateTime != null && message.hasOwnProperty("lastUpdateTime")) + object.lastUpdateTime = $root.google.protobuf.Timestamp.toObject(message.lastUpdateTime, options); + if (message.experimentLength != null && message.hasOwnProperty("experimentLength")) + object.experimentLength = $root.google.protobuf.Duration.toObject(message.experimentLength, options); + if (message.variantsHistory && message.variantsHistory.length) { + object.variantsHistory = []; + for (var j = 0; j < message.variantsHistory.length; ++j) + object.variantsHistory[j] = $root.google.cloud.dialogflow.cx.v3beta1.VariantsHistory.toObject(message.variantsHistory[j], options); + } return object; }; /** - * Converts this DeleteEntityTypeRequest to JSON. + * Converts this Experiment to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment * @instance * @returns {Object.} JSON object */ - DeleteEntityTypeRequest.prototype.toJSON = function toJSON() { + Experiment.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeleteEntityTypeRequest; - })(); + Experiment.Definition = (function() { + + /** + * Properties of a Definition. + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment + * @interface IDefinition + * @property {string|null} [condition] Definition condition + * @property {google.cloud.dialogflow.cx.v3beta1.IVersionVariants|null} [versionVariants] Definition versionVariants + */ + + /** + * Constructs a new Definition. + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment + * @classdesc Represents a Definition. + * @implements IDefinition + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.Experiment.IDefinition=} [properties] Properties to set + */ + function Definition(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Definition condition. + * @member {string} condition + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Definition + * @instance + */ + Definition.prototype.condition = ""; + + /** + * Definition versionVariants. + * @member {google.cloud.dialogflow.cx.v3beta1.IVersionVariants|null|undefined} versionVariants + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Definition + * @instance + */ + Definition.prototype.versionVariants = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Definition variants. + * @member {"versionVariants"|undefined} variants + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Definition + * @instance + */ + Object.defineProperty(Definition.prototype, "variants", { + get: $util.oneOfGetter($oneOfFields = ["versionVariants"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Definition instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Definition + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Experiment.IDefinition=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.Experiment.Definition} Definition instance + */ + Definition.create = function create(properties) { + return new Definition(properties); + }; + + /** + * Encodes the specified Definition message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Experiment.Definition.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Definition + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Experiment.IDefinition} message Definition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Definition.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.condition); + if (message.versionVariants != null && Object.hasOwnProperty.call(message, "versionVariants")) + $root.google.cloud.dialogflow.cx.v3beta1.VersionVariants.encode(message.versionVariants, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Definition message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Experiment.Definition.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Definition + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Experiment.IDefinition} message Definition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Definition.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Definition message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Definition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.Experiment.Definition} Definition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Definition.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.condition = reader.string(); + break; + case 2: + message.versionVariants = $root.google.cloud.dialogflow.cx.v3beta1.VersionVariants.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Definition message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Definition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.Experiment.Definition} Definition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Definition.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Definition message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Definition + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Definition.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.condition != null && message.hasOwnProperty("condition")) + if (!$util.isString(message.condition)) + return "condition: string expected"; + if (message.versionVariants != null && message.hasOwnProperty("versionVariants")) { + properties.variants = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3beta1.VersionVariants.verify(message.versionVariants); + if (error) + return "versionVariants." + error; + } + } + return null; + }; + + /** + * Creates a Definition message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Definition + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.Experiment.Definition} Definition + */ + Definition.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition(); + if (object.condition != null) + message.condition = String(object.condition); + if (object.versionVariants != null) { + if (typeof object.versionVariants !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Experiment.Definition.versionVariants: object expected"); + message.versionVariants = $root.google.cloud.dialogflow.cx.v3beta1.VersionVariants.fromObject(object.versionVariants); + } + return message; + }; + + /** + * Creates a plain object from a Definition message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Definition + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Experiment.Definition} message Definition + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Definition.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.condition = ""; + if (message.condition != null && message.hasOwnProperty("condition")) + object.condition = message.condition; + if (message.versionVariants != null && message.hasOwnProperty("versionVariants")) { + object.versionVariants = $root.google.cloud.dialogflow.cx.v3beta1.VersionVariants.toObject(message.versionVariants, options); + if (options.oneofs) + object.variants = "versionVariants"; + } + return object; + }; + + /** + * Converts this Definition to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Definition + * @instance + * @returns {Object.} JSON object + */ + Definition.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Definition; + })(); + + Experiment.Result = (function() { + + /** + * Properties of a Result. + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment + * @interface IResult + * @property {Array.|null} [versionMetrics] Result versionMetrics + * @property {google.protobuf.ITimestamp|null} [lastUpdateTime] Result lastUpdateTime + */ + + /** + * Constructs a new Result. + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment + * @classdesc Represents a Result. + * @implements IResult + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.Experiment.IResult=} [properties] Properties to set + */ + function Result(properties) { + this.versionMetrics = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Result versionMetrics. + * @member {Array.} versionMetrics + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result + * @instance + */ + Result.prototype.versionMetrics = $util.emptyArray; + + /** + * Result lastUpdateTime. + * @member {google.protobuf.ITimestamp|null|undefined} lastUpdateTime + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result + * @instance + */ + Result.prototype.lastUpdateTime = null; + + /** + * Creates a new Result instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Experiment.IResult=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.Experiment.Result} Result instance + */ + Result.create = function create(properties) { + return new Result(properties); + }; + + /** + * Encodes the specified Result message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Experiment.Result.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Experiment.IResult} message Result message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Result.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.versionMetrics != null && message.versionMetrics.length) + for (var i = 0; i < message.versionMetrics.length; ++i) + $root.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics.encode(message.versionMetrics[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.lastUpdateTime != null && Object.hasOwnProperty.call(message, "lastUpdateTime")) + $root.google.protobuf.Timestamp.encode(message.lastUpdateTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Result message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Experiment.Result.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Experiment.IResult} message Result message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Result.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Result message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.Experiment.Result} Result + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Result.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Experiment.Result(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.versionMetrics && message.versionMetrics.length)) + message.versionMetrics = []; + message.versionMetrics.push($root.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics.decode(reader, reader.uint32())); + break; + case 2: + message.lastUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Result message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.Experiment.Result} Result + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Result.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Result message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Result.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.versionMetrics != null && message.hasOwnProperty("versionMetrics")) { + if (!Array.isArray(message.versionMetrics)) + return "versionMetrics: array expected"; + for (var i = 0; i < message.versionMetrics.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics.verify(message.versionMetrics[i]); + if (error) + return "versionMetrics." + error; + } + } + if (message.lastUpdateTime != null && message.hasOwnProperty("lastUpdateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.lastUpdateTime); + if (error) + return "lastUpdateTime." + error; + } + return null; + }; + + /** + * Creates a Result message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.Experiment.Result} Result + */ + Result.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Experiment.Result) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.Experiment.Result(); + if (object.versionMetrics) { + if (!Array.isArray(object.versionMetrics)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Experiment.Result.versionMetrics: array expected"); + message.versionMetrics = []; + for (var i = 0; i < object.versionMetrics.length; ++i) { + if (typeof object.versionMetrics[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Experiment.Result.versionMetrics: object expected"); + message.versionMetrics[i] = $root.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics.fromObject(object.versionMetrics[i]); + } + } + if (object.lastUpdateTime != null) { + if (typeof object.lastUpdateTime !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Experiment.Result.lastUpdateTime: object expected"); + message.lastUpdateTime = $root.google.protobuf.Timestamp.fromObject(object.lastUpdateTime); + } + return message; + }; + + /** + * Creates a plain object from a Result message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Experiment.Result} message Result + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Result.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.versionMetrics = []; + if (options.defaults) + object.lastUpdateTime = null; + if (message.versionMetrics && message.versionMetrics.length) { + object.versionMetrics = []; + for (var j = 0; j < message.versionMetrics.length; ++j) + object.versionMetrics[j] = $root.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics.toObject(message.versionMetrics[j], options); + } + if (message.lastUpdateTime != null && message.hasOwnProperty("lastUpdateTime")) + object.lastUpdateTime = $root.google.protobuf.Timestamp.toObject(message.lastUpdateTime, options); + return object; + }; + + /** + * Converts this Result to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result + * @instance + * @returns {Object.} JSON object + */ + Result.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + Result.ConfidenceInterval = (function() { + + /** + * Properties of a ConfidenceInterval. + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result + * @interface IConfidenceInterval + * @property {number|null} [confidenceLevel] ConfidenceInterval confidenceLevel + * @property {number|null} [ratio] ConfidenceInterval ratio + * @property {number|null} [lowerBound] ConfidenceInterval lowerBound + * @property {number|null} [upperBound] ConfidenceInterval upperBound + */ + + /** + * Constructs a new ConfidenceInterval. + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result + * @classdesc Represents a ConfidenceInterval. + * @implements IConfidenceInterval + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.Experiment.Result.IConfidenceInterval=} [properties] Properties to set + */ + function ConfidenceInterval(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ConfidenceInterval confidenceLevel. + * @member {number} confidenceLevel + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval + * @instance + */ + ConfidenceInterval.prototype.confidenceLevel = 0; + + /** + * ConfidenceInterval ratio. + * @member {number} ratio + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval + * @instance + */ + ConfidenceInterval.prototype.ratio = 0; + + /** + * ConfidenceInterval lowerBound. + * @member {number} lowerBound + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval + * @instance + */ + ConfidenceInterval.prototype.lowerBound = 0; + + /** + * ConfidenceInterval upperBound. + * @member {number} upperBound + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval + * @instance + */ + ConfidenceInterval.prototype.upperBound = 0; + + /** + * Creates a new ConfidenceInterval instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Experiment.Result.IConfidenceInterval=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval} ConfidenceInterval instance + */ + ConfidenceInterval.create = function create(properties) { + return new ConfidenceInterval(properties); + }; + + /** + * Encodes the specified ConfidenceInterval message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Experiment.Result.IConfidenceInterval} message ConfidenceInterval message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConfidenceInterval.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.confidenceLevel != null && Object.hasOwnProperty.call(message, "confidenceLevel")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.confidenceLevel); + if (message.ratio != null && Object.hasOwnProperty.call(message, "ratio")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.ratio); + if (message.lowerBound != null && Object.hasOwnProperty.call(message, "lowerBound")) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.lowerBound); + if (message.upperBound != null && Object.hasOwnProperty.call(message, "upperBound")) + writer.uint32(/* id 4, wireType 1 =*/33).double(message.upperBound); + return writer; + }; + + /** + * Encodes the specified ConfidenceInterval message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Experiment.Result.IConfidenceInterval} message ConfidenceInterval message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConfidenceInterval.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConfidenceInterval message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval} ConfidenceInterval + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConfidenceInterval.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.confidenceLevel = reader.double(); + break; + case 2: + message.ratio = reader.double(); + break; + case 3: + message.lowerBound = reader.double(); + break; + case 4: + message.upperBound = reader.double(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConfidenceInterval message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval} ConfidenceInterval + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConfidenceInterval.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConfidenceInterval message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConfidenceInterval.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.confidenceLevel != null && message.hasOwnProperty("confidenceLevel")) + if (typeof message.confidenceLevel !== "number") + return "confidenceLevel: number expected"; + if (message.ratio != null && message.hasOwnProperty("ratio")) + if (typeof message.ratio !== "number") + return "ratio: number expected"; + if (message.lowerBound != null && message.hasOwnProperty("lowerBound")) + if (typeof message.lowerBound !== "number") + return "lowerBound: number expected"; + if (message.upperBound != null && message.hasOwnProperty("upperBound")) + if (typeof message.upperBound !== "number") + return "upperBound: number expected"; + return null; + }; + + /** + * Creates a ConfidenceInterval message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval} ConfidenceInterval + */ + ConfidenceInterval.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval(); + if (object.confidenceLevel != null) + message.confidenceLevel = Number(object.confidenceLevel); + if (object.ratio != null) + message.ratio = Number(object.ratio); + if (object.lowerBound != null) + message.lowerBound = Number(object.lowerBound); + if (object.upperBound != null) + message.upperBound = Number(object.upperBound); + return message; + }; + + /** + * Creates a plain object from a ConfidenceInterval message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval} message ConfidenceInterval + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConfidenceInterval.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.confidenceLevel = 0; + object.ratio = 0; + object.lowerBound = 0; + object.upperBound = 0; + } + if (message.confidenceLevel != null && message.hasOwnProperty("confidenceLevel")) + object.confidenceLevel = options.json && !isFinite(message.confidenceLevel) ? String(message.confidenceLevel) : message.confidenceLevel; + if (message.ratio != null && message.hasOwnProperty("ratio")) + object.ratio = options.json && !isFinite(message.ratio) ? String(message.ratio) : message.ratio; + if (message.lowerBound != null && message.hasOwnProperty("lowerBound")) + object.lowerBound = options.json && !isFinite(message.lowerBound) ? String(message.lowerBound) : message.lowerBound; + if (message.upperBound != null && message.hasOwnProperty("upperBound")) + object.upperBound = options.json && !isFinite(message.upperBound) ? String(message.upperBound) : message.upperBound; + return object; + }; + + /** + * Converts this ConfidenceInterval to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval + * @instance + * @returns {Object.} JSON object + */ + ConfidenceInterval.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ConfidenceInterval; + })(); + + Result.Metric = (function() { + + /** + * Properties of a Metric. + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result + * @interface IMetric + * @property {google.cloud.dialogflow.cx.v3beta1.Experiment.Result.MetricType|null} [type] Metric type + * @property {number|null} [ratio] Metric ratio + * @property {google.cloud.dialogflow.cx.v3beta1.Experiment.Result.IConfidenceInterval|null} [confidenceInterval] Metric confidenceInterval + */ + + /** + * Constructs a new Metric. + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result + * @classdesc Represents a Metric. + * @implements IMetric + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.Experiment.Result.IMetric=} [properties] Properties to set + */ + function Metric(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Metric type. + * @member {google.cloud.dialogflow.cx.v3beta1.Experiment.Result.MetricType} type + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric + * @instance + */ + Metric.prototype.type = 0; + + /** + * Metric ratio. + * @member {number} ratio + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric + * @instance + */ + Metric.prototype.ratio = 0; + + /** + * Metric confidenceInterval. + * @member {google.cloud.dialogflow.cx.v3beta1.Experiment.Result.IConfidenceInterval|null|undefined} confidenceInterval + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric + * @instance + */ + Metric.prototype.confidenceInterval = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Metric value. + * @member {"ratio"|undefined} value + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric + * @instance + */ + Object.defineProperty(Metric.prototype, "value", { + get: $util.oneOfGetter($oneOfFields = ["ratio"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Metric instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Experiment.Result.IMetric=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric} Metric instance + */ + Metric.create = function create(properties) { + return new Metric(properties); + }; - v3beta1.Environments = (function() { + /** + * Encodes the specified Metric message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Experiment.Result.IMetric} message Metric message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Metric.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); + if (message.ratio != null && Object.hasOwnProperty.call(message, "ratio")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.ratio); + if (message.confidenceInterval != null && Object.hasOwnProperty.call(message, "confidenceInterval")) + $root.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval.encode(message.confidenceInterval, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; - /** - * Constructs a new Environments service. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents an Environments - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function Environments(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } + /** + * Encodes the specified Metric message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Experiment.Result.IMetric} message Metric message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Metric.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - (Environments.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Environments; + /** + * Decodes a Metric message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric} Metric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Metric.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type = reader.int32(); + break; + case 2: + message.ratio = reader.double(); + break; + case 3: + message.confidenceInterval = $root.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Creates new Environments service using the specified rpc implementation. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.Environments - * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {Environments} RPC service. Useful where requests and/or responses are streamed. - */ - Environments.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; + /** + * Decodes a Metric message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric} Metric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Metric.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Environments#listEnvironments}. - * @memberof google.cloud.dialogflow.cx.v3beta1.Environments - * @typedef ListEnvironmentsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse} [response] ListEnvironmentsResponse - */ + /** + * Verifies a Metric message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Metric.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.ratio != null && message.hasOwnProperty("ratio")) { + properties.value = 1; + if (typeof message.ratio !== "number") + return "ratio: number expected"; + } + if (message.confidenceInterval != null && message.hasOwnProperty("confidenceInterval")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval.verify(message.confidenceInterval); + if (error) + return "confidenceInterval." + error; + } + return null; + }; - /** - * Calls ListEnvironments. - * @function listEnvironments - * @memberof google.cloud.dialogflow.cx.v3beta1.Environments - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IListEnvironmentsRequest} request ListEnvironmentsRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.Environments.ListEnvironmentsCallback} callback Node-style callback called with the error, if any, and ListEnvironmentsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Environments.prototype.listEnvironments = function listEnvironments(request, callback) { - return this.rpcCall(listEnvironments, $root.google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest, $root.google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse, request, callback); - }, "name", { value: "ListEnvironments" }); + /** + * Creates a Metric message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric} Metric + */ + Metric.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric(); + switch (object.type) { + case "METRIC_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "CONTAINED_SESSION_NO_CALLBACK_RATE": + case 1: + message.type = 1; + break; + case "LIVE_AGENT_HANDOFF_RATE": + case 2: + message.type = 2; + break; + case "CALLBACK_SESSION_RATE": + case 3: + message.type = 3; + break; + case "ABANDONED_SESSION_RATE": + case 4: + message.type = 4; + break; + case "SESSION_END_RATE": + case 5: + message.type = 5; + break; + } + if (object.ratio != null) + message.ratio = Number(object.ratio); + if (object.confidenceInterval != null) { + if (typeof object.confidenceInterval !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric.confidenceInterval: object expected"); + message.confidenceInterval = $root.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval.fromObject(object.confidenceInterval); + } + return message; + }; - /** - * Calls ListEnvironments. - * @function listEnvironments - * @memberof google.cloud.dialogflow.cx.v3beta1.Environments - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IListEnvironmentsRequest} request ListEnvironmentsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Creates a plain object from a Metric message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric} message Metric + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Metric.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = options.enums === String ? "METRIC_UNSPECIFIED" : 0; + object.confidenceInterval = null; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.MetricType[message.type] : message.type; + if (message.ratio != null && message.hasOwnProperty("ratio")) { + object.ratio = options.json && !isFinite(message.ratio) ? String(message.ratio) : message.ratio; + if (options.oneofs) + object.value = "ratio"; + } + if (message.confidenceInterval != null && message.hasOwnProperty("confidenceInterval")) + object.confidenceInterval = $root.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval.toObject(message.confidenceInterval, options); + return object; + }; - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Environments#getEnvironment}. - * @memberof google.cloud.dialogflow.cx.v3beta1.Environments - * @typedef GetEnvironmentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3beta1.Environment} [response] Environment - */ + /** + * Converts this Metric to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric + * @instance + * @returns {Object.} JSON object + */ + Metric.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Calls GetEnvironment. - * @function getEnvironment - * @memberof google.cloud.dialogflow.cx.v3beta1.Environments - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IGetEnvironmentRequest} request GetEnvironmentRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.Environments.GetEnvironmentCallback} callback Node-style callback called with the error, if any, and Environment - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Environments.prototype.getEnvironment = function getEnvironment(request, callback) { - return this.rpcCall(getEnvironment, $root.google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest, $root.google.cloud.dialogflow.cx.v3beta1.Environment, request, callback); - }, "name", { value: "GetEnvironment" }); + return Metric; + })(); - /** - * Calls GetEnvironment. - * @function getEnvironment - * @memberof google.cloud.dialogflow.cx.v3beta1.Environments - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IGetEnvironmentRequest} request GetEnvironmentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + Result.VersionMetrics = (function() { - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Environments#createEnvironment}. - * @memberof google.cloud.dialogflow.cx.v3beta1.Environments - * @typedef CreateEnvironmentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ + /** + * Properties of a VersionMetrics. + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result + * @interface IVersionMetrics + * @property {string|null} [version] VersionMetrics version + * @property {Array.|null} [metrics] VersionMetrics metrics + * @property {number|null} [sessionCount] VersionMetrics sessionCount + */ - /** - * Calls CreateEnvironment. - * @function createEnvironment - * @memberof google.cloud.dialogflow.cx.v3beta1.Environments - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.ICreateEnvironmentRequest} request CreateEnvironmentRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.Environments.CreateEnvironmentCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Environments.prototype.createEnvironment = function createEnvironment(request, callback) { - return this.rpcCall(createEnvironment, $root.google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateEnvironment" }); + /** + * Constructs a new VersionMetrics. + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result + * @classdesc Represents a VersionMetrics. + * @implements IVersionMetrics + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.Experiment.Result.IVersionMetrics=} [properties] Properties to set + */ + function VersionMetrics(properties) { + this.metrics = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Calls CreateEnvironment. - * @function createEnvironment - * @memberof google.cloud.dialogflow.cx.v3beta1.Environments - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.ICreateEnvironmentRequest} request CreateEnvironmentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * VersionMetrics version. + * @member {string} version + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics + * @instance + */ + VersionMetrics.prototype.version = ""; - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Environments#updateEnvironment}. - * @memberof google.cloud.dialogflow.cx.v3beta1.Environments - * @typedef UpdateEnvironmentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ + /** + * VersionMetrics metrics. + * @member {Array.} metrics + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics + * @instance + */ + VersionMetrics.prototype.metrics = $util.emptyArray; - /** - * Calls UpdateEnvironment. - * @function updateEnvironment - * @memberof google.cloud.dialogflow.cx.v3beta1.Environments - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateEnvironmentRequest} request UpdateEnvironmentRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.Environments.UpdateEnvironmentCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Environments.prototype.updateEnvironment = function updateEnvironment(request, callback) { - return this.rpcCall(updateEnvironment, $root.google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateEnvironment" }); + /** + * VersionMetrics sessionCount. + * @member {number} sessionCount + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics + * @instance + */ + VersionMetrics.prototype.sessionCount = 0; - /** - * Calls UpdateEnvironment. - * @function updateEnvironment - * @memberof google.cloud.dialogflow.cx.v3beta1.Environments - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateEnvironmentRequest} request UpdateEnvironmentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Creates a new VersionMetrics instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Experiment.Result.IVersionMetrics=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics} VersionMetrics instance + */ + VersionMetrics.create = function create(properties) { + return new VersionMetrics(properties); + }; - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Environments#deleteEnvironment}. - * @memberof google.cloud.dialogflow.cx.v3beta1.Environments - * @typedef DeleteEnvironmentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ + /** + * Encodes the specified VersionMetrics message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Experiment.Result.IVersionMetrics} message VersionMetrics message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VersionMetrics.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); + if (message.metrics != null && message.metrics.length) + for (var i = 0; i < message.metrics.length; ++i) + $root.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric.encode(message.metrics[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.sessionCount != null && Object.hasOwnProperty.call(message, "sessionCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.sessionCount); + return writer; + }; - /** - * Calls DeleteEnvironment. - * @function deleteEnvironment - * @memberof google.cloud.dialogflow.cx.v3beta1.Environments - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteEnvironmentRequest} request DeleteEnvironmentRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.Environments.DeleteEnvironmentCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Environments.prototype.deleteEnvironment = function deleteEnvironment(request, callback) { - return this.rpcCall(deleteEnvironment, $root.google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteEnvironment" }); + /** + * Encodes the specified VersionMetrics message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Experiment.Result.IVersionMetrics} message VersionMetrics message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VersionMetrics.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Calls DeleteEnvironment. - * @function deleteEnvironment - * @memberof google.cloud.dialogflow.cx.v3beta1.Environments - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteEnvironmentRequest} request DeleteEnvironmentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Decodes a VersionMetrics message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics} VersionMetrics + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VersionMetrics.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.version = reader.string(); + break; + case 2: + if (!(message.metrics && message.metrics.length)) + message.metrics = []; + message.metrics.push($root.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric.decode(reader, reader.uint32())); + break; + case 3: + message.sessionCount = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Environments#lookupEnvironmentHistory}. - * @memberof google.cloud.dialogflow.cx.v3beta1.Environments - * @typedef LookupEnvironmentHistoryCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse} [response] LookupEnvironmentHistoryResponse - */ + /** + * Decodes a VersionMetrics message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics} VersionMetrics + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VersionMetrics.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Calls LookupEnvironmentHistory. - * @function lookupEnvironmentHistory - * @memberof google.cloud.dialogflow.cx.v3beta1.Environments - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.ILookupEnvironmentHistoryRequest} request LookupEnvironmentHistoryRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.Environments.LookupEnvironmentHistoryCallback} callback Node-style callback called with the error, if any, and LookupEnvironmentHistoryResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Environments.prototype.lookupEnvironmentHistory = function lookupEnvironmentHistory(request, callback) { - return this.rpcCall(lookupEnvironmentHistory, $root.google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest, $root.google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse, request, callback); - }, "name", { value: "LookupEnvironmentHistory" }); + /** + * Verifies a VersionMetrics message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VersionMetrics.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.metrics != null && message.hasOwnProperty("metrics")) { + if (!Array.isArray(message.metrics)) + return "metrics: array expected"; + for (var i = 0; i < message.metrics.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric.verify(message.metrics[i]); + if (error) + return "metrics." + error; + } + } + if (message.sessionCount != null && message.hasOwnProperty("sessionCount")) + if (!$util.isInteger(message.sessionCount)) + return "sessionCount: integer expected"; + return null; + }; - /** - * Calls LookupEnvironmentHistory. - * @function lookupEnvironmentHistory - * @memberof google.cloud.dialogflow.cx.v3beta1.Environments - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.ILookupEnvironmentHistoryRequest} request LookupEnvironmentHistoryRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Creates a VersionMetrics message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics} VersionMetrics + */ + VersionMetrics.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics(); + if (object.version != null) + message.version = String(object.version); + if (object.metrics) { + if (!Array.isArray(object.metrics)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics.metrics: array expected"); + message.metrics = []; + for (var i = 0; i < object.metrics.length; ++i) { + if (typeof object.metrics[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics.metrics: object expected"); + message.metrics[i] = $root.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric.fromObject(object.metrics[i]); + } + } + if (object.sessionCount != null) + message.sessionCount = object.sessionCount | 0; + return message; + }; - return Environments; - })(); + /** + * Creates a plain object from a VersionMetrics message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics} message VersionMetrics + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VersionMetrics.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.metrics = []; + if (options.defaults) { + object.version = ""; + object.sessionCount = 0; + } + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.metrics && message.metrics.length) { + object.metrics = []; + for (var j = 0; j < message.metrics.length; ++j) + object.metrics[j] = $root.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric.toObject(message.metrics[j], options); + } + if (message.sessionCount != null && message.hasOwnProperty("sessionCount")) + object.sessionCount = message.sessionCount; + return object; + }; - v3beta1.Environment = (function() { + /** + * Converts this VersionMetrics to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics + * @instance + * @returns {Object.} JSON object + */ + VersionMetrics.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Properties of an Environment. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IEnvironment - * @property {string|null} [name] Environment name - * @property {string|null} [displayName] Environment displayName - * @property {string|null} [description] Environment description - * @property {Array.|null} [versionConfigs] Environment versionConfigs - * @property {google.protobuf.ITimestamp|null} [updateTime] Environment updateTime - */ + return VersionMetrics; + })(); - /** - * Constructs a new Environment. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents an Environment. - * @implements IEnvironment - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IEnvironment=} [properties] Properties to set - */ - function Environment(properties) { - this.versionConfigs = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * MetricType enum. + * @name google.cloud.dialogflow.cx.v3beta1.Experiment.Result.MetricType + * @enum {number} + * @property {number} METRIC_UNSPECIFIED=0 METRIC_UNSPECIFIED value + * @property {number} CONTAINED_SESSION_NO_CALLBACK_RATE=1 CONTAINED_SESSION_NO_CALLBACK_RATE value + * @property {number} LIVE_AGENT_HANDOFF_RATE=2 LIVE_AGENT_HANDOFF_RATE value + * @property {number} CALLBACK_SESSION_RATE=3 CALLBACK_SESSION_RATE value + * @property {number} ABANDONED_SESSION_RATE=4 ABANDONED_SESSION_RATE value + * @property {number} SESSION_END_RATE=5 SESSION_END_RATE value + */ + Result.MetricType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "METRIC_UNSPECIFIED"] = 0; + values[valuesById[1] = "CONTAINED_SESSION_NO_CALLBACK_RATE"] = 1; + values[valuesById[2] = "LIVE_AGENT_HANDOFF_RATE"] = 2; + values[valuesById[3] = "CALLBACK_SESSION_RATE"] = 3; + values[valuesById[4] = "ABANDONED_SESSION_RATE"] = 4; + values[valuesById[5] = "SESSION_END_RATE"] = 5; + return values; + })(); - /** - * Environment name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.Environment - * @instance - */ - Environment.prototype.name = ""; + return Result; + })(); /** - * Environment displayName. - * @member {string} displayName - * @memberof google.cloud.dialogflow.cx.v3beta1.Environment - * @instance + * State enum. + * @name google.cloud.dialogflow.cx.v3beta1.Experiment.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} DRAFT=1 DRAFT value + * @property {number} RUNNING=2 RUNNING value + * @property {number} DONE=3 DONE value */ - Environment.prototype.displayName = ""; + Experiment.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DRAFT"] = 1; + values[valuesById[2] = "RUNNING"] = 2; + values[valuesById[3] = "DONE"] = 3; + return values; + })(); + + return Experiment; + })(); + + v3beta1.VersionVariants = (function() { /** - * Environment description. - * @member {string} description - * @memberof google.cloud.dialogflow.cx.v3beta1.Environment - * @instance + * Properties of a VersionVariants. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @interface IVersionVariants + * @property {Array.|null} [variants] VersionVariants variants */ - Environment.prototype.description = ""; /** - * Environment versionConfigs. - * @member {Array.} versionConfigs - * @memberof google.cloud.dialogflow.cx.v3beta1.Environment - * @instance + * Constructs a new VersionVariants. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents a VersionVariants. + * @implements IVersionVariants + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.IVersionVariants=} [properties] Properties to set */ - Environment.prototype.versionConfigs = $util.emptyArray; + function VersionVariants(properties) { + this.variants = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Environment updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.dialogflow.cx.v3beta1.Environment + * VersionVariants variants. + * @member {Array.} variants + * @memberof google.cloud.dialogflow.cx.v3beta1.VersionVariants * @instance */ - Environment.prototype.updateTime = null; + VersionVariants.prototype.variants = $util.emptyArray; /** - * Creates a new Environment instance using the specified properties. + * Creates a new VersionVariants instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.Environment + * @memberof google.cloud.dialogflow.cx.v3beta1.VersionVariants * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IEnvironment=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.Environment} Environment instance + * @param {google.cloud.dialogflow.cx.v3beta1.IVersionVariants=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.VersionVariants} VersionVariants instance */ - Environment.create = function create(properties) { - return new Environment(properties); + VersionVariants.create = function create(properties) { + return new VersionVariants(properties); }; /** - * Encodes the specified Environment message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Environment.verify|verify} messages. + * Encodes the specified VersionVariants message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.VersionVariants.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.Environment + * @memberof google.cloud.dialogflow.cx.v3beta1.VersionVariants * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IEnvironment} message Environment message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IVersionVariants} message VersionVariants message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Environment.encode = function encode(message, writer) { + VersionVariants.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.versionConfigs != null && message.versionConfigs.length) - for (var i = 0; i < message.versionConfigs.length; ++i) - $root.google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig.encode(message.versionConfigs[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.variants != null && message.variants.length) + for (var i = 0; i < message.variants.length; ++i) + $root.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant.encode(message.variants[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified Environment message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Environment.verify|verify} messages. + * Encodes the specified VersionVariants message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.VersionVariants.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Environment + * @memberof google.cloud.dialogflow.cx.v3beta1.VersionVariants * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IEnvironment} message Environment message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IVersionVariants} message VersionVariants message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Environment.encodeDelimited = function encodeDelimited(message, writer) { + VersionVariants.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Environment message from the specified reader or buffer. + * Decodes a VersionVariants message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.Environment + * @memberof google.cloud.dialogflow.cx.v3beta1.VersionVariants * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.Environment} Environment + * @returns {google.cloud.dialogflow.cx.v3beta1.VersionVariants} VersionVariants * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Environment.decode = function decode(reader, length) { + VersionVariants.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Environment(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.VersionVariants(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); - break; - case 2: - message.displayName = reader.string(); - break; - case 3: - message.description = reader.string(); - break; - case 6: - if (!(message.versionConfigs && message.versionConfigs.length)) - message.versionConfigs = []; - message.versionConfigs.push($root.google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig.decode(reader, reader.uint32())); - break; - case 5: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + if (!(message.variants && message.variants.length)) + message.variants = []; + message.variants.push($root.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -57792,160 +66510,123 @@ }; /** - * Decodes an Environment message from the specified reader or buffer, length delimited. + * Decodes a VersionVariants message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Environment + * @memberof google.cloud.dialogflow.cx.v3beta1.VersionVariants * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.Environment} Environment + * @returns {google.cloud.dialogflow.cx.v3beta1.VersionVariants} VersionVariants * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Environment.decodeDelimited = function decodeDelimited(reader) { + VersionVariants.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Environment message. + * Verifies a VersionVariants message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.Environment + * @memberof google.cloud.dialogflow.cx.v3beta1.VersionVariants * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Environment.verify = function verify(message) { + VersionVariants.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.versionConfigs != null && message.hasOwnProperty("versionConfigs")) { - if (!Array.isArray(message.versionConfigs)) - return "versionConfigs: array expected"; - for (var i = 0; i < message.versionConfigs.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig.verify(message.versionConfigs[i]); + if (message.variants != null && message.hasOwnProperty("variants")) { + if (!Array.isArray(message.variants)) + return "variants: array expected"; + for (var i = 0; i < message.variants.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant.verify(message.variants[i]); if (error) - return "versionConfigs." + error; + return "variants." + error; } } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } return null; }; /** - * Creates an Environment message from a plain object. Also converts values to their respective internal types. + * Creates a VersionVariants message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Environment + * @memberof google.cloud.dialogflow.cx.v3beta1.VersionVariants * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.Environment} Environment + * @returns {google.cloud.dialogflow.cx.v3beta1.VersionVariants} VersionVariants */ - Environment.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Environment) + VersionVariants.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.VersionVariants) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.Environment(); - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.description != null) - message.description = String(object.description); - if (object.versionConfigs) { - if (!Array.isArray(object.versionConfigs)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Environment.versionConfigs: array expected"); - message.versionConfigs = []; - for (var i = 0; i < object.versionConfigs.length; ++i) { - if (typeof object.versionConfigs[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Environment.versionConfigs: object expected"); - message.versionConfigs[i] = $root.google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig.fromObject(object.versionConfigs[i]); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.VersionVariants(); + if (object.variants) { + if (!Array.isArray(object.variants)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.VersionVariants.variants: array expected"); + message.variants = []; + for (var i = 0; i < object.variants.length; ++i) { + if (typeof object.variants[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.VersionVariants.variants: object expected"); + message.variants[i] = $root.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant.fromObject(object.variants[i]); } } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Environment.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } return message; }; /** - * Creates a plain object from an Environment message. Also converts values to other types if specified. + * Creates a plain object from a VersionVariants message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Environment + * @memberof google.cloud.dialogflow.cx.v3beta1.VersionVariants * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Environment} message Environment + * @param {google.cloud.dialogflow.cx.v3beta1.VersionVariants} message VersionVariants * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Environment.toObject = function toObject(message, options) { + VersionVariants.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.versionConfigs = []; - if (options.defaults) { - object.name = ""; - object.displayName = ""; - object.description = ""; - object.updateTime = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (message.versionConfigs && message.versionConfigs.length) { - object.versionConfigs = []; - for (var j = 0; j < message.versionConfigs.length; ++j) - object.versionConfigs[j] = $root.google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig.toObject(message.versionConfigs[j], options); + object.variants = []; + if (message.variants && message.variants.length) { + object.variants = []; + for (var j = 0; j < message.variants.length; ++j) + object.variants[j] = $root.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant.toObject(message.variants[j], options); } return object; }; /** - * Converts this Environment to JSON. + * Converts this VersionVariants to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.Environment + * @memberof google.cloud.dialogflow.cx.v3beta1.VersionVariants * @instance * @returns {Object.} JSON object */ - Environment.prototype.toJSON = function toJSON() { + VersionVariants.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - Environment.VersionConfig = (function() { + VersionVariants.Variant = (function() { /** - * Properties of a VersionConfig. - * @memberof google.cloud.dialogflow.cx.v3beta1.Environment - * @interface IVersionConfig - * @property {string|null} [version] VersionConfig version + * Properties of a Variant. + * @memberof google.cloud.dialogflow.cx.v3beta1.VersionVariants + * @interface IVariant + * @property {string|null} [version] Variant version + * @property {number|null} [trafficAllocation] Variant trafficAllocation + * @property {boolean|null} [isControlGroup] Variant isControlGroup */ /** - * Constructs a new VersionConfig. - * @memberof google.cloud.dialogflow.cx.v3beta1.Environment - * @classdesc Represents a VersionConfig. - * @implements IVersionConfig + * Constructs a new Variant. + * @memberof google.cloud.dialogflow.cx.v3beta1.VersionVariants + * @classdesc Represents a Variant. + * @implements IVariant * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.Environment.IVersionConfig=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.VersionVariants.IVariant=} [properties] Properties to set */ - function VersionConfig(properties) { + function Variant(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -57953,76 +66634,102 @@ } /** - * VersionConfig version. + * Variant version. * @member {string} version - * @memberof google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant * @instance */ - VersionConfig.prototype.version = ""; + Variant.prototype.version = ""; /** - * Creates a new VersionConfig instance using the specified properties. + * Variant trafficAllocation. + * @member {number} trafficAllocation + * @memberof google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant + * @instance + */ + Variant.prototype.trafficAllocation = 0; + + /** + * Variant isControlGroup. + * @member {boolean} isControlGroup + * @memberof google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant + * @instance + */ + Variant.prototype.isControlGroup = false; + + /** + * Creates a new Variant instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Environment.IVersionConfig=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig} VersionConfig instance + * @param {google.cloud.dialogflow.cx.v3beta1.VersionVariants.IVariant=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant} Variant instance */ - VersionConfig.create = function create(properties) { - return new VersionConfig(properties); + Variant.create = function create(properties) { + return new Variant(properties); }; /** - * Encodes the specified VersionConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig.verify|verify} messages. + * Encodes the specified Variant message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Environment.IVersionConfig} message VersionConfig message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.VersionVariants.IVariant} message Variant message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VersionConfig.encode = function encode(message, writer) { + Variant.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.version != null && Object.hasOwnProperty.call(message, "version")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); + if (message.trafficAllocation != null && Object.hasOwnProperty.call(message, "trafficAllocation")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.trafficAllocation); + if (message.isControlGroup != null && Object.hasOwnProperty.call(message, "isControlGroup")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.isControlGroup); return writer; }; /** - * Encodes the specified VersionConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig.verify|verify} messages. + * Encodes the specified Variant message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Environment.IVersionConfig} message VersionConfig message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.VersionVariants.IVariant} message Variant message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VersionConfig.encodeDelimited = function encodeDelimited(message, writer) { + Variant.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a VersionConfig message from the specified reader or buffer. + * Decodes a Variant message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig} VersionConfig + * @returns {google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant} Variant * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VersionConfig.decode = function decode(reader, length) { + Variant.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: message.version = reader.string(); break; + case 2: + message.trafficAllocation = reader.float(); + break; + case 3: + message.isControlGroup = reader.bool(); + break; default: reader.skipType(tag & 7); break; @@ -58032,112 +66739,128 @@ }; /** - * Decodes a VersionConfig message from the specified reader or buffer, length delimited. + * Decodes a Variant message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig} VersionConfig + * @returns {google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant} Variant * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VersionConfig.decodeDelimited = function decodeDelimited(reader) { + Variant.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a VersionConfig message. + * Verifies a Variant message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - VersionConfig.verify = function verify(message) { + Variant.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.version != null && message.hasOwnProperty("version")) if (!$util.isString(message.version)) return "version: string expected"; + if (message.trafficAllocation != null && message.hasOwnProperty("trafficAllocation")) + if (typeof message.trafficAllocation !== "number") + return "trafficAllocation: number expected"; + if (message.isControlGroup != null && message.hasOwnProperty("isControlGroup")) + if (typeof message.isControlGroup !== "boolean") + return "isControlGroup: boolean expected"; return null; }; /** - * Creates a VersionConfig message from a plain object. Also converts values to their respective internal types. + * Creates a Variant message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig} VersionConfig + * @returns {google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant} Variant */ - VersionConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig) + Variant.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig(); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant(); if (object.version != null) message.version = String(object.version); + if (object.trafficAllocation != null) + message.trafficAllocation = Number(object.trafficAllocation); + if (object.isControlGroup != null) + message.isControlGroup = Boolean(object.isControlGroup); return message; }; /** - * Creates a plain object from a VersionConfig message. Also converts values to other types if specified. + * Creates a plain object from a Variant message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig} message VersionConfig + * @param {google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant} message Variant * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - VersionConfig.toObject = function toObject(message, options) { + Variant.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.version = ""; + object.trafficAllocation = 0; + object.isControlGroup = false; + } if (message.version != null && message.hasOwnProperty("version")) object.version = message.version; + if (message.trafficAllocation != null && message.hasOwnProperty("trafficAllocation")) + object.trafficAllocation = options.json && !isFinite(message.trafficAllocation) ? String(message.trafficAllocation) : message.trafficAllocation; + if (message.isControlGroup != null && message.hasOwnProperty("isControlGroup")) + object.isControlGroup = message.isControlGroup; return object; }; /** - * Converts this VersionConfig to JSON. + * Converts this Variant to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant * @instance * @returns {Object.} JSON object */ - VersionConfig.prototype.toJSON = function toJSON() { + Variant.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return VersionConfig; + return Variant; })(); - return Environment; + return VersionVariants; })(); - v3beta1.ListEnvironmentsRequest = (function() { + v3beta1.VariantsHistory = (function() { /** - * Properties of a ListEnvironmentsRequest. + * Properties of a VariantsHistory. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IListEnvironmentsRequest - * @property {string|null} [parent] ListEnvironmentsRequest parent - * @property {number|null} [pageSize] ListEnvironmentsRequest pageSize - * @property {string|null} [pageToken] ListEnvironmentsRequest pageToken + * @interface IVariantsHistory + * @property {google.cloud.dialogflow.cx.v3beta1.IVersionVariants|null} [versionVariants] VariantsHistory versionVariants + * @property {google.protobuf.ITimestamp|null} [updateTime] VariantsHistory updateTime */ /** - * Constructs a new ListEnvironmentsRequest. + * Constructs a new VariantsHistory. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a ListEnvironmentsRequest. - * @implements IListEnvironmentsRequest + * @classdesc Represents a VariantsHistory. + * @implements IVariantsHistory * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IListEnvironmentsRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IVariantsHistory=} [properties] Properties to set */ - function ListEnvironmentsRequest(properties) { + function VariantsHistory(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -58145,51 +66868,291 @@ } /** - * ListEnvironmentsRequest parent. + * VariantsHistory versionVariants. + * @member {google.cloud.dialogflow.cx.v3beta1.IVersionVariants|null|undefined} versionVariants + * @memberof google.cloud.dialogflow.cx.v3beta1.VariantsHistory + * @instance + */ + VariantsHistory.prototype.versionVariants = null; + + /** + * VariantsHistory updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dialogflow.cx.v3beta1.VariantsHistory + * @instance + */ + VariantsHistory.prototype.updateTime = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * VariantsHistory variants. + * @member {"versionVariants"|undefined} variants + * @memberof google.cloud.dialogflow.cx.v3beta1.VariantsHistory + * @instance + */ + Object.defineProperty(VariantsHistory.prototype, "variants", { + get: $util.oneOfGetter($oneOfFields = ["versionVariants"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new VariantsHistory instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.VariantsHistory + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IVariantsHistory=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.VariantsHistory} VariantsHistory instance + */ + VariantsHistory.create = function create(properties) { + return new VariantsHistory(properties); + }; + + /** + * Encodes the specified VariantsHistory message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.VariantsHistory.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.VariantsHistory + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IVariantsHistory} message VariantsHistory message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VariantsHistory.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.versionVariants != null && Object.hasOwnProperty.call(message, "versionVariants")) + $root.google.cloud.dialogflow.cx.v3beta1.VersionVariants.encode(message.versionVariants, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified VariantsHistory message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.VariantsHistory.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.VariantsHistory + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IVariantsHistory} message VariantsHistory message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VariantsHistory.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VariantsHistory message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.VariantsHistory + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.VariantsHistory} VariantsHistory + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VariantsHistory.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.VariantsHistory(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.versionVariants = $root.google.cloud.dialogflow.cx.v3beta1.VersionVariants.decode(reader, reader.uint32()); + break; + case 2: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VariantsHistory message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.VariantsHistory + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.VariantsHistory} VariantsHistory + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VariantsHistory.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VariantsHistory message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.VariantsHistory + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VariantsHistory.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.versionVariants != null && message.hasOwnProperty("versionVariants")) { + properties.variants = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3beta1.VersionVariants.verify(message.versionVariants); + if (error) + return "versionVariants." + error; + } + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + return null; + }; + + /** + * Creates a VariantsHistory message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.VariantsHistory + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.VariantsHistory} VariantsHistory + */ + VariantsHistory.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.VariantsHistory) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.VariantsHistory(); + if (object.versionVariants != null) { + if (typeof object.versionVariants !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.VariantsHistory.versionVariants: object expected"); + message.versionVariants = $root.google.cloud.dialogflow.cx.v3beta1.VersionVariants.fromObject(object.versionVariants); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.VariantsHistory.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + return message; + }; + + /** + * Creates a plain object from a VariantsHistory message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.VariantsHistory + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.VariantsHistory} message VariantsHistory + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VariantsHistory.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.updateTime = null; + if (message.versionVariants != null && message.hasOwnProperty("versionVariants")) { + object.versionVariants = $root.google.cloud.dialogflow.cx.v3beta1.VersionVariants.toObject(message.versionVariants, options); + if (options.oneofs) + object.variants = "versionVariants"; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + return object; + }; + + /** + * Converts this VariantsHistory to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.VariantsHistory + * @instance + * @returns {Object.} JSON object + */ + VariantsHistory.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return VariantsHistory; + })(); + + v3beta1.ListExperimentsRequest = (function() { + + /** + * Properties of a ListExperimentsRequest. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @interface IListExperimentsRequest + * @property {string|null} [parent] ListExperimentsRequest parent + * @property {number|null} [pageSize] ListExperimentsRequest pageSize + * @property {string|null} [pageToken] ListExperimentsRequest pageToken + */ + + /** + * Constructs a new ListExperimentsRequest. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents a ListExperimentsRequest. + * @implements IListExperimentsRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.IListExperimentsRequest=} [properties] Properties to set + */ + function ListExperimentsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListExperimentsRequest parent. * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest * @instance */ - ListEnvironmentsRequest.prototype.parent = ""; + ListExperimentsRequest.prototype.parent = ""; /** - * ListEnvironmentsRequest pageSize. + * ListExperimentsRequest pageSize. * @member {number} pageSize - * @memberof google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest * @instance */ - ListEnvironmentsRequest.prototype.pageSize = 0; + ListExperimentsRequest.prototype.pageSize = 0; /** - * ListEnvironmentsRequest pageToken. + * ListExperimentsRequest pageToken. * @member {string} pageToken - * @memberof google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest * @instance */ - ListEnvironmentsRequest.prototype.pageToken = ""; + ListExperimentsRequest.prototype.pageToken = ""; /** - * Creates a new ListEnvironmentsRequest instance using the specified properties. + * Creates a new ListExperimentsRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListEnvironmentsRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest} ListEnvironmentsRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.IListExperimentsRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest} ListExperimentsRequest instance */ - ListEnvironmentsRequest.create = function create(properties) { - return new ListEnvironmentsRequest(properties); + ListExperimentsRequest.create = function create(properties) { + return new ListExperimentsRequest(properties); }; /** - * Encodes the specified ListEnvironmentsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest.verify|verify} messages. + * Encodes the specified ListExperimentsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListEnvironmentsRequest} message ListEnvironmentsRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IListExperimentsRequest} message ListExperimentsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListEnvironmentsRequest.encode = function encode(message, writer) { + ListExperimentsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) @@ -58202,33 +67165,33 @@ }; /** - * Encodes the specified ListEnvironmentsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest.verify|verify} messages. + * Encodes the specified ListExperimentsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListEnvironmentsRequest} message ListEnvironmentsRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IListExperimentsRequest} message ListExperimentsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListEnvironmentsRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListExperimentsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListEnvironmentsRequest message from the specified reader or buffer. + * Decodes a ListExperimentsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest} ListEnvironmentsRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest} ListExperimentsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListEnvironmentsRequest.decode = function decode(reader, length) { + ListExperimentsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -58250,30 +67213,30 @@ }; /** - * Decodes a ListEnvironmentsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListExperimentsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest} ListEnvironmentsRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest} ListExperimentsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListEnvironmentsRequest.decodeDelimited = function decodeDelimited(reader) { + ListExperimentsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListEnvironmentsRequest message. + * Verifies a ListExperimentsRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListEnvironmentsRequest.verify = function verify(message) { + ListExperimentsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.parent != null && message.hasOwnProperty("parent")) @@ -58289,17 +67252,17 @@ }; /** - * Creates a ListEnvironmentsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListExperimentsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest} ListEnvironmentsRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest} ListExperimentsRequest */ - ListEnvironmentsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest) + ListExperimentsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest(); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest(); if (object.parent != null) message.parent = String(object.parent); if (object.pageSize != null) @@ -58310,15 +67273,15 @@ }; /** - * Creates a plain object from a ListEnvironmentsRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListExperimentsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest} message ListEnvironmentsRequest + * @param {google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest} message ListExperimentsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListEnvironmentsRequest.toObject = function toObject(message, options) { + ListExperimentsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -58337,39 +67300,39 @@ }; /** - * Converts this ListEnvironmentsRequest to JSON. + * Converts this ListExperimentsRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest * @instance * @returns {Object.} JSON object */ - ListEnvironmentsRequest.prototype.toJSON = function toJSON() { + ListExperimentsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListEnvironmentsRequest; + return ListExperimentsRequest; })(); - v3beta1.ListEnvironmentsResponse = (function() { + v3beta1.ListExperimentsResponse = (function() { /** - * Properties of a ListEnvironmentsResponse. + * Properties of a ListExperimentsResponse. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IListEnvironmentsResponse - * @property {Array.|null} [environments] ListEnvironmentsResponse environments - * @property {string|null} [nextPageToken] ListEnvironmentsResponse nextPageToken + * @interface IListExperimentsResponse + * @property {Array.|null} [experiments] ListExperimentsResponse experiments + * @property {string|null} [nextPageToken] ListExperimentsResponse nextPageToken */ /** - * Constructs a new ListEnvironmentsResponse. + * Constructs a new ListExperimentsResponse. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a ListEnvironmentsResponse. - * @implements IListEnvironmentsResponse + * @classdesc Represents a ListExperimentsResponse. + * @implements IListExperimentsResponse * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IListEnvironmentsResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IListExperimentsResponse=} [properties] Properties to set */ - function ListEnvironmentsResponse(properties) { - this.environments = []; + function ListExperimentsResponse(properties) { + this.experiments = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -58377,88 +67340,88 @@ } /** - * ListEnvironmentsResponse environments. - * @member {Array.} environments - * @memberof google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse + * ListExperimentsResponse experiments. + * @member {Array.} experiments + * @memberof google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse * @instance */ - ListEnvironmentsResponse.prototype.environments = $util.emptyArray; + ListExperimentsResponse.prototype.experiments = $util.emptyArray; /** - * ListEnvironmentsResponse nextPageToken. + * ListExperimentsResponse nextPageToken. * @member {string} nextPageToken - * @memberof google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse * @instance */ - ListEnvironmentsResponse.prototype.nextPageToken = ""; + ListExperimentsResponse.prototype.nextPageToken = ""; /** - * Creates a new ListEnvironmentsResponse instance using the specified properties. + * Creates a new ListExperimentsResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListEnvironmentsResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse} ListEnvironmentsResponse instance + * @param {google.cloud.dialogflow.cx.v3beta1.IListExperimentsResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse} ListExperimentsResponse instance */ - ListEnvironmentsResponse.create = function create(properties) { - return new ListEnvironmentsResponse(properties); + ListExperimentsResponse.create = function create(properties) { + return new ListExperimentsResponse(properties); }; /** - * Encodes the specified ListEnvironmentsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse.verify|verify} messages. + * Encodes the specified ListExperimentsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListEnvironmentsResponse} message ListEnvironmentsResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IListExperimentsResponse} message ListExperimentsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListEnvironmentsResponse.encode = function encode(message, writer) { + ListExperimentsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.environments != null && message.environments.length) - for (var i = 0; i < message.environments.length; ++i) - $root.google.cloud.dialogflow.cx.v3beta1.Environment.encode(message.environments[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.experiments != null && message.experiments.length) + for (var i = 0; i < message.experiments.length; ++i) + $root.google.cloud.dialogflow.cx.v3beta1.Experiment.encode(message.experiments[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified ListEnvironmentsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse.verify|verify} messages. + * Encodes the specified ListExperimentsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListEnvironmentsResponse} message ListEnvironmentsResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IListExperimentsResponse} message ListExperimentsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListEnvironmentsResponse.encodeDelimited = function encodeDelimited(message, writer) { + ListExperimentsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListEnvironmentsResponse message from the specified reader or buffer. + * Decodes a ListExperimentsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse} ListEnvironmentsResponse + * @returns {google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse} ListExperimentsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListEnvironmentsResponse.decode = function decode(reader, length) { + ListExperimentsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.environments && message.environments.length)) - message.environments = []; - message.environments.push($root.google.cloud.dialogflow.cx.v3beta1.Environment.decode(reader, reader.uint32())); + if (!(message.experiments && message.experiments.length)) + message.experiments = []; + message.experiments.push($root.google.cloud.dialogflow.cx.v3beta1.Experiment.decode(reader, reader.uint32())); break; case 2: message.nextPageToken = reader.string(); @@ -58472,39 +67435,39 @@ }; /** - * Decodes a ListEnvironmentsResponse message from the specified reader or buffer, length delimited. + * Decodes a ListExperimentsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse} ListEnvironmentsResponse + * @returns {google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse} ListExperimentsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListEnvironmentsResponse.decodeDelimited = function decodeDelimited(reader) { + ListExperimentsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListEnvironmentsResponse message. + * Verifies a ListExperimentsResponse message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListEnvironmentsResponse.verify = function verify(message) { + ListExperimentsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.environments != null && message.hasOwnProperty("environments")) { - if (!Array.isArray(message.environments)) - return "environments: array expected"; - for (var i = 0; i < message.environments.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.Environment.verify(message.environments[i]); + if (message.experiments != null && message.hasOwnProperty("experiments")) { + if (!Array.isArray(message.experiments)) + return "experiments: array expected"; + for (var i = 0; i < message.experiments.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.Experiment.verify(message.experiments[i]); if (error) - return "environments." + error; + return "experiments." + error; } } if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) @@ -58514,25 +67477,25 @@ }; /** - * Creates a ListEnvironmentsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListExperimentsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse} ListEnvironmentsResponse + * @returns {google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse} ListExperimentsResponse */ - ListEnvironmentsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse) + ListExperimentsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse(); - if (object.environments) { - if (!Array.isArray(object.environments)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse.environments: array expected"); - message.environments = []; - for (var i = 0; i < object.environments.length; ++i) { - if (typeof object.environments[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse.environments: object expected"); - message.environments[i] = $root.google.cloud.dialogflow.cx.v3beta1.Environment.fromObject(object.environments[i]); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse(); + if (object.experiments) { + if (!Array.isArray(object.experiments)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse.experiments: array expected"); + message.experiments = []; + for (var i = 0; i < object.experiments.length; ++i) { + if (typeof object.experiments[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse.experiments: object expected"); + message.experiments[i] = $root.google.cloud.dialogflow.cx.v3beta1.Experiment.fromObject(object.experiments[i]); } } if (object.nextPageToken != null) @@ -58541,26 +67504,26 @@ }; /** - * Creates a plain object from a ListEnvironmentsResponse message. Also converts values to other types if specified. + * Creates a plain object from a ListExperimentsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse} message ListEnvironmentsResponse + * @param {google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse} message ListExperimentsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListEnvironmentsResponse.toObject = function toObject(message, options) { + ListExperimentsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.environments = []; + object.experiments = []; if (options.defaults) object.nextPageToken = ""; - if (message.environments && message.environments.length) { - object.environments = []; - for (var j = 0; j < message.environments.length; ++j) - object.environments[j] = $root.google.cloud.dialogflow.cx.v3beta1.Environment.toObject(message.environments[j], options); + if (message.experiments && message.experiments.length) { + object.experiments = []; + for (var j = 0; j < message.experiments.length; ++j) + object.experiments[j] = $root.google.cloud.dialogflow.cx.v3beta1.Experiment.toObject(message.experiments[j], options); } if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) object.nextPageToken = message.nextPageToken; @@ -58568,37 +67531,37 @@ }; /** - * Converts this ListEnvironmentsResponse to JSON. + * Converts this ListExperimentsResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse * @instance * @returns {Object.} JSON object */ - ListEnvironmentsResponse.prototype.toJSON = function toJSON() { + ListExperimentsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListEnvironmentsResponse; + return ListExperimentsResponse; })(); - v3beta1.GetEnvironmentRequest = (function() { + v3beta1.GetExperimentRequest = (function() { /** - * Properties of a GetEnvironmentRequest. + * Properties of a GetExperimentRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IGetEnvironmentRequest - * @property {string|null} [name] GetEnvironmentRequest name + * @interface IGetExperimentRequest + * @property {string|null} [name] GetExperimentRequest name */ /** - * Constructs a new GetEnvironmentRequest. + * Constructs a new GetExperimentRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a GetEnvironmentRequest. - * @implements IGetEnvironmentRequest + * @classdesc Represents a GetExperimentRequest. + * @implements IGetExperimentRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IGetEnvironmentRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IGetExperimentRequest=} [properties] Properties to set */ - function GetEnvironmentRequest(properties) { + function GetExperimentRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -58606,35 +67569,35 @@ } /** - * GetEnvironmentRequest name. + * GetExperimentRequest name. * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest * @instance */ - GetEnvironmentRequest.prototype.name = ""; + GetExperimentRequest.prototype.name = ""; /** - * Creates a new GetEnvironmentRequest instance using the specified properties. + * Creates a new GetExperimentRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IGetEnvironmentRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest} GetEnvironmentRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.IGetExperimentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest} GetExperimentRequest instance */ - GetEnvironmentRequest.create = function create(properties) { - return new GetEnvironmentRequest(properties); + GetExperimentRequest.create = function create(properties) { + return new GetExperimentRequest(properties); }; /** - * Encodes the specified GetEnvironmentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest.verify|verify} messages. + * Encodes the specified GetExperimentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IGetEnvironmentRequest} message GetEnvironmentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IGetExperimentRequest} message GetExperimentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetEnvironmentRequest.encode = function encode(message, writer) { + GetExperimentRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) @@ -58643,33 +67606,33 @@ }; /** - * Encodes the specified GetEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest.verify|verify} messages. + * Encodes the specified GetExperimentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IGetEnvironmentRequest} message GetEnvironmentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IGetExperimentRequest} message GetExperimentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetExperimentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetEnvironmentRequest message from the specified reader or buffer. + * Decodes a GetExperimentRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest} GetEnvironmentRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest} GetExperimentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetEnvironmentRequest.decode = function decode(reader, length) { + GetExperimentRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -58685,30 +67648,30 @@ }; /** - * Decodes a GetEnvironmentRequest message from the specified reader or buffer, length delimited. + * Decodes a GetExperimentRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest} GetEnvironmentRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest} GetExperimentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetEnvironmentRequest.decodeDelimited = function decodeDelimited(reader) { + GetExperimentRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetEnvironmentRequest message. + * Verifies a GetExperimentRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetEnvironmentRequest.verify = function verify(message) { + GetExperimentRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) @@ -58718,32 +67681,32 @@ }; /** - * Creates a GetEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetExperimentRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest} GetEnvironmentRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest} GetExperimentRequest */ - GetEnvironmentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest) + GetExperimentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest(); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest(); if (object.name != null) message.name = String(object.name); return message; }; /** - * Creates a plain object from a GetEnvironmentRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetExperimentRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest} message GetEnvironmentRequest + * @param {google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest} message GetExperimentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetEnvironmentRequest.toObject = function toObject(message, options) { + GetExperimentRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -58755,38 +67718,38 @@ }; /** - * Converts this GetEnvironmentRequest to JSON. + * Converts this GetExperimentRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest * @instance * @returns {Object.} JSON object */ - GetEnvironmentRequest.prototype.toJSON = function toJSON() { + GetExperimentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetEnvironmentRequest; + return GetExperimentRequest; })(); - v3beta1.CreateEnvironmentRequest = (function() { + v3beta1.CreateExperimentRequest = (function() { /** - * Properties of a CreateEnvironmentRequest. + * Properties of a CreateExperimentRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface ICreateEnvironmentRequest - * @property {string|null} [parent] CreateEnvironmentRequest parent - * @property {google.cloud.dialogflow.cx.v3beta1.IEnvironment|null} [environment] CreateEnvironmentRequest environment + * @interface ICreateExperimentRequest + * @property {string|null} [parent] CreateExperimentRequest parent + * @property {google.cloud.dialogflow.cx.v3beta1.IExperiment|null} [experiment] CreateExperimentRequest experiment */ /** - * Constructs a new CreateEnvironmentRequest. + * Constructs a new CreateExperimentRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a CreateEnvironmentRequest. - * @implements ICreateEnvironmentRequest + * @classdesc Represents a CreateExperimentRequest. + * @implements ICreateExperimentRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.ICreateEnvironmentRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.ICreateExperimentRequest=} [properties] Properties to set */ - function CreateEnvironmentRequest(properties) { + function CreateExperimentRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -58794,80 +67757,80 @@ } /** - * CreateEnvironmentRequest parent. + * CreateExperimentRequest parent. * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest * @instance */ - CreateEnvironmentRequest.prototype.parent = ""; + CreateExperimentRequest.prototype.parent = ""; /** - * CreateEnvironmentRequest environment. - * @member {google.cloud.dialogflow.cx.v3beta1.IEnvironment|null|undefined} environment - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest + * CreateExperimentRequest experiment. + * @member {google.cloud.dialogflow.cx.v3beta1.IExperiment|null|undefined} experiment + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest * @instance */ - CreateEnvironmentRequest.prototype.environment = null; + CreateExperimentRequest.prototype.experiment = null; /** - * Creates a new CreateEnvironmentRequest instance using the specified properties. + * Creates a new CreateExperimentRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ICreateEnvironmentRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest} CreateEnvironmentRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.ICreateExperimentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest} CreateExperimentRequest instance */ - CreateEnvironmentRequest.create = function create(properties) { - return new CreateEnvironmentRequest(properties); + CreateExperimentRequest.create = function create(properties) { + return new CreateExperimentRequest(properties); }; /** - * Encodes the specified CreateEnvironmentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest.verify|verify} messages. + * Encodes the specified CreateExperimentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ICreateEnvironmentRequest} message CreateEnvironmentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.ICreateExperimentRequest} message CreateExperimentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateEnvironmentRequest.encode = function encode(message, writer) { + CreateExperimentRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) - $root.google.cloud.dialogflow.cx.v3beta1.Environment.encode(message.environment, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.experiment != null && Object.hasOwnProperty.call(message, "experiment")) + $root.google.cloud.dialogflow.cx.v3beta1.Experiment.encode(message.experiment, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified CreateEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest.verify|verify} messages. + * Encodes the specified CreateExperimentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ICreateEnvironmentRequest} message CreateEnvironmentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.ICreateExperimentRequest} message CreateExperimentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreateExperimentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateEnvironmentRequest message from the specified reader or buffer. + * Decodes a CreateExperimentRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest} CreateEnvironmentRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest} CreateExperimentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateEnvironmentRequest.decode = function decode(reader, length) { + CreateExperimentRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -58875,7 +67838,7 @@ message.parent = reader.string(); break; case 2: - message.environment = $root.google.cloud.dialogflow.cx.v3beta1.Environment.decode(reader, reader.uint32()); + message.experiment = $root.google.cloud.dialogflow.cx.v3beta1.Experiment.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -58886,122 +67849,122 @@ }; /** - * Decodes a CreateEnvironmentRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateExperimentRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest} CreateEnvironmentRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest} CreateExperimentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateEnvironmentRequest.decodeDelimited = function decodeDelimited(reader) { + CreateExperimentRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateEnvironmentRequest message. + * Verifies a CreateExperimentRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateEnvironmentRequest.verify = function verify(message) { + CreateExperimentRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.parent != null && message.hasOwnProperty("parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.environment != null && message.hasOwnProperty("environment")) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.Environment.verify(message.environment); + if (message.experiment != null && message.hasOwnProperty("experiment")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.Experiment.verify(message.experiment); if (error) - return "environment." + error; + return "experiment." + error; } return null; }; /** - * Creates a CreateEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateExperimentRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest} CreateEnvironmentRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest} CreateExperimentRequest */ - CreateEnvironmentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest) + CreateExperimentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest(); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest(); if (object.parent != null) message.parent = String(object.parent); - if (object.environment != null) { - if (typeof object.environment !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest.environment: object expected"); - message.environment = $root.google.cloud.dialogflow.cx.v3beta1.Environment.fromObject(object.environment); + if (object.experiment != null) { + if (typeof object.experiment !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest.experiment: object expected"); + message.experiment = $root.google.cloud.dialogflow.cx.v3beta1.Experiment.fromObject(object.experiment); } return message; }; /** - * Creates a plain object from a CreateEnvironmentRequest message. Also converts values to other types if specified. + * Creates a plain object from a CreateExperimentRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest} message CreateEnvironmentRequest + * @param {google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest} message CreateExperimentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateEnvironmentRequest.toObject = function toObject(message, options) { + CreateExperimentRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.parent = ""; - object.environment = null; + object.experiment = null; } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; - if (message.environment != null && message.hasOwnProperty("environment")) - object.environment = $root.google.cloud.dialogflow.cx.v3beta1.Environment.toObject(message.environment, options); + if (message.experiment != null && message.hasOwnProperty("experiment")) + object.experiment = $root.google.cloud.dialogflow.cx.v3beta1.Experiment.toObject(message.experiment, options); return object; }; /** - * Converts this CreateEnvironmentRequest to JSON. + * Converts this CreateExperimentRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest * @instance * @returns {Object.} JSON object */ - CreateEnvironmentRequest.prototype.toJSON = function toJSON() { + CreateExperimentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CreateEnvironmentRequest; + return CreateExperimentRequest; })(); - v3beta1.UpdateEnvironmentRequest = (function() { + v3beta1.UpdateExperimentRequest = (function() { /** - * Properties of an UpdateEnvironmentRequest. + * Properties of an UpdateExperimentRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IUpdateEnvironmentRequest - * @property {google.cloud.dialogflow.cx.v3beta1.IEnvironment|null} [environment] UpdateEnvironmentRequest environment - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateEnvironmentRequest updateMask + * @interface IUpdateExperimentRequest + * @property {google.cloud.dialogflow.cx.v3beta1.IExperiment|null} [experiment] UpdateExperimentRequest experiment + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateExperimentRequest updateMask */ /** - * Constructs a new UpdateEnvironmentRequest. + * Constructs a new UpdateExperimentRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents an UpdateEnvironmentRequest. - * @implements IUpdateEnvironmentRequest + * @classdesc Represents an UpdateExperimentRequest. + * @implements IUpdateExperimentRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateEnvironmentRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateExperimentRequest=} [properties] Properties to set */ - function UpdateEnvironmentRequest(properties) { + function UpdateExperimentRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -59009,85 +67972,85 @@ } /** - * UpdateEnvironmentRequest environment. - * @member {google.cloud.dialogflow.cx.v3beta1.IEnvironment|null|undefined} environment - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest + * UpdateExperimentRequest experiment. + * @member {google.cloud.dialogflow.cx.v3beta1.IExperiment|null|undefined} experiment + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest * @instance */ - UpdateEnvironmentRequest.prototype.environment = null; + UpdateExperimentRequest.prototype.experiment = null; /** - * UpdateEnvironmentRequest updateMask. + * UpdateExperimentRequest updateMask. * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest * @instance */ - UpdateEnvironmentRequest.prototype.updateMask = null; + UpdateExperimentRequest.prototype.updateMask = null; /** - * Creates a new UpdateEnvironmentRequest instance using the specified properties. + * Creates a new UpdateExperimentRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateEnvironmentRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest} UpdateEnvironmentRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateExperimentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest} UpdateExperimentRequest instance */ - UpdateEnvironmentRequest.create = function create(properties) { - return new UpdateEnvironmentRequest(properties); + UpdateExperimentRequest.create = function create(properties) { + return new UpdateExperimentRequest(properties); }; /** - * Encodes the specified UpdateEnvironmentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest.verify|verify} messages. + * Encodes the specified UpdateExperimentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateEnvironmentRequest} message UpdateEnvironmentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateExperimentRequest} message UpdateExperimentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateEnvironmentRequest.encode = function encode(message, writer) { + UpdateExperimentRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) - $root.google.cloud.dialogflow.cx.v3beta1.Environment.encode(message.environment, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.experiment != null && Object.hasOwnProperty.call(message, "experiment")) + $root.google.cloud.dialogflow.cx.v3beta1.Experiment.encode(message.experiment, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified UpdateEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest.verify|verify} messages. + * Encodes the specified UpdateExperimentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateEnvironmentRequest} message UpdateEnvironmentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateExperimentRequest} message UpdateExperimentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { + UpdateExperimentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateEnvironmentRequest message from the specified reader or buffer. + * Decodes an UpdateExperimentRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest} UpdateEnvironmentRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest} UpdateExperimentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateEnvironmentRequest.decode = function decode(reader, length) { + UpdateExperimentRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.environment = $root.google.cloud.dialogflow.cx.v3beta1.Environment.decode(reader, reader.uint32()); + message.experiment = $root.google.cloud.dialogflow.cx.v3beta1.Experiment.decode(reader, reader.uint32()); break; case 2: message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); @@ -59101,36 +68064,36 @@ }; /** - * Decodes an UpdateEnvironmentRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateExperimentRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest} UpdateEnvironmentRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest} UpdateExperimentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateEnvironmentRequest.decodeDelimited = function decodeDelimited(reader) { + UpdateExperimentRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateEnvironmentRequest message. + * Verifies an UpdateExperimentRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateEnvironmentRequest.verify = function verify(message) { + UpdateExperimentRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.environment != null && message.hasOwnProperty("environment")) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.Environment.verify(message.environment); + if (message.experiment != null && message.hasOwnProperty("experiment")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.Experiment.verify(message.experiment); if (error) - return "environment." + error; + return "experiment." + error; } if (message.updateMask != null && message.hasOwnProperty("updateMask")) { var error = $root.google.protobuf.FieldMask.verify(message.updateMask); @@ -59141,86 +68104,86 @@ }; /** - * Creates an UpdateEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateExperimentRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest} UpdateEnvironmentRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest} UpdateExperimentRequest */ - UpdateEnvironmentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest) + UpdateExperimentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest(); - if (object.environment != null) { - if (typeof object.environment !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest.environment: object expected"); - message.environment = $root.google.cloud.dialogflow.cx.v3beta1.Environment.fromObject(object.environment); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest(); + if (object.experiment != null) { + if (typeof object.experiment !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest.experiment: object expected"); + message.experiment = $root.google.cloud.dialogflow.cx.v3beta1.Experiment.fromObject(object.experiment); } if (object.updateMask != null) { if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest.updateMask: object expected"); + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest.updateMask: object expected"); message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } return message; }; /** - * Creates a plain object from an UpdateEnvironmentRequest message. Also converts values to other types if specified. + * Creates a plain object from an UpdateExperimentRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest} message UpdateEnvironmentRequest + * @param {google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest} message UpdateExperimentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateEnvironmentRequest.toObject = function toObject(message, options) { + UpdateExperimentRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.environment = null; + object.experiment = null; object.updateMask = null; } - if (message.environment != null && message.hasOwnProperty("environment")) - object.environment = $root.google.cloud.dialogflow.cx.v3beta1.Environment.toObject(message.environment, options); + if (message.experiment != null && message.hasOwnProperty("experiment")) + object.experiment = $root.google.cloud.dialogflow.cx.v3beta1.Experiment.toObject(message.experiment, options); if (message.updateMask != null && message.hasOwnProperty("updateMask")) object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this UpdateEnvironmentRequest to JSON. + * Converts this UpdateExperimentRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest * @instance * @returns {Object.} JSON object */ - UpdateEnvironmentRequest.prototype.toJSON = function toJSON() { + UpdateExperimentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UpdateEnvironmentRequest; + return UpdateExperimentRequest; })(); - v3beta1.DeleteEnvironmentRequest = (function() { + v3beta1.DeleteExperimentRequest = (function() { /** - * Properties of a DeleteEnvironmentRequest. + * Properties of a DeleteExperimentRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IDeleteEnvironmentRequest - * @property {string|null} [name] DeleteEnvironmentRequest name + * @interface IDeleteExperimentRequest + * @property {string|null} [name] DeleteExperimentRequest name */ /** - * Constructs a new DeleteEnvironmentRequest. + * Constructs a new DeleteExperimentRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a DeleteEnvironmentRequest. - * @implements IDeleteEnvironmentRequest + * @classdesc Represents a DeleteExperimentRequest. + * @implements IDeleteExperimentRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteEnvironmentRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteExperimentRequest=} [properties] Properties to set */ - function DeleteEnvironmentRequest(properties) { + function DeleteExperimentRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -59228,35 +68191,35 @@ } /** - * DeleteEnvironmentRequest name. + * DeleteExperimentRequest name. * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest * @instance */ - DeleteEnvironmentRequest.prototype.name = ""; + DeleteExperimentRequest.prototype.name = ""; /** - * Creates a new DeleteEnvironmentRequest instance using the specified properties. + * Creates a new DeleteExperimentRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteEnvironmentRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest} DeleteEnvironmentRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteExperimentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest} DeleteExperimentRequest instance */ - DeleteEnvironmentRequest.create = function create(properties) { - return new DeleteEnvironmentRequest(properties); + DeleteExperimentRequest.create = function create(properties) { + return new DeleteExperimentRequest(properties); }; /** - * Encodes the specified DeleteEnvironmentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest.verify|verify} messages. + * Encodes the specified DeleteExperimentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteEnvironmentRequest} message DeleteEnvironmentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteExperimentRequest} message DeleteExperimentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteEnvironmentRequest.encode = function encode(message, writer) { + DeleteExperimentRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) @@ -59265,33 +68228,33 @@ }; /** - * Encodes the specified DeleteEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest.verify|verify} messages. + * Encodes the specified DeleteExperimentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteEnvironmentRequest} message DeleteEnvironmentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteExperimentRequest} message DeleteExperimentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeleteExperimentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteEnvironmentRequest message from the specified reader or buffer. + * Decodes a DeleteExperimentRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest} DeleteEnvironmentRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest} DeleteExperimentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteEnvironmentRequest.decode = function decode(reader, length) { + DeleteExperimentRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -59307,30 +68270,30 @@ }; /** - * Decodes a DeleteEnvironmentRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteExperimentRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest} DeleteEnvironmentRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest} DeleteExperimentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteEnvironmentRequest.decodeDelimited = function decodeDelimited(reader) { + DeleteExperimentRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteEnvironmentRequest message. + * Verifies a DeleteExperimentRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteEnvironmentRequest.verify = function verify(message) { + DeleteExperimentRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) @@ -59340,32 +68303,32 @@ }; /** - * Creates a DeleteEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteExperimentRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest} DeleteEnvironmentRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest} DeleteExperimentRequest */ - DeleteEnvironmentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest) + DeleteExperimentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest(); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest(); if (object.name != null) message.name = String(object.name); return message; }; /** - * Creates a plain object from a DeleteEnvironmentRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeleteExperimentRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest} message DeleteEnvironmentRequest + * @param {google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest} message DeleteExperimentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteEnvironmentRequest.toObject = function toObject(message, options) { + DeleteExperimentRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -59377,39 +68340,37 @@ }; /** - * Converts this DeleteEnvironmentRequest to JSON. + * Converts this DeleteExperimentRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest * @instance * @returns {Object.} JSON object */ - DeleteEnvironmentRequest.prototype.toJSON = function toJSON() { + DeleteExperimentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeleteEnvironmentRequest; + return DeleteExperimentRequest; })(); - v3beta1.LookupEnvironmentHistoryRequest = (function() { + v3beta1.StartExperimentRequest = (function() { /** - * Properties of a LookupEnvironmentHistoryRequest. + * Properties of a StartExperimentRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface ILookupEnvironmentHistoryRequest - * @property {string|null} [name] LookupEnvironmentHistoryRequest name - * @property {number|null} [pageSize] LookupEnvironmentHistoryRequest pageSize - * @property {string|null} [pageToken] LookupEnvironmentHistoryRequest pageToken + * @interface IStartExperimentRequest + * @property {string|null} [name] StartExperimentRequest name */ /** - * Constructs a new LookupEnvironmentHistoryRequest. + * Constructs a new StartExperimentRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a LookupEnvironmentHistoryRequest. - * @implements ILookupEnvironmentHistoryRequest + * @classdesc Represents a StartExperimentRequest. + * @implements IStartExperimentRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.ILookupEnvironmentHistoryRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IStartExperimentRequest=} [properties] Properties to set */ - function LookupEnvironmentHistoryRequest(properties) { + function StartExperimentRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -59417,102 +68378,76 @@ } /** - * LookupEnvironmentHistoryRequest name. + * StartExperimentRequest name. * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest - * @instance - */ - LookupEnvironmentHistoryRequest.prototype.name = ""; - - /** - * LookupEnvironmentHistoryRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest - * @instance - */ - LookupEnvironmentHistoryRequest.prototype.pageSize = 0; - - /** - * LookupEnvironmentHistoryRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest * @instance */ - LookupEnvironmentHistoryRequest.prototype.pageToken = ""; + StartExperimentRequest.prototype.name = ""; /** - * Creates a new LookupEnvironmentHistoryRequest instance using the specified properties. + * Creates a new StartExperimentRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ILookupEnvironmentHistoryRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest} LookupEnvironmentHistoryRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.IStartExperimentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest} StartExperimentRequest instance */ - LookupEnvironmentHistoryRequest.create = function create(properties) { - return new LookupEnvironmentHistoryRequest(properties); + StartExperimentRequest.create = function create(properties) { + return new StartExperimentRequest(properties); }; /** - * Encodes the specified LookupEnvironmentHistoryRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest.verify|verify} messages. + * Encodes the specified StartExperimentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ILookupEnvironmentHistoryRequest} message LookupEnvironmentHistoryRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IStartExperimentRequest} message StartExperimentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LookupEnvironmentHistoryRequest.encode = function encode(message, writer) { + StartExperimentRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); return writer; }; /** - * Encodes the specified LookupEnvironmentHistoryRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest.verify|verify} messages. + * Encodes the specified StartExperimentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ILookupEnvironmentHistoryRequest} message LookupEnvironmentHistoryRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IStartExperimentRequest} message StartExperimentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LookupEnvironmentHistoryRequest.encodeDelimited = function encodeDelimited(message, writer) { + StartExperimentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a LookupEnvironmentHistoryRequest message from the specified reader or buffer. + * Decodes a StartExperimentRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest} LookupEnvironmentHistoryRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest} StartExperimentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LookupEnvironmentHistoryRequest.decode = function decode(reader, length) { + StartExperimentRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: message.name = reader.string(); break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); - break; default: reader.skipType(tag & 7); break; @@ -59522,126 +68457,107 @@ }; /** - * Decodes a LookupEnvironmentHistoryRequest message from the specified reader or buffer, length delimited. + * Decodes a StartExperimentRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest} LookupEnvironmentHistoryRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest} StartExperimentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LookupEnvironmentHistoryRequest.decodeDelimited = function decodeDelimited(reader) { + StartExperimentRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a LookupEnvironmentHistoryRequest message. + * Verifies a StartExperimentRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - LookupEnvironmentHistoryRequest.verify = function verify(message) { + StartExperimentRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; return null; }; /** - * Creates a LookupEnvironmentHistoryRequest message from a plain object. Also converts values to their respective internal types. + * Creates a StartExperimentRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest} LookupEnvironmentHistoryRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest} StartExperimentRequest */ - LookupEnvironmentHistoryRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest) + StartExperimentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest(); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest(); if (object.name != null) message.name = String(object.name); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); return message; }; /** - * Creates a plain object from a LookupEnvironmentHistoryRequest message. Also converts values to other types if specified. + * Creates a plain object from a StartExperimentRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest} message LookupEnvironmentHistoryRequest + * @param {google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest} message StartExperimentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LookupEnvironmentHistoryRequest.toObject = function toObject(message, options) { + StartExperimentRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { + if (options.defaults) object.name = ""; - object.pageSize = 0; - object.pageToken = ""; - } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; return object; }; /** - * Converts this LookupEnvironmentHistoryRequest to JSON. + * Converts this StartExperimentRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest * @instance * @returns {Object.} JSON object */ - LookupEnvironmentHistoryRequest.prototype.toJSON = function toJSON() { + StartExperimentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return LookupEnvironmentHistoryRequest; + return StartExperimentRequest; })(); - v3beta1.LookupEnvironmentHistoryResponse = (function() { + v3beta1.StopExperimentRequest = (function() { /** - * Properties of a LookupEnvironmentHistoryResponse. + * Properties of a StopExperimentRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface ILookupEnvironmentHistoryResponse - * @property {Array.|null} [environments] LookupEnvironmentHistoryResponse environments - * @property {string|null} [nextPageToken] LookupEnvironmentHistoryResponse nextPageToken + * @interface IStopExperimentRequest + * @property {string|null} [name] StopExperimentRequest name */ /** - * Constructs a new LookupEnvironmentHistoryResponse. + * Constructs a new StopExperimentRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a LookupEnvironmentHistoryResponse. - * @implements ILookupEnvironmentHistoryResponse + * @classdesc Represents a StopExperimentRequest. + * @implements IStopExperimentRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.ILookupEnvironmentHistoryResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IStopExperimentRequest=} [properties] Properties to set */ - function LookupEnvironmentHistoryResponse(properties) { - this.environments = []; + function StopExperimentRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -59649,91 +68565,75 @@ } /** - * LookupEnvironmentHistoryResponse environments. - * @member {Array.} environments - * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse - * @instance - */ - LookupEnvironmentHistoryResponse.prototype.environments = $util.emptyArray; - - /** - * LookupEnvironmentHistoryResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse + * StopExperimentRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest * @instance */ - LookupEnvironmentHistoryResponse.prototype.nextPageToken = ""; + StopExperimentRequest.prototype.name = ""; /** - * Creates a new LookupEnvironmentHistoryResponse instance using the specified properties. + * Creates a new StopExperimentRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ILookupEnvironmentHistoryResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse} LookupEnvironmentHistoryResponse instance + * @param {google.cloud.dialogflow.cx.v3beta1.IStopExperimentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest} StopExperimentRequest instance */ - LookupEnvironmentHistoryResponse.create = function create(properties) { - return new LookupEnvironmentHistoryResponse(properties); + StopExperimentRequest.create = function create(properties) { + return new StopExperimentRequest(properties); }; /** - * Encodes the specified LookupEnvironmentHistoryResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse.verify|verify} messages. + * Encodes the specified StopExperimentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ILookupEnvironmentHistoryResponse} message LookupEnvironmentHistoryResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IStopExperimentRequest} message StopExperimentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LookupEnvironmentHistoryResponse.encode = function encode(message, writer) { + StopExperimentRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.environments != null && message.environments.length) - for (var i = 0; i < message.environments.length; ++i) - $root.google.cloud.dialogflow.cx.v3beta1.Environment.encode(message.environments[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified LookupEnvironmentHistoryResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse.verify|verify} messages. + * Encodes the specified StopExperimentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ILookupEnvironmentHistoryResponse} message LookupEnvironmentHistoryResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IStopExperimentRequest} message StopExperimentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LookupEnvironmentHistoryResponse.encodeDelimited = function encodeDelimited(message, writer) { + StopExperimentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a LookupEnvironmentHistoryResponse message from the specified reader or buffer. + * Decodes a StopExperimentRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse} LookupEnvironmentHistoryResponse + * @returns {google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest} StopExperimentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LookupEnvironmentHistoryResponse.decode = function decode(reader, length) { + StopExperimentRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.environments && message.environments.length)) - message.environments = []; - message.environments.push($root.google.cloud.dialogflow.cx.v3beta1.Environment.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -59744,113 +68644,87 @@ }; /** - * Decodes a LookupEnvironmentHistoryResponse message from the specified reader or buffer, length delimited. + * Decodes a StopExperimentRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse} LookupEnvironmentHistoryResponse + * @returns {google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest} StopExperimentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LookupEnvironmentHistoryResponse.decodeDelimited = function decodeDelimited(reader) { + StopExperimentRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a LookupEnvironmentHistoryResponse message. + * Verifies a StopExperimentRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - LookupEnvironmentHistoryResponse.verify = function verify(message) { + StopExperimentRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.environments != null && message.hasOwnProperty("environments")) { - if (!Array.isArray(message.environments)) - return "environments: array expected"; - for (var i = 0; i < message.environments.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.Environment.verify(message.environments[i]); - if (error) - return "environments." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a LookupEnvironmentHistoryResponse message from a plain object. Also converts values to their respective internal types. + * Creates a StopExperimentRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse} LookupEnvironmentHistoryResponse + * @returns {google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest} StopExperimentRequest */ - LookupEnvironmentHistoryResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse) + StopExperimentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse(); - if (object.environments) { - if (!Array.isArray(object.environments)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse.environments: array expected"); - message.environments = []; - for (var i = 0; i < object.environments.length; ++i) { - if (typeof object.environments[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse.environments: object expected"); - message.environments[i] = $root.google.cloud.dialogflow.cx.v3beta1.Environment.fromObject(object.environments[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a LookupEnvironmentHistoryResponse message. Also converts values to other types if specified. + * Creates a plain object from a StopExperimentRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse} message LookupEnvironmentHistoryResponse + * @param {google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest} message StopExperimentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LookupEnvironmentHistoryResponse.toObject = function toObject(message, options) { + StopExperimentRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.environments = []; if (options.defaults) - object.nextPageToken = ""; - if (message.environments && message.environments.length) { - object.environments = []; - for (var j = 0; j < message.environments.length; ++j) - object.environments[j] = $root.google.cloud.dialogflow.cx.v3beta1.Environment.toObject(message.environments[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this LookupEnvironmentHistoryResponse to JSON. + * Converts this StopExperimentRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest * @instance * @returns {Object.} JSON object */ - LookupEnvironmentHistoryResponse.prototype.toJSON = function toJSON() { + StopExperimentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return LookupEnvironmentHistoryResponse; + return StopExperimentRequest; })(); v3beta1.Intents = (function() { @@ -79828,6 +88702,7 @@ * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history * @property {string|null} [plural] ResourceDescriptor plural * @property {string|null} [singular] ResourceDescriptor singular + * @property {Array.|null} [style] ResourceDescriptor style */ /** @@ -79840,6 +88715,7 @@ */ function ResourceDescriptor(properties) { this.pattern = []; + this.style = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -79894,6 +88770,14 @@ */ ResourceDescriptor.prototype.singular = ""; + /** + * ResourceDescriptor style. + * @member {Array.} style + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.style = $util.emptyArray; + /** * Creates a new ResourceDescriptor instance using the specified properties. * @function create @@ -79931,6 +88815,12 @@ writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); + if (message.style != null && message.style.length) { + writer.uint32(/* id 10, wireType 2 =*/82).fork(); + for (var i = 0; i < message.style.length; ++i) + writer.int32(message.style[i]); + writer.ldelim(); + } return writer; }; @@ -79985,6 +88875,16 @@ case 6: message.singular = reader.string(); break; + case 10: + if (!(message.style && message.style.length)) + message.style = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.style.push(reader.int32()); + } else + message.style.push(reader.int32()); + break; default: reader.skipType(tag & 7); break; @@ -80048,6 +88948,18 @@ if (message.singular != null && message.hasOwnProperty("singular")) if (!$util.isString(message.singular)) return "singular: string expected"; + if (message.style != null && message.hasOwnProperty("style")) { + if (!Array.isArray(message.style)) + return "style: array expected"; + for (var i = 0; i < message.style.length; ++i) + switch (message.style[i]) { + default: + return "style: enum value[] expected"; + case 0: + case 1: + break; + } + } return null; }; @@ -80092,6 +89004,23 @@ message.plural = String(object.plural); if (object.singular != null) message.singular = String(object.singular); + if (object.style) { + if (!Array.isArray(object.style)) + throw TypeError(".google.api.ResourceDescriptor.style: array expected"); + message.style = []; + for (var i = 0; i < object.style.length; ++i) + switch (object.style[i]) { + default: + case "STYLE_UNSPECIFIED": + case 0: + message.style[i] = 0; + break; + case "DECLARATIVE_FRIENDLY": + case 1: + message.style[i] = 1; + break; + } + } return message; }; @@ -80108,8 +89037,10 @@ if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) + if (options.arrays || options.defaults) { object.pattern = []; + object.style = []; + } if (options.defaults) { object.type = ""; object.nameField = ""; @@ -80132,6 +89063,11 @@ object.plural = message.plural; if (message.singular != null && message.hasOwnProperty("singular")) object.singular = message.singular; + if (message.style && message.style.length) { + object.style = []; + for (var j = 0; j < message.style.length; ++j) + object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; + } return object; }; @@ -80162,6 +89098,20 @@ return values; })(); + /** + * Style enum. + * @name google.api.ResourceDescriptor.Style + * @enum {number} + * @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value + * @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value + */ + ResourceDescriptor.Style = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1; + return values; + })(); + return ResourceDescriptor; })(); diff --git a/protos/protos.json b/protos/protos.json index 1a8edb54..58c2cbf2 100644 --- a/protos/protos.json +++ b/protos/protos.json @@ -2181,23 +2181,23 @@ } } }, - "Intents": { + "Experiments": { "options": { "(google.api.default_host)": "dialogflow.googleapis.com", "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflow" }, "methods": { - "ListIntents": { - "requestType": "ListIntentsRequest", - "responseType": "ListIntentsResponse", + "ListExperiments": { + "requestType": "ListExperimentsRequest", + "responseType": "ListExperimentsResponse", "options": { - "(google.api.http).get": "/v3/{parent=projects/*/locations/*/agents/*}/intents", + "(google.api.http).get": "/v3/{parent=projects/*/locations/*/agents/*/environments/*}/experiments", "(google.api.method_signature)": "parent" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v3/{parent=projects/*/locations/*/agents/*}/intents" + "get": "/v3/{parent=projects/*/locations/*/agents/*/environments/*}/experiments" } }, { @@ -2205,17 +2205,17 @@ } ] }, - "GetIntent": { - "requestType": "GetIntentRequest", - "responseType": "Intent", + "GetExperiment": { + "requestType": "GetExperimentRequest", + "responseType": "Experiment", "options": { - "(google.api.http).get": "/v3/{name=projects/*/locations/*/agents/*/intents/*}", + "(google.api.http).get": "/v3/{name=projects/*/locations/*/agents/*/environments/*/experiments/*}", "(google.api.method_signature)": "name" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v3/{name=projects/*/locations/*/agents/*/intents/*}" + "get": "/v3/{name=projects/*/locations/*/agents/*/environments/*/experiments/*}" } }, { @@ -2223,57 +2223,97 @@ } ] }, - "CreateIntent": { - "requestType": "CreateIntentRequest", - "responseType": "Intent", + "CreateExperiment": { + "requestType": "CreateExperimentRequest", + "responseType": "Experiment", "options": { - "(google.api.http).post": "/v3/{parent=projects/*/locations/*/agents/*}/intents", - "(google.api.http).body": "intent", - "(google.api.method_signature)": "parent,intent" + "(google.api.http).post": "/v3/{parent=projects/*/locations/*/agents/*/environments/*}/experiments", + "(google.api.http).body": "experiment", + "(google.api.method_signature)": "parent,experiment" }, "parsedOptions": [ { "(google.api.http)": { - "post": "/v3/{parent=projects/*/locations/*/agents/*}/intents", - "body": "intent" + "post": "/v3/{parent=projects/*/locations/*/agents/*/environments/*}/experiments", + "body": "experiment" } }, { - "(google.api.method_signature)": "parent,intent" + "(google.api.method_signature)": "parent,experiment" } ] }, - "UpdateIntent": { - "requestType": "UpdateIntentRequest", - "responseType": "Intent", + "UpdateExperiment": { + "requestType": "UpdateExperimentRequest", + "responseType": "Experiment", "options": { - "(google.api.http).patch": "/v3/{intent.name=projects/*/locations/*/agents/*/intents/*}", - "(google.api.http).body": "intent", - "(google.api.method_signature)": "intent,update_mask" + "(google.api.http).patch": "/v3/{experiment.name=projects/*/locations/*/agents/*/environments/*/experiments/*}", + "(google.api.http).body": "experiment", + "(google.api.method_signature)": "experiment,update_mask" }, "parsedOptions": [ { "(google.api.http)": { - "patch": "/v3/{intent.name=projects/*/locations/*/agents/*/intents/*}", - "body": "intent" + "patch": "/v3/{experiment.name=projects/*/locations/*/agents/*/environments/*/experiments/*}", + "body": "experiment" } }, { - "(google.api.method_signature)": "intent,update_mask" + "(google.api.method_signature)": "experiment,update_mask" } ] }, - "DeleteIntent": { - "requestType": "DeleteIntentRequest", + "DeleteExperiment": { + "requestType": "DeleteExperimentRequest", "responseType": "google.protobuf.Empty", "options": { - "(google.api.http).delete": "/v3/{name=projects/*/locations/*/agents/*/intents/*}", + "(google.api.http).delete": "/v3/{name=projects/*/locations/*/agents/*/environments/*/experiments/*}", "(google.api.method_signature)": "name" }, "parsedOptions": [ { "(google.api.http)": { - "delete": "/v3/{name=projects/*/locations/*/agents/*/intents/*}" + "delete": "/v3/{name=projects/*/locations/*/agents/*/environments/*/experiments/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "StartExperiment": { + "requestType": "StartExperimentRequest", + "responseType": "Experiment", + "options": { + "(google.api.http).post": "/v3/{name=projects/*/locations/*/agents/*/environments/*/experiments/*}:start", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v3/{name=projects/*/locations/*/agents/*/environments/*/experiments/*}:start", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "StopExperiment": { + "requestType": "StopExperimentRequest", + "responseType": "Experiment", + "options": { + "(google.api.http).post": "/v3/{name=projects/*/locations/*/agents/*/environments/*/experiments/*}:stop", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v3/{name=projects/*/locations/*/agents/*/environments/*/experiments/*}:stop", + "body": "*" } }, { @@ -2283,10 +2323,10 @@ } } }, - "Intent": { + "Experiment": { "options": { - "(google.api.resource).type": "dialogflow.googleapis.com/Intent", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/agents/{agent}/intents/{intent}" + "(google.api.resource).type": "dialogflow.googleapis.com/Experiment", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/experiments/{experiment}" }, "fields": { "name": { @@ -2300,140 +2340,237 @@ "(google.api.field_behavior)": "REQUIRED" } }, - "trainingPhrases": { - "rule": "repeated", - "type": "TrainingPhrase", + "description": { + "type": "string", "id": 3 }, - "parameters": { - "rule": "repeated", - "type": "Parameter", + "state": { + "type": "State", "id": 4 }, - "priority": { - "type": "int32", + "definition": { + "type": "Definition", "id": 5 }, - "isFallback": { - "type": "bool", + "result": { + "type": "Result", "id": 6 }, - "labels": { - "keyType": "string", - "type": "string", - "id": 7, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 7 }, - "description": { - "type": "string", - "id": 8, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 8 + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 9 + }, + "lastUpdateTime": { + "type": "google.protobuf.Timestamp", + "id": 10 + }, + "experimentLength": { + "type": "google.protobuf.Duration", + "id": 11 + }, + "variantsHistory": { + "rule": "repeated", + "type": "VariantsHistory", + "id": 12 } }, "nested": { - "TrainingPhrase": { + "Definition": { + "oneofs": { + "variants": { + "oneof": [ + "versionVariants" + ] + } + }, "fields": { - "id": { + "condition": { "type": "string", "id": 1 }, - "parts": { + "versionVariants": { + "type": "VersionVariants", + "id": 2 + } + } + }, + "Result": { + "fields": { + "versionMetrics": { "rule": "repeated", - "type": "Part", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "type": "VersionMetrics", + "id": 1 }, - "repeatCount": { - "type": "int32", - "id": 3 + "lastUpdateTime": { + "type": "google.protobuf.Timestamp", + "id": 2 } }, "nested": { - "Part": { + "ConfidenceInterval": { "fields": { - "text": { + "confidenceLevel": { + "type": "double", + "id": 1 + }, + "ratio": { + "type": "double", + "id": 2 + }, + "lowerBound": { + "type": "double", + "id": 3 + }, + "upperBound": { + "type": "double", + "id": 4 + } + } + }, + "Metric": { + "oneofs": { + "value": { + "oneof": [ + "ratio" + ] + } + }, + "fields": { + "type": { + "type": "MetricType", + "id": 1 + }, + "ratio": { + "type": "double", + "id": 2 + }, + "confidenceInterval": { + "type": "ConfidenceInterval", + "id": 3 + } + } + }, + "VersionMetrics": { + "fields": { + "version": { "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.resource_reference).type": "dialogflow.googleapis.com/Version" } }, - "parameterId": { - "type": "string", + "metrics": { + "rule": "repeated", + "type": "Metric", "id": 2 + }, + "sessionCount": { + "type": "int32", + "id": 3 } } + }, + "MetricType": { + "values": { + "METRIC_UNSPECIFIED": 0, + "CONTAINED_SESSION_NO_CALLBACK_RATE": 1, + "LIVE_AGENT_HANDOFF_RATE": 2, + "CALLBACK_SESSION_RATE": 3, + "ABANDONED_SESSION_RATE": 4, + "SESSION_END_RATE": 5 + } } } }, - "Parameter": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "DRAFT": 1, + "RUNNING": 2, + "DONE": 3 + } + } + } + }, + "VersionVariants": { + "fields": { + "variants": { + "rule": "repeated", + "type": "Variant", + "id": 1 + } + }, + "nested": { + "Variant": { "fields": { - "id": { + "version": { "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "id": 1 }, - "entityType": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dialogflow.googleapis.com/EntityType" - } + "trafficAllocation": { + "type": "float", + "id": 2 }, - "isList": { + "isControlGroup": { "type": "bool", "id": 3 - }, - "redact": { - "type": "bool", - "id": 4 } } } } }, - "ListIntentsRequest": { + "VariantsHistory": { + "oneofs": { + "variants": { + "oneof": [ + "versionVariants" + ] + } + }, + "fields": { + "versionVariants": { + "type": "VersionVariants", + "id": 1 + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + } + } + }, + "ListExperimentsRequest": { "fields": { "parent": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "dialogflow.googleapis.com/Intent" + "(google.api.resource_reference).child_type": "dialogflow.googleapis.com/Experiment" } }, - "languageCode": { - "type": "string", - "id": 2 - }, - "intentView": { - "type": "IntentView", - "id": 5 - }, "pageSize": { "type": "int32", - "id": 3 + "id": 2 }, "pageToken": { "type": "string", - "id": 4 + "id": 3 } } }, - "ListIntentsResponse": { + "ListExperimentsResponse": { "fields": { - "intents": { + "experiments": { "rule": "repeated", - "type": "Intent", + "type": "Experiment", "id": 1 }, "nextPageToken": { @@ -2442,120 +2579,126 @@ } } }, - "GetIntentRequest": { + "GetExperimentRequest": { "fields": { "name": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dialogflow.googleapis.com/Intent" + "(google.api.resource_reference).type": "dialogflow.googleapis.com/Experiment" } - }, - "languageCode": { - "type": "string", - "id": 2 } } }, - "CreateIntentRequest": { + "CreateExperimentRequest": { "fields": { "parent": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "dialogflow.googleapis.com/Intent" + "(google.api.resource_reference).child_type": "dialogflow.googleapis.com/Experiment" } }, - "intent": { - "type": "Intent", + "experiment": { + "type": "Experiment", "id": 2, "options": { "(google.api.field_behavior)": "REQUIRED" } - }, - "languageCode": { - "type": "string", - "id": 3 } } }, - "UpdateIntentRequest": { + "UpdateExperimentRequest": { "fields": { - "intent": { - "type": "Intent", + "experiment": { + "type": "Experiment", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED" } }, - "languageCode": { - "type": "string", - "id": 2 - }, "updateMask": { "type": "google.protobuf.FieldMask", - "id": 3 + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } } } }, - "DeleteIntentRequest": { + "DeleteExperimentRequest": { "fields": { "name": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dialogflow.googleapis.com/Intent" + "(google.api.resource_reference).type": "dialogflow.googleapis.com/Experiment" } } } }, - "IntentView": { - "values": { - "INTENT_VIEW_UNSPECIFIED": 0, - "INTENT_VIEW_PARTIAL": 1, - "INTENT_VIEW_FULL": 2 + "StartExperimentRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dialogflow.googleapis.com/Experiment" + } + } } }, - "SecuritySettingsService": { + "StopExperimentRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dialogflow.googleapis.com/Experiment" + } + } + } + }, + "Intents": { "options": { "(google.api.default_host)": "dialogflow.googleapis.com", "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflow" }, "methods": { - "CreateSecuritySettings": { - "requestType": "CreateSecuritySettingsRequest", - "responseType": "SecuritySettings", + "ListIntents": { + "requestType": "ListIntentsRequest", + "responseType": "ListIntentsResponse", "options": { - "(google.api.http).post": "/v3/{parent=projects/*/locations/*}/securitySettings", - "(google.api.http).body": "security_settings", - "(google.api.method_signature)": "parent,security_settings" + "(google.api.http).get": "/v3/{parent=projects/*/locations/*/agents/*}/intents", + "(google.api.method_signature)": "parent" }, "parsedOptions": [ { "(google.api.http)": { - "post": "/v3/{parent=projects/*/locations/*}/securitySettings", - "body": "security_settings" + "get": "/v3/{parent=projects/*/locations/*/agents/*}/intents" } }, { - "(google.api.method_signature)": "parent,security_settings" + "(google.api.method_signature)": "parent" } ] }, - "GetSecuritySettings": { - "requestType": "GetSecuritySettingsRequest", - "responseType": "SecuritySettings", + "GetIntent": { + "requestType": "GetIntentRequest", + "responseType": "Intent", "options": { - "(google.api.http).get": "/v3/{name=projects/*/locations/*/securitySettings/*}", + "(google.api.http).get": "/v3/{name=projects/*/locations/*/agents/*/intents/*}", "(google.api.method_signature)": "name" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v3/{name=projects/*/locations/*/securitySettings/*}" + "get": "/v3/{name=projects/*/locations/*/agents/*/intents/*}" } }, { @@ -2563,55 +2706,57 @@ } ] }, - "UpdateSecuritySettings": { - "requestType": "UpdateSecuritySettingsRequest", - "responseType": "SecuritySettings", + "CreateIntent": { + "requestType": "CreateIntentRequest", + "responseType": "Intent", "options": { - "(google.api.http).patch": "/v3/{security_settings.name=projects/*/locations/*/securitySettings/*}", - "(google.api.http).body": "security_settings", - "(google.api.method_signature)": "security_settings,update_mask" + "(google.api.http).post": "/v3/{parent=projects/*/locations/*/agents/*}/intents", + "(google.api.http).body": "intent", + "(google.api.method_signature)": "parent,intent" }, "parsedOptions": [ { "(google.api.http)": { - "patch": "/v3/{security_settings.name=projects/*/locations/*/securitySettings/*}", - "body": "security_settings" + "post": "/v3/{parent=projects/*/locations/*/agents/*}/intents", + "body": "intent" } }, { - "(google.api.method_signature)": "security_settings,update_mask" + "(google.api.method_signature)": "parent,intent" } ] }, - "ListSecuritySettings": { - "requestType": "ListSecuritySettingsRequest", - "responseType": "ListSecuritySettingsResponse", + "UpdateIntent": { + "requestType": "UpdateIntentRequest", + "responseType": "Intent", "options": { - "(google.api.http).get": "/v3/{parent=projects/*/locations/*}/securitySettings", - "(google.api.method_signature)": "parent" + "(google.api.http).patch": "/v3/{intent.name=projects/*/locations/*/agents/*/intents/*}", + "(google.api.http).body": "intent", + "(google.api.method_signature)": "intent,update_mask" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v3/{parent=projects/*/locations/*}/securitySettings" + "patch": "/v3/{intent.name=projects/*/locations/*/agents/*/intents/*}", + "body": "intent" } }, { - "(google.api.method_signature)": "parent" + "(google.api.method_signature)": "intent,update_mask" } ] }, - "DeleteSecuritySettings": { - "requestType": "DeleteSecuritySettingsRequest", + "DeleteIntent": { + "requestType": "DeleteIntentRequest", "responseType": "google.protobuf.Empty", "options": { - "(google.api.http).delete": "/v3/{name=projects/*/locations/*/securitySettings/*}", + "(google.api.http).delete": "/v3/{name=projects/*/locations/*/agents/*/intents/*}", "(google.api.method_signature)": "name" }, "parsedOptions": [ { "(google.api.http)": { - "delete": "/v3/{name=projects/*/locations/*/securitySettings/*}" + "delete": "/v3/{name=projects/*/locations/*/agents/*/intents/*}" } }, { @@ -2621,61 +2766,157 @@ } } }, - "GetSecuritySettingsRequest": { + "Intent": { + "options": { + "(google.api.resource).type": "dialogflow.googleapis.com/Intent", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/agents/{agent}/intents/{intent}" + }, "fields": { "name": { "type": "string", - "id": 1, + "id": 1 + }, + "displayName": { + "type": "string", + "id": 2, "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dialogflow.googleapis.com/SecuritySettings" + "(google.api.field_behavior)": "REQUIRED" } - } - } - }, - "UpdateSecuritySettingsRequest": { - "fields": { - "securitySettings": { - "type": "SecuritySettings", - "id": 1, + }, + "trainingPhrases": { + "rule": "repeated", + "type": "TrainingPhrase", + "id": 3 + }, + "parameters": { + "rule": "repeated", + "type": "Parameter", + "id": 4 + }, + "priority": { + "type": "int32", + "id": 5 + }, + "isFallback": { + "type": "bool", + "id": 6 + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 7, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OPTIONAL" } }, - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 2, + "description": { + "type": "string", + "id": 8, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "TrainingPhrase": { + "fields": { + "id": { + "type": "string", + "id": 1 + }, + "parts": { + "rule": "repeated", + "type": "Part", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "repeatCount": { + "type": "int32", + "id": 3 + } + }, + "nested": { + "Part": { + "fields": { + "text": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "parameterId": { + "type": "string", + "id": 2 + } + } + } + } + }, + "Parameter": { + "fields": { + "id": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "entityType": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dialogflow.googleapis.com/EntityType" + } + }, + "isList": { + "type": "bool", + "id": 3 + }, + "redact": { + "type": "bool", + "id": 4 + } } } } }, - "ListSecuritySettingsRequest": { + "ListIntentsRequest": { "fields": { "parent": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "dialogflow.googleapis.com/SecuritySettings" + "(google.api.resource_reference).child_type": "dialogflow.googleapis.com/Intent" } }, + "languageCode": { + "type": "string", + "id": 2 + }, + "intentView": { + "type": "IntentView", + "id": 5 + }, "pageSize": { "type": "int32", - "id": 2 + "id": 3 }, "pageToken": { "type": "string", - "id": 3 + "id": 4 } } }, - "ListSecuritySettingsResponse": { + "ListIntentsResponse": { "fields": { - "securitySettings": { + "intents": { "rule": "repeated", - "type": "SecuritySettings", + "type": "Intent", "id": 1 }, "nextPageToken": { @@ -2684,22 +2925,264 @@ } } }, - "CreateSecuritySettingsRequest": { + "GetIntentRequest": { "fields": { - "parent": { + "name": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "dialogflow.googleapis.com/SecuritySettings" + "(google.api.resource_reference).type": "dialogflow.googleapis.com/Intent" } }, - "securitySettings": { - "type": "SecuritySettings", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "languageCode": { + "type": "string", + "id": 2 + } + } + }, + "CreateIntentRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "dialogflow.googleapis.com/Intent" + } + }, + "intent": { + "type": "Intent", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "languageCode": { + "type": "string", + "id": 3 + } + } + }, + "UpdateIntentRequest": { + "fields": { + "intent": { + "type": "Intent", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "languageCode": { + "type": "string", + "id": 2 + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 3 + } + } + }, + "DeleteIntentRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dialogflow.googleapis.com/Intent" + } + } + } + }, + "IntentView": { + "values": { + "INTENT_VIEW_UNSPECIFIED": 0, + "INTENT_VIEW_PARTIAL": 1, + "INTENT_VIEW_FULL": 2 + } + }, + "SecuritySettingsService": { + "options": { + "(google.api.default_host)": "dialogflow.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflow" + }, + "methods": { + "CreateSecuritySettings": { + "requestType": "CreateSecuritySettingsRequest", + "responseType": "SecuritySettings", + "options": { + "(google.api.http).post": "/v3/{parent=projects/*/locations/*}/securitySettings", + "(google.api.http).body": "security_settings", + "(google.api.method_signature)": "parent,security_settings" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v3/{parent=projects/*/locations/*}/securitySettings", + "body": "security_settings" + } + }, + { + "(google.api.method_signature)": "parent,security_settings" + } + ] + }, + "GetSecuritySettings": { + "requestType": "GetSecuritySettingsRequest", + "responseType": "SecuritySettings", + "options": { + "(google.api.http).get": "/v3/{name=projects/*/locations/*/securitySettings/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v3/{name=projects/*/locations/*/securitySettings/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "UpdateSecuritySettings": { + "requestType": "UpdateSecuritySettingsRequest", + "responseType": "SecuritySettings", + "options": { + "(google.api.http).patch": "/v3/{security_settings.name=projects/*/locations/*/securitySettings/*}", + "(google.api.http).body": "security_settings", + "(google.api.method_signature)": "security_settings,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v3/{security_settings.name=projects/*/locations/*/securitySettings/*}", + "body": "security_settings" + } + }, + { + "(google.api.method_signature)": "security_settings,update_mask" + } + ] + }, + "ListSecuritySettings": { + "requestType": "ListSecuritySettingsRequest", + "responseType": "ListSecuritySettingsResponse", + "options": { + "(google.api.http).get": "/v3/{parent=projects/*/locations/*}/securitySettings", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v3/{parent=projects/*/locations/*}/securitySettings" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "DeleteSecuritySettings": { + "requestType": "DeleteSecuritySettingsRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v3/{name=projects/*/locations/*/securitySettings/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v3/{name=projects/*/locations/*/securitySettings/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + } + } + }, + "GetSecuritySettingsRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dialogflow.googleapis.com/SecuritySettings" + } + } + } + }, + "UpdateSecuritySettingsRequest": { + "fields": { + "securitySettings": { + "type": "SecuritySettings", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ListSecuritySettingsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "dialogflow.googleapis.com/SecuritySettings" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListSecuritySettingsResponse": { + "fields": { + "securitySettings": { + "rule": "repeated", + "type": "SecuritySettings", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "CreateSecuritySettingsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "dialogflow.googleapis.com/SecuritySettings" + } + }, + "securitySettings": { + "type": "SecuritySettings", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } } } }, @@ -3026,6 +3509,11 @@ "analyzeQueryTextSentiment": { "type": "bool", "id": 8 + }, + "webhookHeaders": { + "keyType": "string", + "type": "string", + "id": 10 } } }, @@ -5999,25 +6487,7 @@ } } }, - "PlayAudio": { - "fields": { - "audioUri": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "allowPlaybackInterruption": { - "type": "bool", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "MixedAudio": { + "MixedAudio": { "fields": { "segments": { "rule": "repeated", @@ -6057,6 +6527,24 @@ }, "EndInteraction": { "fields": {} + }, + "PlayAudio": { + "fields": { + "audioUri": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "allowPlaybackInterruption": { + "type": "bool", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } } } }, @@ -6326,6 +6814,18 @@ } } }, + "AudioEncoding": { + "values": { + "AUDIO_ENCODING_UNSPECIFIED": 0, + "AUDIO_ENCODING_LINEAR_16": 1, + "AUDIO_ENCODING_FLAC": 2, + "AUDIO_ENCODING_MULAW": 3, + "AUDIO_ENCODING_AMR": 4, + "AUDIO_ENCODING_AMR_WB": 5, + "AUDIO_ENCODING_OGG_OPUS": 6, + "AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE": 7 + } + }, "SpeechWordInfo": { "fields": { "word": { @@ -6346,18 +6846,6 @@ } } }, - "AudioEncoding": { - "values": { - "AUDIO_ENCODING_UNSPECIFIED": 0, - "AUDIO_ENCODING_LINEAR_16": 1, - "AUDIO_ENCODING_FLAC": 2, - "AUDIO_ENCODING_MULAW": 3, - "AUDIO_ENCODING_AMR": 4, - "AUDIO_ENCODING_AMR_WB": 5, - "AUDIO_ENCODING_OGG_OPUS": 6, - "AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE": 7 - } - }, "InputAudioConfig": { "fields": { "audioEncoding": { @@ -6486,89 +6974,426 @@ "requestType": "ListEntityTypesRequest", "responseType": "ListEntityTypesResponse", "options": { - "(google.api.http).get": "/v3beta1/{parent=projects/*/locations/*/agents/*}/entityTypes", - "(google.api.method_signature)": "parent" + "(google.api.http).get": "/v3beta1/{parent=projects/*/locations/*/agents/*}/entityTypes", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v3beta1/{parent=projects/*/locations/*/agents/*}/entityTypes" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetEntityType": { + "requestType": "GetEntityTypeRequest", + "responseType": "EntityType", + "options": { + "(google.api.http).get": "/v3beta1/{name=projects/*/locations/*/agents/*/entityTypes/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v3beta1/{name=projects/*/locations/*/agents/*/entityTypes/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateEntityType": { + "requestType": "CreateEntityTypeRequest", + "responseType": "EntityType", + "options": { + "(google.api.http).post": "/v3beta1/{parent=projects/*/locations/*/agents/*}/entityTypes", + "(google.api.http).body": "entity_type", + "(google.api.method_signature)": "parent,entity_type" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v3beta1/{parent=projects/*/locations/*/agents/*}/entityTypes", + "body": "entity_type" + } + }, + { + "(google.api.method_signature)": "parent,entity_type" + } + ] + }, + "UpdateEntityType": { + "requestType": "UpdateEntityTypeRequest", + "responseType": "EntityType", + "options": { + "(google.api.http).patch": "/v3beta1/{entity_type.name=projects/*/locations/*/agents/*/entityTypes/*}", + "(google.api.http).body": "entity_type", + "(google.api.method_signature)": "entity_type,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v3beta1/{entity_type.name=projects/*/locations/*/agents/*/entityTypes/*}", + "body": "entity_type" + } + }, + { + "(google.api.method_signature)": "entity_type,update_mask" + } + ] + }, + "DeleteEntityType": { + "requestType": "DeleteEntityTypeRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v3beta1/{name=projects/*/locations/*/agents/*/entityTypes/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v3beta1/{name=projects/*/locations/*/agents/*/entityTypes/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + } + } + }, + "EntityType": { + "options": { + "(google.api.resource).type": "dialogflow.googleapis.com/EntityType", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/agents/{agent}/entityTypes/{entity_type}" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "displayName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "kind": { + "type": "Kind", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "autoExpansionMode": { + "type": "AutoExpansionMode", + "id": 4 + }, + "entities": { + "rule": "repeated", + "type": "Entity", + "id": 5 + }, + "excludedPhrases": { + "rule": "repeated", + "type": "ExcludedPhrase", + "id": 6 + }, + "enableFuzzyExtraction": { + "type": "bool", + "id": 7 + } + }, + "nested": { + "Entity": { + "fields": { + "value": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "synonyms": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ExcludedPhrase": { + "fields": { + "value": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "Kind": { + "values": { + "KIND_UNSPECIFIED": 0, + "KIND_MAP": 1, + "KIND_LIST": 2, + "KIND_REGEXP": 3 + } + }, + "AutoExpansionMode": { + "values": { + "AUTO_EXPANSION_MODE_UNSPECIFIED": 0, + "AUTO_EXPANSION_MODE_DEFAULT": 1 + } + } + } + }, + "ListEntityTypesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "dialogflow.googleapis.com/EntityType" + } + }, + "languageCode": { + "type": "string", + "id": 2 + }, + "pageSize": { + "type": "int32", + "id": 3 + }, + "pageToken": { + "type": "string", + "id": 4 + } + } + }, + "ListEntityTypesResponse": { + "fields": { + "entityTypes": { + "rule": "repeated", + "type": "EntityType", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetEntityTypeRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dialogflow.googleapis.com/EntityType" + } + }, + "languageCode": { + "type": "string", + "id": 2 + } + } + }, + "CreateEntityTypeRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "dialogflow.googleapis.com/EntityType" + } + }, + "entityType": { + "type": "EntityType", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "languageCode": { + "type": "string", + "id": 3 + } + } + }, + "UpdateEntityTypeRequest": { + "fields": { + "entityType": { + "type": "EntityType", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "languageCode": { + "type": "string", + "id": 2 + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 3 + } + } + }, + "DeleteEntityTypeRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dialogflow.googleapis.com/EntityType" + } + }, + "force": { + "type": "bool", + "id": 2 + } + } + }, + "Environments": { + "options": { + "(google.api.default_host)": "dialogflow.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflow" + }, + "methods": { + "ListEnvironments": { + "requestType": "ListEnvironmentsRequest", + "responseType": "ListEnvironmentsResponse", + "options": { + "(google.api.http).get": "/v3beta1/{parent=projects/*/locations/*/agents/*}/environments", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v3beta1/{parent=projects/*/locations/*/agents/*}/environments" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetEnvironment": { + "requestType": "GetEnvironmentRequest", + "responseType": "Environment", + "options": { + "(google.api.http).get": "/v3beta1/{name=projects/*/locations/*/agents/*/environments/*}", + "(google.api.method_signature)": "name" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v3beta1/{parent=projects/*/locations/*/agents/*}/entityTypes" + "get": "/v3beta1/{name=projects/*/locations/*/agents/*/environments/*}" } }, { - "(google.api.method_signature)": "parent" + "(google.api.method_signature)": "name" } ] }, - "GetEntityType": { - "requestType": "GetEntityTypeRequest", - "responseType": "EntityType", + "CreateEnvironment": { + "requestType": "CreateEnvironmentRequest", + "responseType": "google.longrunning.Operation", "options": { - "(google.api.http).get": "/v3beta1/{name=projects/*/locations/*/agents/*/entityTypes/*}", - "(google.api.method_signature)": "name" + "(google.api.http).post": "/v3beta1/{parent=projects/*/locations/*/agents/*}/environments", + "(google.api.http).body": "environment", + "(google.api.method_signature)": "parent,environment", + "(google.longrunning.operation_info).response_type": "Environment", + "(google.longrunning.operation_info).metadata_type": "google.protobuf.Struct" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v3beta1/{name=projects/*/locations/*/agents/*/entityTypes/*}" + "post": "/v3beta1/{parent=projects/*/locations/*/agents/*}/environments", + "body": "environment" } }, { - "(google.api.method_signature)": "name" + "(google.api.method_signature)": "parent,environment" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Environment", + "metadata_type": "google.protobuf.Struct" + } } ] }, - "CreateEntityType": { - "requestType": "CreateEntityTypeRequest", - "responseType": "EntityType", + "UpdateEnvironment": { + "requestType": "UpdateEnvironmentRequest", + "responseType": "google.longrunning.Operation", "options": { - "(google.api.http).post": "/v3beta1/{parent=projects/*/locations/*/agents/*}/entityTypes", - "(google.api.http).body": "entity_type", - "(google.api.method_signature)": "parent,entity_type" + "(google.api.http).patch": "/v3beta1/{environment.name=projects/*/locations/*/agents/*/environments/*}", + "(google.api.http).body": "environment", + "(google.api.method_signature)": "environment,update_mask", + "(google.longrunning.operation_info).response_type": "Environment", + "(google.longrunning.operation_info).metadata_type": "google.protobuf.Struct" }, "parsedOptions": [ { "(google.api.http)": { - "post": "/v3beta1/{parent=projects/*/locations/*/agents/*}/entityTypes", - "body": "entity_type" + "patch": "/v3beta1/{environment.name=projects/*/locations/*/agents/*/environments/*}", + "body": "environment" } }, { - "(google.api.method_signature)": "parent,entity_type" + "(google.api.method_signature)": "environment,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Environment", + "metadata_type": "google.protobuf.Struct" + } } ] }, - "UpdateEntityType": { - "requestType": "UpdateEntityTypeRequest", - "responseType": "EntityType", + "DeleteEnvironment": { + "requestType": "DeleteEnvironmentRequest", + "responseType": "google.protobuf.Empty", "options": { - "(google.api.http).patch": "/v3beta1/{entity_type.name=projects/*/locations/*/agents/*/entityTypes/*}", - "(google.api.http).body": "entity_type", - "(google.api.method_signature)": "entity_type,update_mask" + "(google.api.http).delete": "/v3beta1/{name=projects/*/locations/*/agents/*/environments/*}", + "(google.api.method_signature)": "name" }, "parsedOptions": [ { "(google.api.http)": { - "patch": "/v3beta1/{entity_type.name=projects/*/locations/*/agents/*/entityTypes/*}", - "body": "entity_type" + "delete": "/v3beta1/{name=projects/*/locations/*/agents/*/environments/*}" } }, { - "(google.api.method_signature)": "entity_type,update_mask" + "(google.api.method_signature)": "name" } ] }, - "DeleteEntityType": { - "requestType": "DeleteEntityTypeRequest", - "responseType": "google.protobuf.Empty", + "LookupEnvironmentHistory": { + "requestType": "LookupEnvironmentHistoryRequest", + "responseType": "LookupEnvironmentHistoryResponse", "options": { - "(google.api.http).delete": "/v3beta1/{name=projects/*/locations/*/agents/*/entityTypes/*}", + "(google.api.http).get": "/v3beta1/{name=projects/*/locations/*/agents/*/environments/*}:lookupEnvironmentHistory", "(google.api.method_signature)": "name" }, "parsedOptions": [ { "(google.api.http)": { - "delete": "/v3beta1/{name=projects/*/locations/*/agents/*/entityTypes/*}" + "get": "/v3beta1/{name=projects/*/locations/*/agents/*/environments/*}:lookupEnvironmentHistory" } }, { @@ -6578,10 +7403,10 @@ } } }, - "EntityType": { + "Environment": { "options": { - "(google.api.resource).type": "dialogflow.googleapis.com/EntityType", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/agents/{agent}/entityTypes/{entity_type}" + "(google.api.resource).type": "dialogflow.googleapis.com/Environment", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/agents/{agent}/environments/{environment}" }, "fields": { "name": { @@ -6595,108 +7420,66 @@ "(google.api.field_behavior)": "REQUIRED" } }, - "kind": { - "type": "Kind", - "id": 3, + "description": { + "type": "string", + "id": 3 + }, + "versionConfigs": { + "rule": "repeated", + "type": "VersionConfig", + "id": 6, "options": { "(google.api.field_behavior)": "REQUIRED" } }, - "autoExpansionMode": { - "type": "AutoExpansionMode", - "id": 4 - }, - "entities": { - "rule": "repeated", - "type": "Entity", - "id": 5 - }, - "excludedPhrases": { - "rule": "repeated", - "type": "ExcludedPhrase", - "id": 6 - }, - "enableFuzzyExtraction": { - "type": "bool", - "id": 7 + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } }, "nested": { - "Entity": { - "fields": { - "value": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "synonyms": { - "rule": "repeated", - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "ExcludedPhrase": { + "VersionConfig": { "fields": { - "value": { + "version": { "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dialogflow.googleapis.com/Version" } } } - }, - "Kind": { - "values": { - "KIND_UNSPECIFIED": 0, - "KIND_MAP": 1, - "KIND_LIST": 2, - "KIND_REGEXP": 3 - } - }, - "AutoExpansionMode": { - "values": { - "AUTO_EXPANSION_MODE_UNSPECIFIED": 0, - "AUTO_EXPANSION_MODE_DEFAULT": 1 - } } } }, - "ListEntityTypesRequest": { + "ListEnvironmentsRequest": { "fields": { "parent": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "dialogflow.googleapis.com/EntityType" + "(google.api.resource_reference).child_type": "dialogflow.googleapis.com/Environment" } }, - "languageCode": { - "type": "string", - "id": 2 - }, "pageSize": { "type": "int32", - "id": 3 + "id": 2 }, "pageToken": { "type": "string", - "id": 4 + "id": 3 } } }, - "ListEntityTypesResponse": { + "ListEnvironmentsResponse": { "fields": { - "entityTypes": { + "environments": { "rule": "repeated", - "type": "EntityType", + "type": "Environment", "id": 1 }, "nextPageToken": { @@ -6705,97 +7488,117 @@ } } }, - "GetEntityTypeRequest": { + "GetEnvironmentRequest": { "fields": { "name": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dialogflow.googleapis.com/EntityType" + "(google.api.resource_reference).type": "dialogflow.googleapis.com/Environment" } - }, - "languageCode": { - "type": "string", - "id": 2 } } }, - "CreateEntityTypeRequest": { + "CreateEnvironmentRequest": { "fields": { "parent": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "dialogflow.googleapis.com/EntityType" + "(google.api.resource_reference).child_type": "dialogflow.googleapis.com/Environment" } }, - "entityType": { - "type": "EntityType", + "environment": { + "type": "Environment", "id": 2, "options": { "(google.api.field_behavior)": "REQUIRED" } - }, - "languageCode": { - "type": "string", - "id": 3 } } }, - "UpdateEntityTypeRequest": { + "UpdateEnvironmentRequest": { "fields": { - "entityType": { - "type": "EntityType", + "environment": { + "type": "Environment", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED" } }, - "languageCode": { - "type": "string", - "id": 2 - }, "updateMask": { "type": "google.protobuf.FieldMask", - "id": 3 + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } } } }, - "DeleteEntityTypeRequest": { + "DeleteEnvironmentRequest": { "fields": { "name": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dialogflow.googleapis.com/EntityType" + "(google.api.resource_reference).type": "dialogflow.googleapis.com/Environment" + } + } + } + }, + "LookupEnvironmentHistoryRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dialogflow.googleapis.com/Environment" } }, - "force": { - "type": "bool", + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "LookupEnvironmentHistoryResponse": { + "fields": { + "environments": { + "rule": "repeated", + "type": "Environment", + "id": 1 + }, + "nextPageToken": { + "type": "string", "id": 2 } } }, - "Environments": { + "Experiments": { "options": { "(google.api.default_host)": "dialogflow.googleapis.com", "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflow" }, "methods": { - "ListEnvironments": { - "requestType": "ListEnvironmentsRequest", - "responseType": "ListEnvironmentsResponse", + "ListExperiments": { + "requestType": "ListExperimentsRequest", + "responseType": "ListExperimentsResponse", "options": { - "(google.api.http).get": "/v3beta1/{parent=projects/*/locations/*/agents/*}/environments", + "(google.api.http).get": "/v3beta1/{parent=projects/*/locations/*/agents/*/environments/*}/experiments", "(google.api.method_signature)": "parent" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v3beta1/{parent=projects/*/locations/*/agents/*}/environments" + "get": "/v3beta1/{parent=projects/*/locations/*/agents/*/environments/*}/experiments" } }, { @@ -6803,17 +7606,17 @@ } ] }, - "GetEnvironment": { - "requestType": "GetEnvironmentRequest", - "responseType": "Environment", + "GetExperiment": { + "requestType": "GetExperimentRequest", + "responseType": "Experiment", "options": { - "(google.api.http).get": "/v3beta1/{name=projects/*/locations/*/agents/*/environments/*}", + "(google.api.http).get": "/v3beta1/{name=projects/*/locations/*/agents/*/environments/*/experiments/*}", "(google.api.method_signature)": "name" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v3beta1/{name=projects/*/locations/*/agents/*/environments/*}" + "get": "/v3beta1/{name=projects/*/locations/*/agents/*/environments/*/experiments/*}" } }, { @@ -6821,73 +7624,77 @@ } ] }, - "CreateEnvironment": { - "requestType": "CreateEnvironmentRequest", - "responseType": "google.longrunning.Operation", + "CreateExperiment": { + "requestType": "CreateExperimentRequest", + "responseType": "Experiment", "options": { - "(google.api.http).post": "/v3beta1/{parent=projects/*/locations/*/agents/*}/environments", - "(google.api.http).body": "environment", - "(google.api.method_signature)": "parent,environment", - "(google.longrunning.operation_info).response_type": "Environment", - "(google.longrunning.operation_info).metadata_type": "google.protobuf.Struct" + "(google.api.http).post": "/v3beta1/{parent=projects/*/locations/*/agents/*/environments/*}/experiments", + "(google.api.http).body": "experiment", + "(google.api.method_signature)": "parent,experiment" }, "parsedOptions": [ { "(google.api.http)": { - "post": "/v3beta1/{parent=projects/*/locations/*/agents/*}/environments", - "body": "environment" + "post": "/v3beta1/{parent=projects/*/locations/*/agents/*/environments/*}/experiments", + "body": "experiment" } }, { - "(google.api.method_signature)": "parent,environment" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "Environment", - "metadata_type": "google.protobuf.Struct" - } + "(google.api.method_signature)": "parent,experiment" } ] }, - "UpdateEnvironment": { - "requestType": "UpdateEnvironmentRequest", - "responseType": "google.longrunning.Operation", + "UpdateExperiment": { + "requestType": "UpdateExperimentRequest", + "responseType": "Experiment", "options": { - "(google.api.http).patch": "/v3beta1/{environment.name=projects/*/locations/*/agents/*/environments/*}", - "(google.api.http).body": "environment", - "(google.api.method_signature)": "environment,update_mask", - "(google.longrunning.operation_info).response_type": "Environment", - "(google.longrunning.operation_info).metadata_type": "google.protobuf.Struct" + "(google.api.http).patch": "/v3beta1/{experiment.name=projects/*/locations/*/agents/*/environments/*/experiments/*}", + "(google.api.http).body": "experiment", + "(google.api.method_signature)": "experiment,update_mask" }, "parsedOptions": [ { "(google.api.http)": { - "patch": "/v3beta1/{environment.name=projects/*/locations/*/agents/*/environments/*}", - "body": "environment" + "patch": "/v3beta1/{experiment.name=projects/*/locations/*/agents/*/environments/*/experiments/*}", + "body": "experiment" } }, { - "(google.api.method_signature)": "environment,update_mask" - }, + "(google.api.method_signature)": "experiment,update_mask" + } + ] + }, + "DeleteExperiment": { + "requestType": "DeleteExperimentRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v3beta1/{name=projects/*/locations/*/agents/*/environments/*/experiments/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ { - "(google.longrunning.operation_info)": { - "response_type": "Environment", - "metadata_type": "google.protobuf.Struct" + "(google.api.http)": { + "delete": "/v3beta1/{name=projects/*/locations/*/agents/*/environments/*/experiments/*}" } + }, + { + "(google.api.method_signature)": "name" } ] }, - "DeleteEnvironment": { - "requestType": "DeleteEnvironmentRequest", - "responseType": "google.protobuf.Empty", + "StartExperiment": { + "requestType": "StartExperimentRequest", + "responseType": "Experiment", "options": { - "(google.api.http).delete": "/v3beta1/{name=projects/*/locations/*/agents/*/environments/*}", + "(google.api.http).post": "/v3beta1/{name=projects/*/locations/*/agents/*/environments/*/experiments/*}:start", + "(google.api.http).body": "*", "(google.api.method_signature)": "name" }, "parsedOptions": [ { "(google.api.http)": { - "delete": "/v3beta1/{name=projects/*/locations/*/agents/*/environments/*}" + "post": "/v3beta1/{name=projects/*/locations/*/agents/*/environments/*/experiments/*}:start", + "body": "*" } }, { @@ -6895,17 +7702,19 @@ } ] }, - "LookupEnvironmentHistory": { - "requestType": "LookupEnvironmentHistoryRequest", - "responseType": "LookupEnvironmentHistoryResponse", + "StopExperiment": { + "requestType": "StopExperimentRequest", + "responseType": "Experiment", "options": { - "(google.api.http).get": "/v3beta1/{name=projects/*/locations/*/agents/*/environments/*}:lookupEnvironmentHistory", + "(google.api.http).post": "/v3beta1/{name=projects/*/locations/*/agents/*/environments/*/experiments/*}:stop", + "(google.api.http).body": "*", "(google.api.method_signature)": "name" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v3beta1/{name=projects/*/locations/*/agents/*/environments/*}:lookupEnvironmentHistory" + "post": "/v3beta1/{name=projects/*/locations/*/agents/*/environments/*/experiments/*}:stop", + "body": "*" } }, { @@ -6915,10 +7724,10 @@ } } }, - "Environment": { + "Experiment": { "options": { - "(google.api.resource).type": "dialogflow.googleapis.com/Environment", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/agents/{agent}/environments/{environment}" + "(google.api.resource).type": "dialogflow.googleapis.com/Experiment", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/experiments/{experiment}" }, "fields": { "name": { @@ -6936,45 +7745,216 @@ "type": "string", "id": 3 }, - "versionConfigs": { + "state": { + "type": "State", + "id": 4 + }, + "definition": { + "type": "Definition", + "id": 5 + }, + "result": { + "type": "Result", + "id": 6 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 7 + }, + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 8 + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 9 + }, + "lastUpdateTime": { + "type": "google.protobuf.Timestamp", + "id": 10 + }, + "experimentLength": { + "type": "google.protobuf.Duration", + "id": 11 + }, + "variantsHistory": { "rule": "repeated", - "type": "VersionConfig", - "id": 6, - "options": { - "(google.api.field_behavior)": "REQUIRED" + "type": "VariantsHistory", + "id": 12 + } + }, + "nested": { + "Definition": { + "oneofs": { + "variants": { + "oneof": [ + "versionVariants" + ] + } + }, + "fields": { + "condition": { + "type": "string", + "id": 1 + }, + "versionVariants": { + "type": "VersionVariants", + "id": 2 + } } }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "Result": { + "fields": { + "versionMetrics": { + "rule": "repeated", + "type": "VersionMetrics", + "id": 1 + }, + "lastUpdateTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + } + }, + "nested": { + "ConfidenceInterval": { + "fields": { + "confidenceLevel": { + "type": "double", + "id": 1 + }, + "ratio": { + "type": "double", + "id": 2 + }, + "lowerBound": { + "type": "double", + "id": 3 + }, + "upperBound": { + "type": "double", + "id": 4 + } + } + }, + "Metric": { + "oneofs": { + "value": { + "oneof": [ + "ratio" + ] + } + }, + "fields": { + "type": { + "type": "MetricType", + "id": 1 + }, + "ratio": { + "type": "double", + "id": 2 + }, + "confidenceInterval": { + "type": "ConfidenceInterval", + "id": 3 + } + } + }, + "VersionMetrics": { + "fields": { + "version": { + "type": "string", + "id": 1, + "options": { + "(google.api.resource_reference).type": "dialogflow.googleapis.com/Version" + } + }, + "metrics": { + "rule": "repeated", + "type": "Metric", + "id": 2 + }, + "sessionCount": { + "type": "int32", + "id": 3 + } + } + }, + "MetricType": { + "values": { + "METRIC_UNSPECIFIED": 0, + "CONTAINED_SESSION_NO_CALLBACK_RATE": 1, + "LIVE_AGENT_HANDOFF_RATE": 2, + "CALLBACK_SESSION_RATE": 3, + "ABANDONED_SESSION_RATE": 4, + "SESSION_END_RATE": 5 + } + } + } + }, + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "DRAFT": 1, + "RUNNING": 2, + "DONE": 3 } } + } + }, + "VersionVariants": { + "fields": { + "variants": { + "rule": "repeated", + "type": "Variant", + "id": 1 + } }, "nested": { - "VersionConfig": { + "Variant": { "fields": { "version": { "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dialogflow.googleapis.com/Version" - } + "id": 1 + }, + "trafficAllocation": { + "type": "float", + "id": 2 + }, + "isControlGroup": { + "type": "bool", + "id": 3 } } } } }, - "ListEnvironmentsRequest": { + "VariantsHistory": { + "oneofs": { + "variants": { + "oneof": [ + "versionVariants" + ] + } + }, + "fields": { + "versionVariants": { + "type": "VersionVariants", + "id": 1 + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + } + } + }, + "ListExperimentsRequest": { "fields": { "parent": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "dialogflow.googleapis.com/Environment" + "(google.api.resource_reference).child_type": "dialogflow.googleapis.com/Experiment" } }, "pageSize": { @@ -6987,11 +7967,11 @@ } } }, - "ListEnvironmentsResponse": { + "ListExperimentsResponse": { "fields": { - "environments": { + "experiments": { "rule": "repeated", - "type": "Environment", + "type": "Experiment", "id": 1 }, "nextPageToken": { @@ -7000,30 +7980,30 @@ } } }, - "GetEnvironmentRequest": { + "GetExperimentRequest": { "fields": { "name": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dialogflow.googleapis.com/Environment" + "(google.api.resource_reference).type": "dialogflow.googleapis.com/Experiment" } } } }, - "CreateEnvironmentRequest": { + "CreateExperimentRequest": { "fields": { "parent": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "dialogflow.googleapis.com/Environment" + "(google.api.resource_reference).child_type": "dialogflow.googleapis.com/Experiment" } }, - "environment": { - "type": "Environment", + "experiment": { + "type": "Experiment", "id": 2, "options": { "(google.api.field_behavior)": "REQUIRED" @@ -7031,10 +8011,10 @@ } } }, - "UpdateEnvironmentRequest": { + "UpdateExperimentRequest": { "fields": { - "environment": { - "type": "Environment", + "experiment": { + "type": "Experiment", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED" @@ -7049,48 +8029,39 @@ } } }, - "DeleteEnvironmentRequest": { + "DeleteExperimentRequest": { "fields": { "name": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dialogflow.googleapis.com/Environment" + "(google.api.resource_reference).type": "dialogflow.googleapis.com/Experiment" } } } }, - "LookupEnvironmentHistoryRequest": { + "StartExperimentRequest": { "fields": { "name": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dialogflow.googleapis.com/Environment" + "(google.api.resource_reference).type": "dialogflow.googleapis.com/Experiment" } - }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3 } } }, - "LookupEnvironmentHistoryResponse": { + "StopExperimentRequest": { "fields": { - "environments": { - "rule": "repeated", - "type": "Environment", - "id": 1 - }, - "nextPageToken": { + "name": { "type": "string", - "id": 2 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dialogflow.googleapis.com/Experiment" + } } } }, @@ -9484,6 +10455,11 @@ "singular": { "type": "string", "id": 6 + }, + "style": { + "rule": "repeated", + "type": "Style", + "id": 10 } }, "nested": { @@ -9493,6 +10469,12 @@ "ORIGINALLY_SINGLE_PATTERN": 1, "FUTURE_MULTI_PATTERN": 2 } + }, + "Style": { + "values": { + "STYLE_UNSPECIFIED": 0, + "DECLARATIVE_FRIENDLY": 1 + } } } }, @@ -9512,7 +10494,7 @@ }, "protobuf": { "options": { - "go_package": "github.com/golang/protobuf/protoc-gen-go/descriptor;descriptor", + "go_package": "google.golang.org/protobuf/types/descriptorpb", "java_package": "com.google.protobuf", "java_outer_classname": "DescriptorProtos", "csharp_namespace": "Google.Protobuf.Reflection", diff --git a/src/index.ts b/src/index.ts index 591c5f6a..9c5636de 100644 --- a/src/index.ts +++ b/src/index.ts @@ -25,6 +25,8 @@ const EntityTypesClient = v3.EntityTypesClient; type EntityTypesClient = v3.EntityTypesClient; const EnvironmentsClient = v3.EnvironmentsClient; type EnvironmentsClient = v3.EnvironmentsClient; +const ExperimentsClient = v3.ExperimentsClient; +type ExperimentsClient = v3.ExperimentsClient; const FlowsClient = v3.FlowsClient; type FlowsClient = v3.FlowsClient; const IntentsClient = v3.IntentsClient; @@ -50,6 +52,7 @@ export { AgentsClient, EntityTypesClient, EnvironmentsClient, + ExperimentsClient, FlowsClient, IntentsClient, PagesClient, @@ -66,6 +69,7 @@ export default { AgentsClient, EntityTypesClient, EnvironmentsClient, + ExperimentsClient, FlowsClient, IntentsClient, PagesClient, diff --git a/src/v3/agents_client.ts b/src/v3/agents_client.ts index b8cfb860..b3b974ba 100644 --- a/src/v3/agents_client.ts +++ b/src/v3/agents_client.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -177,6 +177,9 @@ export class AgentsClient { environmentPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}' ), + experimentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/experiments/{experiment}' + ), flowPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}' ), @@ -1468,6 +1471,92 @@ export class AgentsClient { .environment; } + /** + * Return a fully-qualified experiment resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} environment + * @param {string} experiment + * @returns {string} Resource name string. + */ + experimentPath( + project: string, + location: string, + agent: string, + environment: string, + experiment: string + ) { + return this.pathTemplates.experimentPathTemplate.render({ + project: project, + location: location, + agent: agent, + environment: environment, + experiment: experiment, + }); + } + + /** + * Parse the project from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the project. + */ + matchProjectFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .project; + } + + /** + * Parse the location from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the location. + */ + matchLocationFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .location; + } + + /** + * Parse the agent from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .agent; + } + + /** + * Parse the environment from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .environment; + } + + /** + * Parse the experiment from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the experiment. + */ + matchExperimentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .experiment; + } + /** * Return a fully-qualified flow resource name string. * diff --git a/src/v3/agents_proto_list.json b/src/v3/agents_proto_list.json index 622b657f..99c9f9da 100644 --- a/src/v3/agents_proto_list.json +++ b/src/v3/agents_proto_list.json @@ -3,6 +3,7 @@ "../../protos/google/cloud/dialogflow/cx/v3/audio_config.proto", "../../protos/google/cloud/dialogflow/cx/v3/entity_type.proto", "../../protos/google/cloud/dialogflow/cx/v3/environment.proto", + "../../protos/google/cloud/dialogflow/cx/v3/experiment.proto", "../../protos/google/cloud/dialogflow/cx/v3/flow.proto", "../../protos/google/cloud/dialogflow/cx/v3/fulfillment.proto", "../../protos/google/cloud/dialogflow/cx/v3/intent.proto", diff --git a/src/v3/entity_types_client.ts b/src/v3/entity_types_client.ts index 8258570e..d65d865b 100644 --- a/src/v3/entity_types_client.ts +++ b/src/v3/entity_types_client.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -175,6 +175,9 @@ export class EntityTypesClient { environmentPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}' ), + experimentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/experiments/{experiment}' + ), flowPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}' ), @@ -1216,6 +1219,92 @@ export class EntityTypesClient { .environment; } + /** + * Return a fully-qualified experiment resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} environment + * @param {string} experiment + * @returns {string} Resource name string. + */ + experimentPath( + project: string, + location: string, + agent: string, + environment: string, + experiment: string + ) { + return this.pathTemplates.experimentPathTemplate.render({ + project: project, + location: location, + agent: agent, + environment: environment, + experiment: experiment, + }); + } + + /** + * Parse the project from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the project. + */ + matchProjectFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .project; + } + + /** + * Parse the location from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the location. + */ + matchLocationFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .location; + } + + /** + * Parse the agent from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .agent; + } + + /** + * Parse the environment from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .environment; + } + + /** + * Parse the experiment from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the experiment. + */ + matchExperimentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .experiment; + } + /** * Return a fully-qualified flow resource name string. * diff --git a/src/v3/entity_types_proto_list.json b/src/v3/entity_types_proto_list.json index 622b657f..99c9f9da 100644 --- a/src/v3/entity_types_proto_list.json +++ b/src/v3/entity_types_proto_list.json @@ -3,6 +3,7 @@ "../../protos/google/cloud/dialogflow/cx/v3/audio_config.proto", "../../protos/google/cloud/dialogflow/cx/v3/entity_type.proto", "../../protos/google/cloud/dialogflow/cx/v3/environment.proto", + "../../protos/google/cloud/dialogflow/cx/v3/experiment.proto", "../../protos/google/cloud/dialogflow/cx/v3/flow.proto", "../../protos/google/cloud/dialogflow/cx/v3/fulfillment.proto", "../../protos/google/cloud/dialogflow/cx/v3/intent.proto", diff --git a/src/v3/environments_client.ts b/src/v3/environments_client.ts index 006aa398..784b5c1f 100644 --- a/src/v3/environments_client.ts +++ b/src/v3/environments_client.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -177,6 +177,9 @@ export class EnvironmentsClient { environmentPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}' ), + experimentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/experiments/{experiment}' + ), flowPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}' ), @@ -1495,6 +1498,92 @@ export class EnvironmentsClient { .environment; } + /** + * Return a fully-qualified experiment resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} environment + * @param {string} experiment + * @returns {string} Resource name string. + */ + experimentPath( + project: string, + location: string, + agent: string, + environment: string, + experiment: string + ) { + return this.pathTemplates.experimentPathTemplate.render({ + project: project, + location: location, + agent: agent, + environment: environment, + experiment: experiment, + }); + } + + /** + * Parse the project from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the project. + */ + matchProjectFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .project; + } + + /** + * Parse the location from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the location. + */ + matchLocationFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .location; + } + + /** + * Parse the agent from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .agent; + } + + /** + * Parse the environment from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .environment; + } + + /** + * Parse the experiment from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the experiment. + */ + matchExperimentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .experiment; + } + /** * Return a fully-qualified flow resource name string. * diff --git a/src/v3/environments_proto_list.json b/src/v3/environments_proto_list.json index 622b657f..99c9f9da 100644 --- a/src/v3/environments_proto_list.json +++ b/src/v3/environments_proto_list.json @@ -3,6 +3,7 @@ "../../protos/google/cloud/dialogflow/cx/v3/audio_config.proto", "../../protos/google/cloud/dialogflow/cx/v3/entity_type.proto", "../../protos/google/cloud/dialogflow/cx/v3/environment.proto", + "../../protos/google/cloud/dialogflow/cx/v3/experiment.proto", "../../protos/google/cloud/dialogflow/cx/v3/flow.proto", "../../protos/google/cloud/dialogflow/cx/v3/fulfillment.proto", "../../protos/google/cloud/dialogflow/cx/v3/intent.proto", diff --git a/src/v3/experiments_client.ts b/src/v3/experiments_client.ts new file mode 100644 index 00000000..d336bf0b --- /dev/null +++ b/src/v3/experiments_client.ts @@ -0,0 +1,2221 @@ +// Copyright 2021 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import * as gax from 'google-gax'; +import { + Callback, + CallOptions, + Descriptors, + ClientOptions, + PaginationCallback, + GaxCall, +} from 'google-gax'; +import * as path from 'path'; + +import {Transform} from 'stream'; +import {RequestType} from 'google-gax/build/src/apitypes'; +import * as protos from '../../protos/protos'; +/** + * Client JSON configuration object, loaded from + * `src/v3/experiments_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './experiments_client_config.json'; + +const version = require('../../../package.json').version; + +/** + * Service for managing {@link google.cloud.dialogflow.cx.v3.Experiment|Experiments}. + * @class + * @memberof v3 + */ +export class ExperimentsClient { + private _terminated = false; + private _opts: ClientOptions; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + innerApiCalls: {[name: string]: Function}; + pathTemplates: {[name: string]: gax.PathTemplate}; + experimentsStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of ExperimentsClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP fallback mode. + * In fallback mode, a special browser-compatible transport implementation is used + * instead of gRPC transport. In browser context (if the `window` object is defined) + * the fallback mode is enabled automatically; set `options.fallback` to `false` + * if you need to override this behavior. + */ + constructor(opts?: ClientOptions) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof ExperimentsClient; + const servicePath = + opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = + opts?.fallback ?? + (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gax.fallback : gax; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = this._gaxGrpc.auth as gax.GoogleAuth; + + // Set the default scopes in auth client if needed. + if (servicePath === staticMembers.servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; + if (typeof process !== 'undefined' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + // For Node.js, pass the path to JSON proto file. + // For browsers, pass the JSON content. + + const nodejsProtoPath = path.join( + __dirname, + '..', + '..', + 'protos', + 'protos.json' + ); + this._protos = this._gaxGrpc.loadProto( + opts.fallback + ? // eslint-disable-next-line @typescript-eslint/no-var-requires + require('../../protos/protos.json') + : nodejsProtoPath + ); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + agentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}' + ), + entityTypePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/entityTypes/{entity_type}' + ), + environmentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}' + ), + experimentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/experiments/{experiment}' + ), + flowPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}' + ), + intentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/intents/{intent}' + ), + locationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}' + ), + pagePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/pages/{page}' + ), + projectPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}' + ), + projectLocationAgentEnvironmentSessionEntityTypePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/sessions/{session}/entityTypes/{entity_type}' + ), + projectLocationAgentSessionEntityTypePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/sessions/{session}/entityTypes/{entity_type}' + ), + securitySettingsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/securitySettings/{security_settings}' + ), + transitionRouteGroupPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/transitionRouteGroups/{transition_route_group}' + ), + versionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/versions/{version}' + ), + webhookPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/webhooks/{webhook}' + ), + }; + + // Some of the methods on this service return "paged" results, + // (e.g. 50 results at a time, with tokens to get subsequent + // pages). Denote the keys used for pagination and results. + this.descriptors.page = { + listExperiments: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'experiments' + ), + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.dialogflow.cx.v3.Experiments', + gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, + {'x-goog-api-client': clientHeader.join(' ')} + ); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.experimentsStub) { + return this.experimentsStub; + } + + // Put together the "service stub" for + // google.cloud.dialogflow.cx.v3.Experiments. + this.experimentsStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.cloud.dialogflow.cx.v3.Experiments' + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.dialogflow.cx.v3.Experiments, + this._opts + ) as Promise<{[method: string]: Function}>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const experimentsStubMethods = [ + 'listExperiments', + 'getExperiment', + 'createExperiment', + 'updateExperiment', + 'deleteExperiment', + 'startExperiment', + 'stopExperiment', + ]; + for (const methodName of experimentsStubMethods) { + const callPromise = this.experimentsStub.then( + stub => (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error | null | undefined) => () => { + throw err; + } + ); + + const descriptor = this.descriptors.page[methodName] || undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.experimentsStub; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + return 'dialogflow.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + return 'dialogflow.googleapis.com'; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/dialogflow', + ]; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId( + callback?: Callback + ): Promise | void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- + getExperiment( + request: protos.google.cloud.dialogflow.cx.v3.IGetExperimentRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dialogflow.cx.v3.IExperiment, + protos.google.cloud.dialogflow.cx.v3.IGetExperimentRequest | undefined, + {} | undefined + ] + >; + getExperiment( + request: protos.google.cloud.dialogflow.cx.v3.IGetExperimentRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dialogflow.cx.v3.IExperiment, + | protos.google.cloud.dialogflow.cx.v3.IGetExperimentRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getExperiment( + request: protos.google.cloud.dialogflow.cx.v3.IGetExperimentRequest, + callback: Callback< + protos.google.cloud.dialogflow.cx.v3.IExperiment, + | protos.google.cloud.dialogflow.cx.v3.IGetExperimentRequest + | null + | undefined, + {} | null | undefined + > + ): void; + /** + * Retrieves the specified {@link google.cloud.dialogflow.cx.v3.Experiment|Experiment}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the {@link google.cloud.dialogflow.cx.v3.Environment|Environment}. + * Format: `projects//locations//agents//environments//experiments/`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Experiment]{@link google.cloud.dialogflow.cx.v3.Experiment}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.getExperiment(request); + */ + getExperiment( + request: protos.google.cloud.dialogflow.cx.v3.IGetExperimentRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dialogflow.cx.v3.IExperiment, + | protos.google.cloud.dialogflow.cx.v3.IGetExperimentRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dialogflow.cx.v3.IExperiment, + | protos.google.cloud.dialogflow.cx.v3.IGetExperimentRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dialogflow.cx.v3.IExperiment, + protos.google.cloud.dialogflow.cx.v3.IGetExperimentRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.getExperiment(request, options, callback); + } + createExperiment( + request: protos.google.cloud.dialogflow.cx.v3.ICreateExperimentRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dialogflow.cx.v3.IExperiment, + protos.google.cloud.dialogflow.cx.v3.ICreateExperimentRequest | undefined, + {} | undefined + ] + >; + createExperiment( + request: protos.google.cloud.dialogflow.cx.v3.ICreateExperimentRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dialogflow.cx.v3.IExperiment, + | protos.google.cloud.dialogflow.cx.v3.ICreateExperimentRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createExperiment( + request: protos.google.cloud.dialogflow.cx.v3.ICreateExperimentRequest, + callback: Callback< + protos.google.cloud.dialogflow.cx.v3.IExperiment, + | protos.google.cloud.dialogflow.cx.v3.ICreateExperimentRequest + | null + | undefined, + {} | null | undefined + > + ): void; + /** + * Creates an {@link google.cloud.dialogflow.cx.v3.Experiment|Experiment} in the specified {@link google.cloud.dialogflow.cx.v3.Environment|Environment}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The {@link google.cloud.dialogflow.cx.v3.Agent|Agent} to create an {@link google.cloud.dialogflow.cx.v3.Environment|Environment} for. + * Format: `projects//locations//agents//environments/`. + * @param {google.cloud.dialogflow.cx.v3.Experiment} request.experiment + * Required. The experiment to create. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Experiment]{@link google.cloud.dialogflow.cx.v3.Experiment}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.createExperiment(request); + */ + createExperiment( + request: protos.google.cloud.dialogflow.cx.v3.ICreateExperimentRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dialogflow.cx.v3.IExperiment, + | protos.google.cloud.dialogflow.cx.v3.ICreateExperimentRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dialogflow.cx.v3.IExperiment, + | protos.google.cloud.dialogflow.cx.v3.ICreateExperimentRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dialogflow.cx.v3.IExperiment, + protos.google.cloud.dialogflow.cx.v3.ICreateExperimentRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.createExperiment(request, options, callback); + } + updateExperiment( + request: protos.google.cloud.dialogflow.cx.v3.IUpdateExperimentRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dialogflow.cx.v3.IExperiment, + protos.google.cloud.dialogflow.cx.v3.IUpdateExperimentRequest | undefined, + {} | undefined + ] + >; + updateExperiment( + request: protos.google.cloud.dialogflow.cx.v3.IUpdateExperimentRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dialogflow.cx.v3.IExperiment, + | protos.google.cloud.dialogflow.cx.v3.IUpdateExperimentRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateExperiment( + request: protos.google.cloud.dialogflow.cx.v3.IUpdateExperimentRequest, + callback: Callback< + protos.google.cloud.dialogflow.cx.v3.IExperiment, + | protos.google.cloud.dialogflow.cx.v3.IUpdateExperimentRequest + | null + | undefined, + {} | null | undefined + > + ): void; + /** + * Updates the specified {@link google.cloud.dialogflow.cx.v3.Experiment|Experiment}. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.dialogflow.cx.v3.Experiment} request.experiment + * Required. The experiment to update. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. The mask to control which fields get updated. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Experiment]{@link google.cloud.dialogflow.cx.v3.Experiment}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.updateExperiment(request); + */ + updateExperiment( + request: protos.google.cloud.dialogflow.cx.v3.IUpdateExperimentRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dialogflow.cx.v3.IExperiment, + | protos.google.cloud.dialogflow.cx.v3.IUpdateExperimentRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dialogflow.cx.v3.IExperiment, + | protos.google.cloud.dialogflow.cx.v3.IUpdateExperimentRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dialogflow.cx.v3.IExperiment, + protos.google.cloud.dialogflow.cx.v3.IUpdateExperimentRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + 'experiment.name': request.experiment!.name || '', + }); + this.initialize(); + return this.innerApiCalls.updateExperiment(request, options, callback); + } + deleteExperiment( + request: protos.google.cloud.dialogflow.cx.v3.IDeleteExperimentRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.dialogflow.cx.v3.IDeleteExperimentRequest | undefined, + {} | undefined + ] + >; + deleteExperiment( + request: protos.google.cloud.dialogflow.cx.v3.IDeleteExperimentRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dialogflow.cx.v3.IDeleteExperimentRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteExperiment( + request: protos.google.cloud.dialogflow.cx.v3.IDeleteExperimentRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dialogflow.cx.v3.IDeleteExperimentRequest + | null + | undefined, + {} | null | undefined + > + ): void; + /** + * Deletes the specified {@link google.cloud.dialogflow.cx.v3.Experiment|Experiment}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the {@link google.cloud.dialogflow.cx.v3.Environment|Environment} to delete. + * Format: `projects//locations//agents//environments//experiments/`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.deleteExperiment(request); + */ + deleteExperiment( + request: protos.google.cloud.dialogflow.cx.v3.IDeleteExperimentRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dialogflow.cx.v3.IDeleteExperimentRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dialogflow.cx.v3.IDeleteExperimentRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.dialogflow.cx.v3.IDeleteExperimentRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.deleteExperiment(request, options, callback); + } + startExperiment( + request: protos.google.cloud.dialogflow.cx.v3.IStartExperimentRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dialogflow.cx.v3.IExperiment, + protos.google.cloud.dialogflow.cx.v3.IStartExperimentRequest | undefined, + {} | undefined + ] + >; + startExperiment( + request: protos.google.cloud.dialogflow.cx.v3.IStartExperimentRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dialogflow.cx.v3.IExperiment, + | protos.google.cloud.dialogflow.cx.v3.IStartExperimentRequest + | null + | undefined, + {} | null | undefined + > + ): void; + startExperiment( + request: protos.google.cloud.dialogflow.cx.v3.IStartExperimentRequest, + callback: Callback< + protos.google.cloud.dialogflow.cx.v3.IExperiment, + | protos.google.cloud.dialogflow.cx.v3.IStartExperimentRequest + | null + | undefined, + {} | null | undefined + > + ): void; + /** + * Starts the specified {@link google.cloud.dialogflow.cx.v3.Experiment|Experiment}. This rpc only changes the state of + * experiment from PENDING to RUNNING. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Resource name of the experiment to start. + * Format: `projects//locations//agents//environments//experiments/`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Experiment]{@link google.cloud.dialogflow.cx.v3.Experiment}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.startExperiment(request); + */ + startExperiment( + request: protos.google.cloud.dialogflow.cx.v3.IStartExperimentRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dialogflow.cx.v3.IExperiment, + | protos.google.cloud.dialogflow.cx.v3.IStartExperimentRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dialogflow.cx.v3.IExperiment, + | protos.google.cloud.dialogflow.cx.v3.IStartExperimentRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dialogflow.cx.v3.IExperiment, + protos.google.cloud.dialogflow.cx.v3.IStartExperimentRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.startExperiment(request, options, callback); + } + stopExperiment( + request: protos.google.cloud.dialogflow.cx.v3.IStopExperimentRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dialogflow.cx.v3.IExperiment, + protos.google.cloud.dialogflow.cx.v3.IStopExperimentRequest | undefined, + {} | undefined + ] + >; + stopExperiment( + request: protos.google.cloud.dialogflow.cx.v3.IStopExperimentRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dialogflow.cx.v3.IExperiment, + | protos.google.cloud.dialogflow.cx.v3.IStopExperimentRequest + | null + | undefined, + {} | null | undefined + > + ): void; + stopExperiment( + request: protos.google.cloud.dialogflow.cx.v3.IStopExperimentRequest, + callback: Callback< + protos.google.cloud.dialogflow.cx.v3.IExperiment, + | protos.google.cloud.dialogflow.cx.v3.IStopExperimentRequest + | null + | undefined, + {} | null | undefined + > + ): void; + /** + * Stops the specified {@link google.cloud.dialogflow.cx.v3.Experiment|Experiment}. This rpc only changes the state of + * experiment from RUNNING to DONE. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Resource name of the experiment to stop. + * Format: `projects//locations//agents//environments//experiments/`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Experiment]{@link google.cloud.dialogflow.cx.v3.Experiment}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.stopExperiment(request); + */ + stopExperiment( + request: protos.google.cloud.dialogflow.cx.v3.IStopExperimentRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dialogflow.cx.v3.IExperiment, + | protos.google.cloud.dialogflow.cx.v3.IStopExperimentRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dialogflow.cx.v3.IExperiment, + | protos.google.cloud.dialogflow.cx.v3.IStopExperimentRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dialogflow.cx.v3.IExperiment, + protos.google.cloud.dialogflow.cx.v3.IStopExperimentRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.stopExperiment(request, options, callback); + } + + listExperiments( + request: protos.google.cloud.dialogflow.cx.v3.IListExperimentsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dialogflow.cx.v3.IExperiment[], + protos.google.cloud.dialogflow.cx.v3.IListExperimentsRequest | null, + protos.google.cloud.dialogflow.cx.v3.IListExperimentsResponse + ] + >; + listExperiments( + request: protos.google.cloud.dialogflow.cx.v3.IListExperimentsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dialogflow.cx.v3.IListExperimentsRequest, + | protos.google.cloud.dialogflow.cx.v3.IListExperimentsResponse + | null + | undefined, + protos.google.cloud.dialogflow.cx.v3.IExperiment + > + ): void; + listExperiments( + request: protos.google.cloud.dialogflow.cx.v3.IListExperimentsRequest, + callback: PaginationCallback< + protos.google.cloud.dialogflow.cx.v3.IListExperimentsRequest, + | protos.google.cloud.dialogflow.cx.v3.IListExperimentsResponse + | null + | undefined, + protos.google.cloud.dialogflow.cx.v3.IExperiment + > + ): void; + /** + * Returns the list of all experiments in the specified {@link google.cloud.dialogflow.cx.v3.Environment|Environment}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The {@link google.cloud.dialogflow.cx.v3.Environment|Environment} to list all environments for. + * Format: `projects//locations//agents//environments/`. + * @param {number} request.pageSize + * The maximum number of items to return in a single page. By default 20 and + * at most 100. + * @param {string} request.pageToken + * The next_page_token value returned from a previous list request. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [Experiment]{@link google.cloud.dialogflow.cx.v3.Experiment}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listExperimentsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listExperiments( + request: protos.google.cloud.dialogflow.cx.v3.IListExperimentsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.dialogflow.cx.v3.IListExperimentsRequest, + | protos.google.cloud.dialogflow.cx.v3.IListExperimentsResponse + | null + | undefined, + protos.google.cloud.dialogflow.cx.v3.IExperiment + >, + callback?: PaginationCallback< + protos.google.cloud.dialogflow.cx.v3.IListExperimentsRequest, + | protos.google.cloud.dialogflow.cx.v3.IListExperimentsResponse + | null + | undefined, + protos.google.cloud.dialogflow.cx.v3.IExperiment + > + ): Promise< + [ + protos.google.cloud.dialogflow.cx.v3.IExperiment[], + protos.google.cloud.dialogflow.cx.v3.IListExperimentsRequest | null, + protos.google.cloud.dialogflow.cx.v3.IListExperimentsResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.listExperiments(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The {@link google.cloud.dialogflow.cx.v3.Environment|Environment} to list all environments for. + * Format: `projects//locations//agents//environments/`. + * @param {number} request.pageSize + * The maximum number of items to return in a single page. By default 20 and + * at most 100. + * @param {string} request.pageToken + * The next_page_token value returned from a previous list request. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing [Experiment]{@link google.cloud.dialogflow.cx.v3.Experiment} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listExperimentsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listExperimentsStream( + request?: protos.google.cloud.dialogflow.cx.v3.IListExperimentsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const callSettings = new gax.CallSettings(options); + this.initialize(); + return this.descriptors.page.listExperiments.createStream( + this.innerApiCalls.listExperiments as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listExperiments`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The {@link google.cloud.dialogflow.cx.v3.Environment|Environment} to list all environments for. + * Format: `projects//locations//agents//environments/`. + * @param {number} request.pageSize + * The maximum number of items to return in a single page. By default 20 and + * at most 100. + * @param {string} request.pageToken + * The next_page_token value returned from a previous list request. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [Experiment]{@link google.cloud.dialogflow.cx.v3.Experiment}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example + * const iterable = client.listExperimentsAsync(request); + * for await (const response of iterable) { + * // process response + * } + */ + listExperimentsAsync( + request?: protos.google.cloud.dialogflow.cx.v3.IListExperimentsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + options = options || {}; + const callSettings = new gax.CallSettings(options); + this.initialize(); + return this.descriptors.page.listExperiments.asyncIterate( + this.innerApiCalls['listExperiments'] as GaxCall, + (request as unknown) as RequestType, + callSettings + ) as AsyncIterable; + } + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified agent resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @returns {string} Resource name string. + */ + agentPath(project: string, location: string, agent: string) { + return this.pathTemplates.agentPathTemplate.render({ + project: project, + location: location, + agent: agent, + }); + } + + /** + * Parse the project from Agent resource. + * + * @param {string} agentName + * A fully-qualified path representing Agent resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAgentName(agentName: string) { + return this.pathTemplates.agentPathTemplate.match(agentName).project; + } + + /** + * Parse the location from Agent resource. + * + * @param {string} agentName + * A fully-qualified path representing Agent resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAgentName(agentName: string) { + return this.pathTemplates.agentPathTemplate.match(agentName).location; + } + + /** + * Parse the agent from Agent resource. + * + * @param {string} agentName + * A fully-qualified path representing Agent resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromAgentName(agentName: string) { + return this.pathTemplates.agentPathTemplate.match(agentName).agent; + } + + /** + * Return a fully-qualified entityType resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} entity_type + * @returns {string} Resource name string. + */ + entityTypePath( + project: string, + location: string, + agent: string, + entityType: string + ) { + return this.pathTemplates.entityTypePathTemplate.render({ + project: project, + location: location, + agent: agent, + entity_type: entityType, + }); + } + + /** + * Parse the project from EntityType resource. + * + * @param {string} entityTypeName + * A fully-qualified path representing EntityType resource. + * @returns {string} A string representing the project. + */ + matchProjectFromEntityTypeName(entityTypeName: string) { + return this.pathTemplates.entityTypePathTemplate.match(entityTypeName) + .project; + } + + /** + * Parse the location from EntityType resource. + * + * @param {string} entityTypeName + * A fully-qualified path representing EntityType resource. + * @returns {string} A string representing the location. + */ + matchLocationFromEntityTypeName(entityTypeName: string) { + return this.pathTemplates.entityTypePathTemplate.match(entityTypeName) + .location; + } + + /** + * Parse the agent from EntityType resource. + * + * @param {string} entityTypeName + * A fully-qualified path representing EntityType resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromEntityTypeName(entityTypeName: string) { + return this.pathTemplates.entityTypePathTemplate.match(entityTypeName) + .agent; + } + + /** + * Parse the entity_type from EntityType resource. + * + * @param {string} entityTypeName + * A fully-qualified path representing EntityType resource. + * @returns {string} A string representing the entity_type. + */ + matchEntityTypeFromEntityTypeName(entityTypeName: string) { + return this.pathTemplates.entityTypePathTemplate.match(entityTypeName) + .entity_type; + } + + /** + * Return a fully-qualified environment resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} environment + * @returns {string} Resource name string. + */ + environmentPath( + project: string, + location: string, + agent: string, + environment: string + ) { + return this.pathTemplates.environmentPathTemplate.render({ + project: project, + location: location, + agent: agent, + environment: environment, + }); + } + + /** + * Parse the project from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the project. + */ + matchProjectFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName) + .project; + } + + /** + * Parse the location from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the location. + */ + matchLocationFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName) + .location; + } + + /** + * Parse the agent from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName) + .agent; + } + + /** + * Parse the environment from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName) + .environment; + } + + /** + * Return a fully-qualified experiment resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} environment + * @param {string} experiment + * @returns {string} Resource name string. + */ + experimentPath( + project: string, + location: string, + agent: string, + environment: string, + experiment: string + ) { + return this.pathTemplates.experimentPathTemplate.render({ + project: project, + location: location, + agent: agent, + environment: environment, + experiment: experiment, + }); + } + + /** + * Parse the project from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the project. + */ + matchProjectFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .project; + } + + /** + * Parse the location from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the location. + */ + matchLocationFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .location; + } + + /** + * Parse the agent from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .agent; + } + + /** + * Parse the environment from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .environment; + } + + /** + * Parse the experiment from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the experiment. + */ + matchExperimentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .experiment; + } + + /** + * Return a fully-qualified flow resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} flow + * @returns {string} Resource name string. + */ + flowPath(project: string, location: string, agent: string, flow: string) { + return this.pathTemplates.flowPathTemplate.render({ + project: project, + location: location, + agent: agent, + flow: flow, + }); + } + + /** + * Parse the project from Flow resource. + * + * @param {string} flowName + * A fully-qualified path representing Flow resource. + * @returns {string} A string representing the project. + */ + matchProjectFromFlowName(flowName: string) { + return this.pathTemplates.flowPathTemplate.match(flowName).project; + } + + /** + * Parse the location from Flow resource. + * + * @param {string} flowName + * A fully-qualified path representing Flow resource. + * @returns {string} A string representing the location. + */ + matchLocationFromFlowName(flowName: string) { + return this.pathTemplates.flowPathTemplate.match(flowName).location; + } + + /** + * Parse the agent from Flow resource. + * + * @param {string} flowName + * A fully-qualified path representing Flow resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromFlowName(flowName: string) { + return this.pathTemplates.flowPathTemplate.match(flowName).agent; + } + + /** + * Parse the flow from Flow resource. + * + * @param {string} flowName + * A fully-qualified path representing Flow resource. + * @returns {string} A string representing the flow. + */ + matchFlowFromFlowName(flowName: string) { + return this.pathTemplates.flowPathTemplate.match(flowName).flow; + } + + /** + * Return a fully-qualified intent resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} intent + * @returns {string} Resource name string. + */ + intentPath(project: string, location: string, agent: string, intent: string) { + return this.pathTemplates.intentPathTemplate.render({ + project: project, + location: location, + agent: agent, + intent: intent, + }); + } + + /** + * Parse the project from Intent resource. + * + * @param {string} intentName + * A fully-qualified path representing Intent resource. + * @returns {string} A string representing the project. + */ + matchProjectFromIntentName(intentName: string) { + return this.pathTemplates.intentPathTemplate.match(intentName).project; + } + + /** + * Parse the location from Intent resource. + * + * @param {string} intentName + * A fully-qualified path representing Intent resource. + * @returns {string} A string representing the location. + */ + matchLocationFromIntentName(intentName: string) { + return this.pathTemplates.intentPathTemplate.match(intentName).location; + } + + /** + * Parse the agent from Intent resource. + * + * @param {string} intentName + * A fully-qualified path representing Intent resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromIntentName(intentName: string) { + return this.pathTemplates.intentPathTemplate.match(intentName).agent; + } + + /** + * Parse the intent from Intent resource. + * + * @param {string} intentName + * A fully-qualified path representing Intent resource. + * @returns {string} A string representing the intent. + */ + matchIntentFromIntentName(intentName: string) { + return this.pathTemplates.intentPathTemplate.match(intentName).intent; + } + + /** + * Return a fully-qualified location resource name string. + * + * @param {string} project + * @param {string} location + * @returns {string} Resource name string. + */ + locationPath(project: string, location: string) { + return this.pathTemplates.locationPathTemplate.render({ + project: project, + location: location, + }); + } + + /** + * Parse the project from Location resource. + * + * @param {string} locationName + * A fully-qualified path representing Location resource. + * @returns {string} A string representing the project. + */ + matchProjectFromLocationName(locationName: string) { + return this.pathTemplates.locationPathTemplate.match(locationName).project; + } + + /** + * Parse the location from Location resource. + * + * @param {string} locationName + * A fully-qualified path representing Location resource. + * @returns {string} A string representing the location. + */ + matchLocationFromLocationName(locationName: string) { + return this.pathTemplates.locationPathTemplate.match(locationName).location; + } + + /** + * Return a fully-qualified page resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} flow + * @param {string} page + * @returns {string} Resource name string. + */ + pagePath( + project: string, + location: string, + agent: string, + flow: string, + page: string + ) { + return this.pathTemplates.pagePathTemplate.render({ + project: project, + location: location, + agent: agent, + flow: flow, + page: page, + }); + } + + /** + * Parse the project from Page resource. + * + * @param {string} pageName + * A fully-qualified path representing Page resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPageName(pageName: string) { + return this.pathTemplates.pagePathTemplate.match(pageName).project; + } + + /** + * Parse the location from Page resource. + * + * @param {string} pageName + * A fully-qualified path representing Page resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPageName(pageName: string) { + return this.pathTemplates.pagePathTemplate.match(pageName).location; + } + + /** + * Parse the agent from Page resource. + * + * @param {string} pageName + * A fully-qualified path representing Page resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromPageName(pageName: string) { + return this.pathTemplates.pagePathTemplate.match(pageName).agent; + } + + /** + * Parse the flow from Page resource. + * + * @param {string} pageName + * A fully-qualified path representing Page resource. + * @returns {string} A string representing the flow. + */ + matchFlowFromPageName(pageName: string) { + return this.pathTemplates.pagePathTemplate.match(pageName).flow; + } + + /** + * Parse the page from Page resource. + * + * @param {string} pageName + * A fully-qualified path representing Page resource. + * @returns {string} A string representing the page. + */ + matchPageFromPageName(pageName: string) { + return this.pathTemplates.pagePathTemplate.match(pageName).page; + } + + /** + * Return a fully-qualified project resource name string. + * + * @param {string} project + * @returns {string} Resource name string. + */ + projectPath(project: string) { + return this.pathTemplates.projectPathTemplate.render({ + project: project, + }); + } + + /** + * Parse the project from Project resource. + * + * @param {string} projectName + * A fully-qualified path representing Project resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectName(projectName: string) { + return this.pathTemplates.projectPathTemplate.match(projectName).project; + } + + /** + * Return a fully-qualified projectLocationAgentEnvironmentSessionEntityType resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} environment + * @param {string} session + * @param {string} entity_type + * @returns {string} Resource name string. + */ + projectLocationAgentEnvironmentSessionEntityTypePath( + project: string, + location: string, + agent: string, + environment: string, + session: string, + entityType: string + ) { + return this.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.render( + { + project: project, + location: location, + agent: agent, + environment: environment, + session: session, + entity_type: entityType, + } + ); + } + + /** + * Parse the project from ProjectLocationAgentEnvironmentSessionEntityType resource. + * + * @param {string} projectLocationAgentEnvironmentSessionEntityTypeName + * A fully-qualified path representing project_location_agent_environment_session_entity_type resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationAgentEnvironmentSessionEntityTypeName( + projectLocationAgentEnvironmentSessionEntityTypeName: string + ) { + return this.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match( + projectLocationAgentEnvironmentSessionEntityTypeName + ).project; + } + + /** + * Parse the location from ProjectLocationAgentEnvironmentSessionEntityType resource. + * + * @param {string} projectLocationAgentEnvironmentSessionEntityTypeName + * A fully-qualified path representing project_location_agent_environment_session_entity_type resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationAgentEnvironmentSessionEntityTypeName( + projectLocationAgentEnvironmentSessionEntityTypeName: string + ) { + return this.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match( + projectLocationAgentEnvironmentSessionEntityTypeName + ).location; + } + + /** + * Parse the agent from ProjectLocationAgentEnvironmentSessionEntityType resource. + * + * @param {string} projectLocationAgentEnvironmentSessionEntityTypeName + * A fully-qualified path representing project_location_agent_environment_session_entity_type resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromProjectLocationAgentEnvironmentSessionEntityTypeName( + projectLocationAgentEnvironmentSessionEntityTypeName: string + ) { + return this.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match( + projectLocationAgentEnvironmentSessionEntityTypeName + ).agent; + } + + /** + * Parse the environment from ProjectLocationAgentEnvironmentSessionEntityType resource. + * + * @param {string} projectLocationAgentEnvironmentSessionEntityTypeName + * A fully-qualified path representing project_location_agent_environment_session_entity_type resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromProjectLocationAgentEnvironmentSessionEntityTypeName( + projectLocationAgentEnvironmentSessionEntityTypeName: string + ) { + return this.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match( + projectLocationAgentEnvironmentSessionEntityTypeName + ).environment; + } + + /** + * Parse the session from ProjectLocationAgentEnvironmentSessionEntityType resource. + * + * @param {string} projectLocationAgentEnvironmentSessionEntityTypeName + * A fully-qualified path representing project_location_agent_environment_session_entity_type resource. + * @returns {string} A string representing the session. + */ + matchSessionFromProjectLocationAgentEnvironmentSessionEntityTypeName( + projectLocationAgentEnvironmentSessionEntityTypeName: string + ) { + return this.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match( + projectLocationAgentEnvironmentSessionEntityTypeName + ).session; + } + + /** + * Parse the entity_type from ProjectLocationAgentEnvironmentSessionEntityType resource. + * + * @param {string} projectLocationAgentEnvironmentSessionEntityTypeName + * A fully-qualified path representing project_location_agent_environment_session_entity_type resource. + * @returns {string} A string representing the entity_type. + */ + matchEntityTypeFromProjectLocationAgentEnvironmentSessionEntityTypeName( + projectLocationAgentEnvironmentSessionEntityTypeName: string + ) { + return this.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match( + projectLocationAgentEnvironmentSessionEntityTypeName + ).entity_type; + } + + /** + * Return a fully-qualified projectLocationAgentSessionEntityType resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} session + * @param {string} entity_type + * @returns {string} Resource name string. + */ + projectLocationAgentSessionEntityTypePath( + project: string, + location: string, + agent: string, + session: string, + entityType: string + ) { + return this.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render( + { + project: project, + location: location, + agent: agent, + session: session, + entity_type: entityType, + } + ); + } + + /** + * Parse the project from ProjectLocationAgentSessionEntityType resource. + * + * @param {string} projectLocationAgentSessionEntityTypeName + * A fully-qualified path representing project_location_agent_session_entity_type resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationAgentSessionEntityTypeName( + projectLocationAgentSessionEntityTypeName: string + ) { + return this.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match( + projectLocationAgentSessionEntityTypeName + ).project; + } + + /** + * Parse the location from ProjectLocationAgentSessionEntityType resource. + * + * @param {string} projectLocationAgentSessionEntityTypeName + * A fully-qualified path representing project_location_agent_session_entity_type resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationAgentSessionEntityTypeName( + projectLocationAgentSessionEntityTypeName: string + ) { + return this.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match( + projectLocationAgentSessionEntityTypeName + ).location; + } + + /** + * Parse the agent from ProjectLocationAgentSessionEntityType resource. + * + * @param {string} projectLocationAgentSessionEntityTypeName + * A fully-qualified path representing project_location_agent_session_entity_type resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromProjectLocationAgentSessionEntityTypeName( + projectLocationAgentSessionEntityTypeName: string + ) { + return this.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match( + projectLocationAgentSessionEntityTypeName + ).agent; + } + + /** + * Parse the session from ProjectLocationAgentSessionEntityType resource. + * + * @param {string} projectLocationAgentSessionEntityTypeName + * A fully-qualified path representing project_location_agent_session_entity_type resource. + * @returns {string} A string representing the session. + */ + matchSessionFromProjectLocationAgentSessionEntityTypeName( + projectLocationAgentSessionEntityTypeName: string + ) { + return this.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match( + projectLocationAgentSessionEntityTypeName + ).session; + } + + /** + * Parse the entity_type from ProjectLocationAgentSessionEntityType resource. + * + * @param {string} projectLocationAgentSessionEntityTypeName + * A fully-qualified path representing project_location_agent_session_entity_type resource. + * @returns {string} A string representing the entity_type. + */ + matchEntityTypeFromProjectLocationAgentSessionEntityTypeName( + projectLocationAgentSessionEntityTypeName: string + ) { + return this.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match( + projectLocationAgentSessionEntityTypeName + ).entity_type; + } + + /** + * Return a fully-qualified securitySettings resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} security_settings + * @returns {string} Resource name string. + */ + securitySettingsPath( + project: string, + location: string, + securitySettings: string + ) { + return this.pathTemplates.securitySettingsPathTemplate.render({ + project: project, + location: location, + security_settings: securitySettings, + }); + } + + /** + * Parse the project from SecuritySettings resource. + * + * @param {string} securitySettingsName + * A fully-qualified path representing SecuritySettings resource. + * @returns {string} A string representing the project. + */ + matchProjectFromSecuritySettingsName(securitySettingsName: string) { + return this.pathTemplates.securitySettingsPathTemplate.match( + securitySettingsName + ).project; + } + + /** + * Parse the location from SecuritySettings resource. + * + * @param {string} securitySettingsName + * A fully-qualified path representing SecuritySettings resource. + * @returns {string} A string representing the location. + */ + matchLocationFromSecuritySettingsName(securitySettingsName: string) { + return this.pathTemplates.securitySettingsPathTemplate.match( + securitySettingsName + ).location; + } + + /** + * Parse the security_settings from SecuritySettings resource. + * + * @param {string} securitySettingsName + * A fully-qualified path representing SecuritySettings resource. + * @returns {string} A string representing the security_settings. + */ + matchSecuritySettingsFromSecuritySettingsName(securitySettingsName: string) { + return this.pathTemplates.securitySettingsPathTemplate.match( + securitySettingsName + ).security_settings; + } + + /** + * Return a fully-qualified transitionRouteGroup resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} flow + * @param {string} transition_route_group + * @returns {string} Resource name string. + */ + transitionRouteGroupPath( + project: string, + location: string, + agent: string, + flow: string, + transitionRouteGroup: string + ) { + return this.pathTemplates.transitionRouteGroupPathTemplate.render({ + project: project, + location: location, + agent: agent, + flow: flow, + transition_route_group: transitionRouteGroup, + }); + } + + /** + * Parse the project from TransitionRouteGroup resource. + * + * @param {string} transitionRouteGroupName + * A fully-qualified path representing TransitionRouteGroup resource. + * @returns {string} A string representing the project. + */ + matchProjectFromTransitionRouteGroupName(transitionRouteGroupName: string) { + return this.pathTemplates.transitionRouteGroupPathTemplate.match( + transitionRouteGroupName + ).project; + } + + /** + * Parse the location from TransitionRouteGroup resource. + * + * @param {string} transitionRouteGroupName + * A fully-qualified path representing TransitionRouteGroup resource. + * @returns {string} A string representing the location. + */ + matchLocationFromTransitionRouteGroupName(transitionRouteGroupName: string) { + return this.pathTemplates.transitionRouteGroupPathTemplate.match( + transitionRouteGroupName + ).location; + } + + /** + * Parse the agent from TransitionRouteGroup resource. + * + * @param {string} transitionRouteGroupName + * A fully-qualified path representing TransitionRouteGroup resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromTransitionRouteGroupName(transitionRouteGroupName: string) { + return this.pathTemplates.transitionRouteGroupPathTemplate.match( + transitionRouteGroupName + ).agent; + } + + /** + * Parse the flow from TransitionRouteGroup resource. + * + * @param {string} transitionRouteGroupName + * A fully-qualified path representing TransitionRouteGroup resource. + * @returns {string} A string representing the flow. + */ + matchFlowFromTransitionRouteGroupName(transitionRouteGroupName: string) { + return this.pathTemplates.transitionRouteGroupPathTemplate.match( + transitionRouteGroupName + ).flow; + } + + /** + * Parse the transition_route_group from TransitionRouteGroup resource. + * + * @param {string} transitionRouteGroupName + * A fully-qualified path representing TransitionRouteGroup resource. + * @returns {string} A string representing the transition_route_group. + */ + matchTransitionRouteGroupFromTransitionRouteGroupName( + transitionRouteGroupName: string + ) { + return this.pathTemplates.transitionRouteGroupPathTemplate.match( + transitionRouteGroupName + ).transition_route_group; + } + + /** + * Return a fully-qualified version resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} flow + * @param {string} version + * @returns {string} Resource name string. + */ + versionPath( + project: string, + location: string, + agent: string, + flow: string, + version: string + ) { + return this.pathTemplates.versionPathTemplate.render({ + project: project, + location: location, + agent: agent, + flow: flow, + version: version, + }); + } + + /** + * Parse the project from Version resource. + * + * @param {string} versionName + * A fully-qualified path representing Version resource. + * @returns {string} A string representing the project. + */ + matchProjectFromVersionName(versionName: string) { + return this.pathTemplates.versionPathTemplate.match(versionName).project; + } + + /** + * Parse the location from Version resource. + * + * @param {string} versionName + * A fully-qualified path representing Version resource. + * @returns {string} A string representing the location. + */ + matchLocationFromVersionName(versionName: string) { + return this.pathTemplates.versionPathTemplate.match(versionName).location; + } + + /** + * Parse the agent from Version resource. + * + * @param {string} versionName + * A fully-qualified path representing Version resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromVersionName(versionName: string) { + return this.pathTemplates.versionPathTemplate.match(versionName).agent; + } + + /** + * Parse the flow from Version resource. + * + * @param {string} versionName + * A fully-qualified path representing Version resource. + * @returns {string} A string representing the flow. + */ + matchFlowFromVersionName(versionName: string) { + return this.pathTemplates.versionPathTemplate.match(versionName).flow; + } + + /** + * Parse the version from Version resource. + * + * @param {string} versionName + * A fully-qualified path representing Version resource. + * @returns {string} A string representing the version. + */ + matchVersionFromVersionName(versionName: string) { + return this.pathTemplates.versionPathTemplate.match(versionName).version; + } + + /** + * Return a fully-qualified webhook resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} webhook + * @returns {string} Resource name string. + */ + webhookPath( + project: string, + location: string, + agent: string, + webhook: string + ) { + return this.pathTemplates.webhookPathTemplate.render({ + project: project, + location: location, + agent: agent, + webhook: webhook, + }); + } + + /** + * Parse the project from Webhook resource. + * + * @param {string} webhookName + * A fully-qualified path representing Webhook resource. + * @returns {string} A string representing the project. + */ + matchProjectFromWebhookName(webhookName: string) { + return this.pathTemplates.webhookPathTemplate.match(webhookName).project; + } + + /** + * Parse the location from Webhook resource. + * + * @param {string} webhookName + * A fully-qualified path representing Webhook resource. + * @returns {string} A string representing the location. + */ + matchLocationFromWebhookName(webhookName: string) { + return this.pathTemplates.webhookPathTemplate.match(webhookName).location; + } + + /** + * Parse the agent from Webhook resource. + * + * @param {string} webhookName + * A fully-qualified path representing Webhook resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromWebhookName(webhookName: string) { + return this.pathTemplates.webhookPathTemplate.match(webhookName).agent; + } + + /** + * Parse the webhook from Webhook resource. + * + * @param {string} webhookName + * A fully-qualified path representing Webhook resource. + * @returns {string} A string representing the webhook. + */ + matchWebhookFromWebhookName(webhookName: string) { + return this.pathTemplates.webhookPathTemplate.match(webhookName).webhook; + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + this.initialize(); + if (!this._terminated) { + return this.experimentsStub!.then(stub => { + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/src/v3/experiments_client_config.json b/src/v3/experiments_client_config.json new file mode 100644 index 00000000..9853d644 --- /dev/null +++ b/src/v3/experiments_client_config.json @@ -0,0 +1,64 @@ +{ + "interfaces": { + "google.cloud.dialogflow.cx.v3.Experiments": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "unavailable": [ + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "ListExperiments": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "default" + }, + "GetExperiment": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "default" + }, + "CreateExperiment": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "default" + }, + "UpdateExperiment": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "default" + }, + "DeleteExperiment": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "default" + }, + "StartExperiment": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "default" + }, + "StopExperiment": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "default" + } + } + } + } +} diff --git a/src/v3/experiments_proto_list.json b/src/v3/experiments_proto_list.json new file mode 100644 index 00000000..99c9f9da --- /dev/null +++ b/src/v3/experiments_proto_list.json @@ -0,0 +1,18 @@ +[ + "../../protos/google/cloud/dialogflow/cx/v3/agent.proto", + "../../protos/google/cloud/dialogflow/cx/v3/audio_config.proto", + "../../protos/google/cloud/dialogflow/cx/v3/entity_type.proto", + "../../protos/google/cloud/dialogflow/cx/v3/environment.proto", + "../../protos/google/cloud/dialogflow/cx/v3/experiment.proto", + "../../protos/google/cloud/dialogflow/cx/v3/flow.proto", + "../../protos/google/cloud/dialogflow/cx/v3/fulfillment.proto", + "../../protos/google/cloud/dialogflow/cx/v3/intent.proto", + "../../protos/google/cloud/dialogflow/cx/v3/page.proto", + "../../protos/google/cloud/dialogflow/cx/v3/response_message.proto", + "../../protos/google/cloud/dialogflow/cx/v3/security_settings.proto", + "../../protos/google/cloud/dialogflow/cx/v3/session.proto", + "../../protos/google/cloud/dialogflow/cx/v3/session_entity_type.proto", + "../../protos/google/cloud/dialogflow/cx/v3/transition_route_group.proto", + "../../protos/google/cloud/dialogflow/cx/v3/version.proto", + "../../protos/google/cloud/dialogflow/cx/v3/webhook.proto" +] diff --git a/src/v3/flows_client.ts b/src/v3/flows_client.ts index 1b16459e..b273e4cd 100644 --- a/src/v3/flows_client.ts +++ b/src/v3/flows_client.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -177,6 +177,9 @@ export class FlowsClient { environmentPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}' ), + experimentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/experiments/{experiment}' + ), flowPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}' ), @@ -1384,6 +1387,92 @@ export class FlowsClient { .environment; } + /** + * Return a fully-qualified experiment resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} environment + * @param {string} experiment + * @returns {string} Resource name string. + */ + experimentPath( + project: string, + location: string, + agent: string, + environment: string, + experiment: string + ) { + return this.pathTemplates.experimentPathTemplate.render({ + project: project, + location: location, + agent: agent, + environment: environment, + experiment: experiment, + }); + } + + /** + * Parse the project from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the project. + */ + matchProjectFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .project; + } + + /** + * Parse the location from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the location. + */ + matchLocationFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .location; + } + + /** + * Parse the agent from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .agent; + } + + /** + * Parse the environment from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .environment; + } + + /** + * Parse the experiment from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the experiment. + */ + matchExperimentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .experiment; + } + /** * Return a fully-qualified flow resource name string. * diff --git a/src/v3/flows_proto_list.json b/src/v3/flows_proto_list.json index 622b657f..99c9f9da 100644 --- a/src/v3/flows_proto_list.json +++ b/src/v3/flows_proto_list.json @@ -3,6 +3,7 @@ "../../protos/google/cloud/dialogflow/cx/v3/audio_config.proto", "../../protos/google/cloud/dialogflow/cx/v3/entity_type.proto", "../../protos/google/cloud/dialogflow/cx/v3/environment.proto", + "../../protos/google/cloud/dialogflow/cx/v3/experiment.proto", "../../protos/google/cloud/dialogflow/cx/v3/flow.proto", "../../protos/google/cloud/dialogflow/cx/v3/fulfillment.proto", "../../protos/google/cloud/dialogflow/cx/v3/intent.proto", diff --git a/src/v3/gapic_metadata.json b/src/v3/gapic_metadata.json index 0ea5c6de..96d01ef2 100644 --- a/src/v3/gapic_metadata.json +++ b/src/v3/gapic_metadata.json @@ -243,6 +243,94 @@ } } }, + "Experiments": { + "clients": { + "grpc": { + "libraryClient": "ExperimentsClient", + "rpcs": { + "GetExperiment": { + "methods": [ + "getExperiment" + ] + }, + "CreateExperiment": { + "methods": [ + "createExperiment" + ] + }, + "UpdateExperiment": { + "methods": [ + "updateExperiment" + ] + }, + "DeleteExperiment": { + "methods": [ + "deleteExperiment" + ] + }, + "StartExperiment": { + "methods": [ + "startExperiment" + ] + }, + "StopExperiment": { + "methods": [ + "stopExperiment" + ] + }, + "ListExperiments": { + "methods": [ + "listExperiments", + "listExperimentsStream", + "listExperimentsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "ExperimentsClient", + "rpcs": { + "GetExperiment": { + "methods": [ + "getExperiment" + ] + }, + "CreateExperiment": { + "methods": [ + "createExperiment" + ] + }, + "UpdateExperiment": { + "methods": [ + "updateExperiment" + ] + }, + "DeleteExperiment": { + "methods": [ + "deleteExperiment" + ] + }, + "StartExperiment": { + "methods": [ + "startExperiment" + ] + }, + "StopExperiment": { + "methods": [ + "stopExperiment" + ] + }, + "ListExperiments": { + "methods": [ + "listExperiments", + "listExperimentsStream", + "listExperimentsAsync" + ] + } + } + } + } + }, "Flows": { "clients": { "grpc": { diff --git a/src/v3/index.ts b/src/v3/index.ts index 4290247b..de12e524 100644 --- a/src/v3/index.ts +++ b/src/v3/index.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -19,6 +19,7 @@ export {AgentsClient} from './agents_client'; export {EntityTypesClient} from './entity_types_client'; export {EnvironmentsClient} from './environments_client'; +export {ExperimentsClient} from './experiments_client'; export {FlowsClient} from './flows_client'; export {IntentsClient} from './intents_client'; export {PagesClient} from './pages_client'; diff --git a/src/v3/intents_client.ts b/src/v3/intents_client.ts index 0a1598d6..5ed2fd16 100644 --- a/src/v3/intents_client.ts +++ b/src/v3/intents_client.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -175,6 +175,9 @@ export class IntentsClient { environmentPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}' ), + experimentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/experiments/{experiment}' + ), flowPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}' ), @@ -1194,6 +1197,92 @@ export class IntentsClient { .environment; } + /** + * Return a fully-qualified experiment resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} environment + * @param {string} experiment + * @returns {string} Resource name string. + */ + experimentPath( + project: string, + location: string, + agent: string, + environment: string, + experiment: string + ) { + return this.pathTemplates.experimentPathTemplate.render({ + project: project, + location: location, + agent: agent, + environment: environment, + experiment: experiment, + }); + } + + /** + * Parse the project from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the project. + */ + matchProjectFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .project; + } + + /** + * Parse the location from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the location. + */ + matchLocationFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .location; + } + + /** + * Parse the agent from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .agent; + } + + /** + * Parse the environment from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .environment; + } + + /** + * Parse the experiment from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the experiment. + */ + matchExperimentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .experiment; + } + /** * Return a fully-qualified flow resource name string. * diff --git a/src/v3/intents_proto_list.json b/src/v3/intents_proto_list.json index 622b657f..99c9f9da 100644 --- a/src/v3/intents_proto_list.json +++ b/src/v3/intents_proto_list.json @@ -3,6 +3,7 @@ "../../protos/google/cloud/dialogflow/cx/v3/audio_config.proto", "../../protos/google/cloud/dialogflow/cx/v3/entity_type.proto", "../../protos/google/cloud/dialogflow/cx/v3/environment.proto", + "../../protos/google/cloud/dialogflow/cx/v3/experiment.proto", "../../protos/google/cloud/dialogflow/cx/v3/flow.proto", "../../protos/google/cloud/dialogflow/cx/v3/fulfillment.proto", "../../protos/google/cloud/dialogflow/cx/v3/intent.proto", diff --git a/src/v3/pages_client.ts b/src/v3/pages_client.ts index f85872ef..75977ecd 100644 --- a/src/v3/pages_client.ts +++ b/src/v3/pages_client.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -175,6 +175,9 @@ export class PagesClient { environmentPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}' ), + experimentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/experiments/{experiment}' + ), flowPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}' ), @@ -1233,6 +1236,92 @@ export class PagesClient { .environment; } + /** + * Return a fully-qualified experiment resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} environment + * @param {string} experiment + * @returns {string} Resource name string. + */ + experimentPath( + project: string, + location: string, + agent: string, + environment: string, + experiment: string + ) { + return this.pathTemplates.experimentPathTemplate.render({ + project: project, + location: location, + agent: agent, + environment: environment, + experiment: experiment, + }); + } + + /** + * Parse the project from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the project. + */ + matchProjectFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .project; + } + + /** + * Parse the location from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the location. + */ + matchLocationFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .location; + } + + /** + * Parse the agent from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .agent; + } + + /** + * Parse the environment from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .environment; + } + + /** + * Parse the experiment from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the experiment. + */ + matchExperimentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .experiment; + } + /** * Return a fully-qualified flow resource name string. * diff --git a/src/v3/pages_proto_list.json b/src/v3/pages_proto_list.json index 622b657f..99c9f9da 100644 --- a/src/v3/pages_proto_list.json +++ b/src/v3/pages_proto_list.json @@ -3,6 +3,7 @@ "../../protos/google/cloud/dialogflow/cx/v3/audio_config.proto", "../../protos/google/cloud/dialogflow/cx/v3/entity_type.proto", "../../protos/google/cloud/dialogflow/cx/v3/environment.proto", + "../../protos/google/cloud/dialogflow/cx/v3/experiment.proto", "../../protos/google/cloud/dialogflow/cx/v3/flow.proto", "../../protos/google/cloud/dialogflow/cx/v3/fulfillment.proto", "../../protos/google/cloud/dialogflow/cx/v3/intent.proto", diff --git a/src/v3/security_settings_service_client.ts b/src/v3/security_settings_service_client.ts index 3384a765..9b04f35a 100644 --- a/src/v3/security_settings_service_client.ts +++ b/src/v3/security_settings_service_client.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -176,6 +176,9 @@ export class SecuritySettingsServiceClient { environmentPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}' ), + experimentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/experiments/{experiment}' + ), flowPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}' ), @@ -1170,6 +1173,92 @@ export class SecuritySettingsServiceClient { .environment; } + /** + * Return a fully-qualified experiment resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} environment + * @param {string} experiment + * @returns {string} Resource name string. + */ + experimentPath( + project: string, + location: string, + agent: string, + environment: string, + experiment: string + ) { + return this.pathTemplates.experimentPathTemplate.render({ + project: project, + location: location, + agent: agent, + environment: environment, + experiment: experiment, + }); + } + + /** + * Parse the project from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the project. + */ + matchProjectFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .project; + } + + /** + * Parse the location from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the location. + */ + matchLocationFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .location; + } + + /** + * Parse the agent from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .agent; + } + + /** + * Parse the environment from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .environment; + } + + /** + * Parse the experiment from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the experiment. + */ + matchExperimentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .experiment; + } + /** * Return a fully-qualified flow resource name string. * diff --git a/src/v3/security_settings_service_proto_list.json b/src/v3/security_settings_service_proto_list.json index 622b657f..99c9f9da 100644 --- a/src/v3/security_settings_service_proto_list.json +++ b/src/v3/security_settings_service_proto_list.json @@ -3,6 +3,7 @@ "../../protos/google/cloud/dialogflow/cx/v3/audio_config.proto", "../../protos/google/cloud/dialogflow/cx/v3/entity_type.proto", "../../protos/google/cloud/dialogflow/cx/v3/environment.proto", + "../../protos/google/cloud/dialogflow/cx/v3/experiment.proto", "../../protos/google/cloud/dialogflow/cx/v3/flow.proto", "../../protos/google/cloud/dialogflow/cx/v3/fulfillment.proto", "../../protos/google/cloud/dialogflow/cx/v3/intent.proto", diff --git a/src/v3/session_entity_types_client.ts b/src/v3/session_entity_types_client.ts index 6967acbb..2053ea64 100644 --- a/src/v3/session_entity_types_client.ts +++ b/src/v3/session_entity_types_client.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -175,6 +175,9 @@ export class SessionEntityTypesClient { environmentPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}' ), + experimentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/experiments/{experiment}' + ), flowPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}' ), @@ -1206,6 +1209,92 @@ export class SessionEntityTypesClient { .environment; } + /** + * Return a fully-qualified experiment resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} environment + * @param {string} experiment + * @returns {string} Resource name string. + */ + experimentPath( + project: string, + location: string, + agent: string, + environment: string, + experiment: string + ) { + return this.pathTemplates.experimentPathTemplate.render({ + project: project, + location: location, + agent: agent, + environment: environment, + experiment: experiment, + }); + } + + /** + * Parse the project from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the project. + */ + matchProjectFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .project; + } + + /** + * Parse the location from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the location. + */ + matchLocationFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .location; + } + + /** + * Parse the agent from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .agent; + } + + /** + * Parse the environment from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .environment; + } + + /** + * Parse the experiment from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the experiment. + */ + matchExperimentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .experiment; + } + /** * Return a fully-qualified flow resource name string. * diff --git a/src/v3/session_entity_types_proto_list.json b/src/v3/session_entity_types_proto_list.json index 622b657f..99c9f9da 100644 --- a/src/v3/session_entity_types_proto_list.json +++ b/src/v3/session_entity_types_proto_list.json @@ -3,6 +3,7 @@ "../../protos/google/cloud/dialogflow/cx/v3/audio_config.proto", "../../protos/google/cloud/dialogflow/cx/v3/entity_type.proto", "../../protos/google/cloud/dialogflow/cx/v3/environment.proto", + "../../protos/google/cloud/dialogflow/cx/v3/experiment.proto", "../../protos/google/cloud/dialogflow/cx/v3/flow.proto", "../../protos/google/cloud/dialogflow/cx/v3/fulfillment.proto", "../../protos/google/cloud/dialogflow/cx/v3/intent.proto", diff --git a/src/v3/sessions_client.ts b/src/v3/sessions_client.ts index 75d27605..9ef43549 100644 --- a/src/v3/sessions_client.ts +++ b/src/v3/sessions_client.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -168,6 +168,9 @@ export class SessionsClient { environmentPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}' ), + experimentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/experiments/{experiment}' + ), flowPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}' ), @@ -382,6 +385,10 @@ export class SessionsClient { * entity types to be updated, which in turn might affect results of future * queries. * + * Note: Always use agent versions for production traffic. + * See [Versions and + * environments](https://cloud.google.com/dialogflow/cx/docs/concept/version). + * * @param {Object} request * The request object that will be sent. * @param {string} request.session @@ -397,6 +404,10 @@ export class SessionsClient { * * For more information, see the [sessions * guide](https://cloud.google.com/dialogflow/cx/docs/concept/session). + * + * Note: Always use agent versions for production traffic. + * See [Versions and + * environments](https://cloud.google.com/dialogflow/cx/docs/concept/version). * @param {google.cloud.dialogflow.cx.v3.QueryParameters} request.queryParams * The parameters of this query. * @param {google.cloud.dialogflow.cx.v3.QueryInput} request.queryInput @@ -670,6 +681,10 @@ export class SessionsClient { * and returns structured, actionable data as a result. This method is only * available via the gRPC API (not REST). * + * Note: Always use agent versions for production traffic. + * See [Versions and + * environments](https://cloud.google.com/dialogflow/cx/docs/concept/version). + * * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} @@ -886,6 +901,92 @@ export class SessionsClient { .environment; } + /** + * Return a fully-qualified experiment resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} environment + * @param {string} experiment + * @returns {string} Resource name string. + */ + experimentPath( + project: string, + location: string, + agent: string, + environment: string, + experiment: string + ) { + return this.pathTemplates.experimentPathTemplate.render({ + project: project, + location: location, + agent: agent, + environment: environment, + experiment: experiment, + }); + } + + /** + * Parse the project from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the project. + */ + matchProjectFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .project; + } + + /** + * Parse the location from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the location. + */ + matchLocationFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .location; + } + + /** + * Parse the agent from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .agent; + } + + /** + * Parse the environment from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .environment; + } + + /** + * Parse the experiment from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the experiment. + */ + matchExperimentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .experiment; + } + /** * Return a fully-qualified flow resource name string. * diff --git a/src/v3/sessions_proto_list.json b/src/v3/sessions_proto_list.json index 622b657f..99c9f9da 100644 --- a/src/v3/sessions_proto_list.json +++ b/src/v3/sessions_proto_list.json @@ -3,6 +3,7 @@ "../../protos/google/cloud/dialogflow/cx/v3/audio_config.proto", "../../protos/google/cloud/dialogflow/cx/v3/entity_type.proto", "../../protos/google/cloud/dialogflow/cx/v3/environment.proto", + "../../protos/google/cloud/dialogflow/cx/v3/experiment.proto", "../../protos/google/cloud/dialogflow/cx/v3/flow.proto", "../../protos/google/cloud/dialogflow/cx/v3/fulfillment.proto", "../../protos/google/cloud/dialogflow/cx/v3/intent.proto", diff --git a/src/v3/transition_route_groups_client.ts b/src/v3/transition_route_groups_client.ts index a591e5b3..3c9e1d4e 100644 --- a/src/v3/transition_route_groups_client.ts +++ b/src/v3/transition_route_groups_client.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -176,6 +176,9 @@ export class TransitionRouteGroupsClient { environmentPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}' ), + experimentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/experiments/{experiment}' + ), flowPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}' ), @@ -1247,6 +1250,92 @@ export class TransitionRouteGroupsClient { .environment; } + /** + * Return a fully-qualified experiment resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} environment + * @param {string} experiment + * @returns {string} Resource name string. + */ + experimentPath( + project: string, + location: string, + agent: string, + environment: string, + experiment: string + ) { + return this.pathTemplates.experimentPathTemplate.render({ + project: project, + location: location, + agent: agent, + environment: environment, + experiment: experiment, + }); + } + + /** + * Parse the project from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the project. + */ + matchProjectFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .project; + } + + /** + * Parse the location from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the location. + */ + matchLocationFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .location; + } + + /** + * Parse the agent from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .agent; + } + + /** + * Parse the environment from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .environment; + } + + /** + * Parse the experiment from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the experiment. + */ + matchExperimentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .experiment; + } + /** * Return a fully-qualified flow resource name string. * diff --git a/src/v3/transition_route_groups_proto_list.json b/src/v3/transition_route_groups_proto_list.json index 622b657f..99c9f9da 100644 --- a/src/v3/transition_route_groups_proto_list.json +++ b/src/v3/transition_route_groups_proto_list.json @@ -3,6 +3,7 @@ "../../protos/google/cloud/dialogflow/cx/v3/audio_config.proto", "../../protos/google/cloud/dialogflow/cx/v3/entity_type.proto", "../../protos/google/cloud/dialogflow/cx/v3/environment.proto", + "../../protos/google/cloud/dialogflow/cx/v3/experiment.proto", "../../protos/google/cloud/dialogflow/cx/v3/flow.proto", "../../protos/google/cloud/dialogflow/cx/v3/fulfillment.proto", "../../protos/google/cloud/dialogflow/cx/v3/intent.proto", diff --git a/src/v3/versions_client.ts b/src/v3/versions_client.ts index d7dde904..85e1888e 100644 --- a/src/v3/versions_client.ts +++ b/src/v3/versions_client.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -177,6 +177,9 @@ export class VersionsClient { environmentPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}' ), + experimentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/experiments/{experiment}' + ), flowPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}' ), @@ -1378,6 +1381,92 @@ export class VersionsClient { .environment; } + /** + * Return a fully-qualified experiment resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} environment + * @param {string} experiment + * @returns {string} Resource name string. + */ + experimentPath( + project: string, + location: string, + agent: string, + environment: string, + experiment: string + ) { + return this.pathTemplates.experimentPathTemplate.render({ + project: project, + location: location, + agent: agent, + environment: environment, + experiment: experiment, + }); + } + + /** + * Parse the project from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the project. + */ + matchProjectFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .project; + } + + /** + * Parse the location from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the location. + */ + matchLocationFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .location; + } + + /** + * Parse the agent from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .agent; + } + + /** + * Parse the environment from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .environment; + } + + /** + * Parse the experiment from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the experiment. + */ + matchExperimentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .experiment; + } + /** * Return a fully-qualified flow resource name string. * diff --git a/src/v3/versions_proto_list.json b/src/v3/versions_proto_list.json index 622b657f..99c9f9da 100644 --- a/src/v3/versions_proto_list.json +++ b/src/v3/versions_proto_list.json @@ -3,6 +3,7 @@ "../../protos/google/cloud/dialogflow/cx/v3/audio_config.proto", "../../protos/google/cloud/dialogflow/cx/v3/entity_type.proto", "../../protos/google/cloud/dialogflow/cx/v3/environment.proto", + "../../protos/google/cloud/dialogflow/cx/v3/experiment.proto", "../../protos/google/cloud/dialogflow/cx/v3/flow.proto", "../../protos/google/cloud/dialogflow/cx/v3/fulfillment.proto", "../../protos/google/cloud/dialogflow/cx/v3/intent.proto", diff --git a/src/v3/webhooks_client.ts b/src/v3/webhooks_client.ts index e56e71c0..63fabc6d 100644 --- a/src/v3/webhooks_client.ts +++ b/src/v3/webhooks_client.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -175,6 +175,9 @@ export class WebhooksClient { environmentPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}' ), + experimentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/experiments/{experiment}' + ), flowPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}' ), @@ -1146,6 +1149,92 @@ export class WebhooksClient { .environment; } + /** + * Return a fully-qualified experiment resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} environment + * @param {string} experiment + * @returns {string} Resource name string. + */ + experimentPath( + project: string, + location: string, + agent: string, + environment: string, + experiment: string + ) { + return this.pathTemplates.experimentPathTemplate.render({ + project: project, + location: location, + agent: agent, + environment: environment, + experiment: experiment, + }); + } + + /** + * Parse the project from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the project. + */ + matchProjectFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .project; + } + + /** + * Parse the location from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the location. + */ + matchLocationFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .location; + } + + /** + * Parse the agent from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .agent; + } + + /** + * Parse the environment from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .environment; + } + + /** + * Parse the experiment from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the experiment. + */ + matchExperimentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .experiment; + } + /** * Return a fully-qualified flow resource name string. * diff --git a/src/v3/webhooks_proto_list.json b/src/v3/webhooks_proto_list.json index 622b657f..99c9f9da 100644 --- a/src/v3/webhooks_proto_list.json +++ b/src/v3/webhooks_proto_list.json @@ -3,6 +3,7 @@ "../../protos/google/cloud/dialogflow/cx/v3/audio_config.proto", "../../protos/google/cloud/dialogflow/cx/v3/entity_type.proto", "../../protos/google/cloud/dialogflow/cx/v3/environment.proto", + "../../protos/google/cloud/dialogflow/cx/v3/experiment.proto", "../../protos/google/cloud/dialogflow/cx/v3/flow.proto", "../../protos/google/cloud/dialogflow/cx/v3/fulfillment.proto", "../../protos/google/cloud/dialogflow/cx/v3/intent.proto", diff --git a/src/v3beta1/agents_client.ts b/src/v3beta1/agents_client.ts index c1b48278..b5b3a2c9 100644 --- a/src/v3beta1/agents_client.ts +++ b/src/v3beta1/agents_client.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -177,6 +177,9 @@ export class AgentsClient { environmentPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}' ), + experimentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/experiments/{experiment}' + ), flowPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}' ), @@ -827,10 +830,10 @@ export class AgentsClient { * Required. The name of the agent to export. * Format: `projects//locations//agents/`. * @param {string} [request.agentUri] - * Optional. The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI to - * export the agent to. The format of this URI must be - * `gs:///`. - * If left unspecified, the serialized agent is returned inline. + * Optional. The [Google Cloud + * Storage](https://cloud.google.com/storage/docs/) URI to export the agent + * to. The format of this URI must be `gs:///`. If + * left unspecified, the serialized agent is returned inline. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -1474,6 +1477,92 @@ export class AgentsClient { .environment; } + /** + * Return a fully-qualified experiment resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} environment + * @param {string} experiment + * @returns {string} Resource name string. + */ + experimentPath( + project: string, + location: string, + agent: string, + environment: string, + experiment: string + ) { + return this.pathTemplates.experimentPathTemplate.render({ + project: project, + location: location, + agent: agent, + environment: environment, + experiment: experiment, + }); + } + + /** + * Parse the project from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the project. + */ + matchProjectFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .project; + } + + /** + * Parse the location from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the location. + */ + matchLocationFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .location; + } + + /** + * Parse the agent from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .agent; + } + + /** + * Parse the environment from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .environment; + } + + /** + * Parse the experiment from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the experiment. + */ + matchExperimentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .experiment; + } + /** * Return a fully-qualified flow resource name string. * diff --git a/src/v3beta1/agents_proto_list.json b/src/v3beta1/agents_proto_list.json index 6e6cffbd..9046de0b 100644 --- a/src/v3beta1/agents_proto_list.json +++ b/src/v3beta1/agents_proto_list.json @@ -3,6 +3,7 @@ "../../protos/google/cloud/dialogflow/cx/v3beta1/audio_config.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/entity_type.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/environment.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/experiment.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/flow.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/fulfillment.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/intent.proto", diff --git a/src/v3beta1/entity_types_client.ts b/src/v3beta1/entity_types_client.ts index 1130dd51..0d43fcea 100644 --- a/src/v3beta1/entity_types_client.ts +++ b/src/v3beta1/entity_types_client.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -175,6 +175,9 @@ export class EntityTypesClient { environmentPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}' ), + experimentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/experiments/{experiment}' + ), flowPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}' ), @@ -1240,6 +1243,92 @@ export class EntityTypesClient { .environment; } + /** + * Return a fully-qualified experiment resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} environment + * @param {string} experiment + * @returns {string} Resource name string. + */ + experimentPath( + project: string, + location: string, + agent: string, + environment: string, + experiment: string + ) { + return this.pathTemplates.experimentPathTemplate.render({ + project: project, + location: location, + agent: agent, + environment: environment, + experiment: experiment, + }); + } + + /** + * Parse the project from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the project. + */ + matchProjectFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .project; + } + + /** + * Parse the location from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the location. + */ + matchLocationFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .location; + } + + /** + * Parse the agent from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .agent; + } + + /** + * Parse the environment from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .environment; + } + + /** + * Parse the experiment from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the experiment. + */ + matchExperimentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .experiment; + } + /** * Return a fully-qualified flow resource name string. * diff --git a/src/v3beta1/entity_types_proto_list.json b/src/v3beta1/entity_types_proto_list.json index 6e6cffbd..9046de0b 100644 --- a/src/v3beta1/entity_types_proto_list.json +++ b/src/v3beta1/entity_types_proto_list.json @@ -3,6 +3,7 @@ "../../protos/google/cloud/dialogflow/cx/v3beta1/audio_config.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/entity_type.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/environment.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/experiment.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/flow.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/fulfillment.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/intent.proto", diff --git a/src/v3beta1/environments_client.ts b/src/v3beta1/environments_client.ts index 17e07294..483d1e11 100644 --- a/src/v3beta1/environments_client.ts +++ b/src/v3beta1/environments_client.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -177,6 +177,9 @@ export class EnvironmentsClient { environmentPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}' ), + experimentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/experiments/{experiment}' + ), flowPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}' ), @@ -1501,6 +1504,92 @@ export class EnvironmentsClient { .environment; } + /** + * Return a fully-qualified experiment resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} environment + * @param {string} experiment + * @returns {string} Resource name string. + */ + experimentPath( + project: string, + location: string, + agent: string, + environment: string, + experiment: string + ) { + return this.pathTemplates.experimentPathTemplate.render({ + project: project, + location: location, + agent: agent, + environment: environment, + experiment: experiment, + }); + } + + /** + * Parse the project from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the project. + */ + matchProjectFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .project; + } + + /** + * Parse the location from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the location. + */ + matchLocationFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .location; + } + + /** + * Parse the agent from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .agent; + } + + /** + * Parse the environment from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .environment; + } + + /** + * Parse the experiment from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the experiment. + */ + matchExperimentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .experiment; + } + /** * Return a fully-qualified flow resource name string. * diff --git a/src/v3beta1/environments_proto_list.json b/src/v3beta1/environments_proto_list.json index 6e6cffbd..9046de0b 100644 --- a/src/v3beta1/environments_proto_list.json +++ b/src/v3beta1/environments_proto_list.json @@ -3,6 +3,7 @@ "../../protos/google/cloud/dialogflow/cx/v3beta1/audio_config.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/entity_type.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/environment.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/experiment.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/flow.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/fulfillment.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/intent.proto", diff --git a/src/v3beta1/experiments_client.ts b/src/v3beta1/experiments_client.ts new file mode 100644 index 00000000..9d57735b --- /dev/null +++ b/src/v3beta1/experiments_client.ts @@ -0,0 +1,2257 @@ +// Copyright 2021 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import * as gax from 'google-gax'; +import { + Callback, + CallOptions, + Descriptors, + ClientOptions, + PaginationCallback, + GaxCall, +} from 'google-gax'; +import * as path from 'path'; + +import {Transform} from 'stream'; +import {RequestType} from 'google-gax/build/src/apitypes'; +import * as protos from '../../protos/protos'; +/** + * Client JSON configuration object, loaded from + * `src/v3beta1/experiments_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './experiments_client_config.json'; + +const version = require('../../../package.json').version; + +/** + * Service for managing {@link google.cloud.dialogflow.cx.v3beta1.Experiment|Experiments}. + * @class + * @memberof v3beta1 + */ +export class ExperimentsClient { + private _terminated = false; + private _opts: ClientOptions; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + innerApiCalls: {[name: string]: Function}; + pathTemplates: {[name: string]: gax.PathTemplate}; + experimentsStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of ExperimentsClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP fallback mode. + * In fallback mode, a special browser-compatible transport implementation is used + * instead of gRPC transport. In browser context (if the `window` object is defined) + * the fallback mode is enabled automatically; set `options.fallback` to `false` + * if you need to override this behavior. + */ + constructor(opts?: ClientOptions) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof ExperimentsClient; + const servicePath = + opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = + opts?.fallback ?? + (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gax.fallback : gax; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = this._gaxGrpc.auth as gax.GoogleAuth; + + // Set the default scopes in auth client if needed. + if (servicePath === staticMembers.servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; + if (typeof process !== 'undefined' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + // For Node.js, pass the path to JSON proto file. + // For browsers, pass the JSON content. + + const nodejsProtoPath = path.join( + __dirname, + '..', + '..', + 'protos', + 'protos.json' + ); + this._protos = this._gaxGrpc.loadProto( + opts.fallback + ? // eslint-disable-next-line @typescript-eslint/no-var-requires + require('../../protos/protos.json') + : nodejsProtoPath + ); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + agentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}' + ), + entityTypePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/entityTypes/{entity_type}' + ), + environmentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}' + ), + experimentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/experiments/{experiment}' + ), + flowPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}' + ), + intentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/intents/{intent}' + ), + locationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}' + ), + pagePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/pages/{page}' + ), + projectPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}' + ), + projectLocationAgentEnvironmentSessionEntityTypePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/sessions/{session}/entityTypes/{entity_type}' + ), + projectLocationAgentSessionEntityTypePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/sessions/{session}/entityTypes/{entity_type}' + ), + securitySettingsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/securitySettings/{security_settings}' + ), + transitionRouteGroupPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/transitionRouteGroups/{transition_route_group}' + ), + versionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/versions/{version}' + ), + webhookPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/webhooks/{webhook}' + ), + }; + + // Some of the methods on this service return "paged" results, + // (e.g. 50 results at a time, with tokens to get subsequent + // pages). Denote the keys used for pagination and results. + this.descriptors.page = { + listExperiments: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'experiments' + ), + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.dialogflow.cx.v3beta1.Experiments', + gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, + {'x-goog-api-client': clientHeader.join(' ')} + ); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.experimentsStub) { + return this.experimentsStub; + } + + // Put together the "service stub" for + // google.cloud.dialogflow.cx.v3beta1.Experiments. + this.experimentsStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.cloud.dialogflow.cx.v3beta1.Experiments' + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.dialogflow.cx.v3beta1.Experiments, + this._opts + ) as Promise<{[method: string]: Function}>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const experimentsStubMethods = [ + 'listExperiments', + 'getExperiment', + 'createExperiment', + 'updateExperiment', + 'deleteExperiment', + 'startExperiment', + 'stopExperiment', + ]; + for (const methodName of experimentsStubMethods) { + const callPromise = this.experimentsStub.then( + stub => (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error | null | undefined) => () => { + throw err; + } + ); + + const descriptor = this.descriptors.page[methodName] || undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.experimentsStub; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + return 'dialogflow.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + return 'dialogflow.googleapis.com'; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/dialogflow', + ]; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId( + callback?: Callback + ): Promise | void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- + getExperiment( + request: protos.google.cloud.dialogflow.cx.v3beta1.IGetExperimentRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dialogflow.cx.v3beta1.IExperiment, + ( + | protos.google.cloud.dialogflow.cx.v3beta1.IGetExperimentRequest + | undefined + ), + {} | undefined + ] + >; + getExperiment( + request: protos.google.cloud.dialogflow.cx.v3beta1.IGetExperimentRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dialogflow.cx.v3beta1.IExperiment, + | protos.google.cloud.dialogflow.cx.v3beta1.IGetExperimentRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getExperiment( + request: protos.google.cloud.dialogflow.cx.v3beta1.IGetExperimentRequest, + callback: Callback< + protos.google.cloud.dialogflow.cx.v3beta1.IExperiment, + | protos.google.cloud.dialogflow.cx.v3beta1.IGetExperimentRequest + | null + | undefined, + {} | null | undefined + > + ): void; + /** + * Retrieves the specified {@link google.cloud.dialogflow.cx.v3beta1.Experiment|Experiment}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the {@link google.cloud.dialogflow.cx.v3beta1.Environment|Environment}. + * Format: `projects//locations//agents//environments//experiments/`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Experiment]{@link google.cloud.dialogflow.cx.v3beta1.Experiment}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.getExperiment(request); + */ + getExperiment( + request: protos.google.cloud.dialogflow.cx.v3beta1.IGetExperimentRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dialogflow.cx.v3beta1.IExperiment, + | protos.google.cloud.dialogflow.cx.v3beta1.IGetExperimentRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dialogflow.cx.v3beta1.IExperiment, + | protos.google.cloud.dialogflow.cx.v3beta1.IGetExperimentRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dialogflow.cx.v3beta1.IExperiment, + ( + | protos.google.cloud.dialogflow.cx.v3beta1.IGetExperimentRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.getExperiment(request, options, callback); + } + createExperiment( + request: protos.google.cloud.dialogflow.cx.v3beta1.ICreateExperimentRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dialogflow.cx.v3beta1.IExperiment, + ( + | protos.google.cloud.dialogflow.cx.v3beta1.ICreateExperimentRequest + | undefined + ), + {} | undefined + ] + >; + createExperiment( + request: protos.google.cloud.dialogflow.cx.v3beta1.ICreateExperimentRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dialogflow.cx.v3beta1.IExperiment, + | protos.google.cloud.dialogflow.cx.v3beta1.ICreateExperimentRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createExperiment( + request: protos.google.cloud.dialogflow.cx.v3beta1.ICreateExperimentRequest, + callback: Callback< + protos.google.cloud.dialogflow.cx.v3beta1.IExperiment, + | protos.google.cloud.dialogflow.cx.v3beta1.ICreateExperimentRequest + | null + | undefined, + {} | null | undefined + > + ): void; + /** + * Creates an {@link google.cloud.dialogflow.cx.v3beta1.Experiment|Experiment} in the specified {@link google.cloud.dialogflow.cx.v3beta1.Environment|Environment}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The {@link google.cloud.dialogflow.cx.v3beta1.Agent|Agent} to create an {@link google.cloud.dialogflow.cx.v3beta1.Environment|Environment} for. + * Format: `projects//locations//agents//environments/`. + * @param {google.cloud.dialogflow.cx.v3beta1.Experiment} request.experiment + * Required. The experiment to create. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Experiment]{@link google.cloud.dialogflow.cx.v3beta1.Experiment}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.createExperiment(request); + */ + createExperiment( + request: protos.google.cloud.dialogflow.cx.v3beta1.ICreateExperimentRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dialogflow.cx.v3beta1.IExperiment, + | protos.google.cloud.dialogflow.cx.v3beta1.ICreateExperimentRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dialogflow.cx.v3beta1.IExperiment, + | protos.google.cloud.dialogflow.cx.v3beta1.ICreateExperimentRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dialogflow.cx.v3beta1.IExperiment, + ( + | protos.google.cloud.dialogflow.cx.v3beta1.ICreateExperimentRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.createExperiment(request, options, callback); + } + updateExperiment( + request: protos.google.cloud.dialogflow.cx.v3beta1.IUpdateExperimentRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dialogflow.cx.v3beta1.IExperiment, + ( + | protos.google.cloud.dialogflow.cx.v3beta1.IUpdateExperimentRequest + | undefined + ), + {} | undefined + ] + >; + updateExperiment( + request: protos.google.cloud.dialogflow.cx.v3beta1.IUpdateExperimentRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dialogflow.cx.v3beta1.IExperiment, + | protos.google.cloud.dialogflow.cx.v3beta1.IUpdateExperimentRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateExperiment( + request: protos.google.cloud.dialogflow.cx.v3beta1.IUpdateExperimentRequest, + callback: Callback< + protos.google.cloud.dialogflow.cx.v3beta1.IExperiment, + | protos.google.cloud.dialogflow.cx.v3beta1.IUpdateExperimentRequest + | null + | undefined, + {} | null | undefined + > + ): void; + /** + * Updates the specified {@link google.cloud.dialogflow.cx.v3beta1.Experiment|Experiment}. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.dialogflow.cx.v3beta1.Experiment} request.experiment + * Required. The experiment to update. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. The mask to control which fields get updated. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Experiment]{@link google.cloud.dialogflow.cx.v3beta1.Experiment}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.updateExperiment(request); + */ + updateExperiment( + request: protos.google.cloud.dialogflow.cx.v3beta1.IUpdateExperimentRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dialogflow.cx.v3beta1.IExperiment, + | protos.google.cloud.dialogflow.cx.v3beta1.IUpdateExperimentRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dialogflow.cx.v3beta1.IExperiment, + | protos.google.cloud.dialogflow.cx.v3beta1.IUpdateExperimentRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dialogflow.cx.v3beta1.IExperiment, + ( + | protos.google.cloud.dialogflow.cx.v3beta1.IUpdateExperimentRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + 'experiment.name': request.experiment!.name || '', + }); + this.initialize(); + return this.innerApiCalls.updateExperiment(request, options, callback); + } + deleteExperiment( + request: protos.google.cloud.dialogflow.cx.v3beta1.IDeleteExperimentRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.dialogflow.cx.v3beta1.IDeleteExperimentRequest + | undefined + ), + {} | undefined + ] + >; + deleteExperiment( + request: protos.google.cloud.dialogflow.cx.v3beta1.IDeleteExperimentRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dialogflow.cx.v3beta1.IDeleteExperimentRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteExperiment( + request: protos.google.cloud.dialogflow.cx.v3beta1.IDeleteExperimentRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dialogflow.cx.v3beta1.IDeleteExperimentRequest + | null + | undefined, + {} | null | undefined + > + ): void; + /** + * Deletes the specified {@link google.cloud.dialogflow.cx.v3beta1.Experiment|Experiment}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the {@link google.cloud.dialogflow.cx.v3beta1.Environment|Environment} to delete. + * Format: `projects//locations//agents//environments//experiments/`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.deleteExperiment(request); + */ + deleteExperiment( + request: protos.google.cloud.dialogflow.cx.v3beta1.IDeleteExperimentRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dialogflow.cx.v3beta1.IDeleteExperimentRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dialogflow.cx.v3beta1.IDeleteExperimentRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.dialogflow.cx.v3beta1.IDeleteExperimentRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.deleteExperiment(request, options, callback); + } + startExperiment( + request: protos.google.cloud.dialogflow.cx.v3beta1.IStartExperimentRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dialogflow.cx.v3beta1.IExperiment, + ( + | protos.google.cloud.dialogflow.cx.v3beta1.IStartExperimentRequest + | undefined + ), + {} | undefined + ] + >; + startExperiment( + request: protos.google.cloud.dialogflow.cx.v3beta1.IStartExperimentRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dialogflow.cx.v3beta1.IExperiment, + | protos.google.cloud.dialogflow.cx.v3beta1.IStartExperimentRequest + | null + | undefined, + {} | null | undefined + > + ): void; + startExperiment( + request: protos.google.cloud.dialogflow.cx.v3beta1.IStartExperimentRequest, + callback: Callback< + protos.google.cloud.dialogflow.cx.v3beta1.IExperiment, + | protos.google.cloud.dialogflow.cx.v3beta1.IStartExperimentRequest + | null + | undefined, + {} | null | undefined + > + ): void; + /** + * Starts the specified {@link google.cloud.dialogflow.cx.v3beta1.Experiment|Experiment}. This rpc only changes the state of + * experiment from PENDING to RUNNING. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Resource name of the experiment to start. + * Format: `projects//locations//agents//environments//experiments/`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Experiment]{@link google.cloud.dialogflow.cx.v3beta1.Experiment}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.startExperiment(request); + */ + startExperiment( + request: protos.google.cloud.dialogflow.cx.v3beta1.IStartExperimentRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dialogflow.cx.v3beta1.IExperiment, + | protos.google.cloud.dialogflow.cx.v3beta1.IStartExperimentRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dialogflow.cx.v3beta1.IExperiment, + | protos.google.cloud.dialogflow.cx.v3beta1.IStartExperimentRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dialogflow.cx.v3beta1.IExperiment, + ( + | protos.google.cloud.dialogflow.cx.v3beta1.IStartExperimentRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.startExperiment(request, options, callback); + } + stopExperiment( + request: protos.google.cloud.dialogflow.cx.v3beta1.IStopExperimentRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dialogflow.cx.v3beta1.IExperiment, + ( + | protos.google.cloud.dialogflow.cx.v3beta1.IStopExperimentRequest + | undefined + ), + {} | undefined + ] + >; + stopExperiment( + request: protos.google.cloud.dialogflow.cx.v3beta1.IStopExperimentRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dialogflow.cx.v3beta1.IExperiment, + | protos.google.cloud.dialogflow.cx.v3beta1.IStopExperimentRequest + | null + | undefined, + {} | null | undefined + > + ): void; + stopExperiment( + request: protos.google.cloud.dialogflow.cx.v3beta1.IStopExperimentRequest, + callback: Callback< + protos.google.cloud.dialogflow.cx.v3beta1.IExperiment, + | protos.google.cloud.dialogflow.cx.v3beta1.IStopExperimentRequest + | null + | undefined, + {} | null | undefined + > + ): void; + /** + * Stops the specified {@link google.cloud.dialogflow.cx.v3beta1.Experiment|Experiment}. This rpc only changes the state of + * experiment from RUNNING to DONE. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Resource name of the experiment to stop. + * Format: `projects//locations//agents//environments//experiments/`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Experiment]{@link google.cloud.dialogflow.cx.v3beta1.Experiment}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.stopExperiment(request); + */ + stopExperiment( + request: protos.google.cloud.dialogflow.cx.v3beta1.IStopExperimentRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dialogflow.cx.v3beta1.IExperiment, + | protos.google.cloud.dialogflow.cx.v3beta1.IStopExperimentRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dialogflow.cx.v3beta1.IExperiment, + | protos.google.cloud.dialogflow.cx.v3beta1.IStopExperimentRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dialogflow.cx.v3beta1.IExperiment, + ( + | protos.google.cloud.dialogflow.cx.v3beta1.IStopExperimentRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.stopExperiment(request, options, callback); + } + + listExperiments( + request: protos.google.cloud.dialogflow.cx.v3beta1.IListExperimentsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dialogflow.cx.v3beta1.IExperiment[], + protos.google.cloud.dialogflow.cx.v3beta1.IListExperimentsRequest | null, + protos.google.cloud.dialogflow.cx.v3beta1.IListExperimentsResponse + ] + >; + listExperiments( + request: protos.google.cloud.dialogflow.cx.v3beta1.IListExperimentsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dialogflow.cx.v3beta1.IListExperimentsRequest, + | protos.google.cloud.dialogflow.cx.v3beta1.IListExperimentsResponse + | null + | undefined, + protos.google.cloud.dialogflow.cx.v3beta1.IExperiment + > + ): void; + listExperiments( + request: protos.google.cloud.dialogflow.cx.v3beta1.IListExperimentsRequest, + callback: PaginationCallback< + protos.google.cloud.dialogflow.cx.v3beta1.IListExperimentsRequest, + | protos.google.cloud.dialogflow.cx.v3beta1.IListExperimentsResponse + | null + | undefined, + protos.google.cloud.dialogflow.cx.v3beta1.IExperiment + > + ): void; + /** + * Returns the list of all experiments in the specified {@link google.cloud.dialogflow.cx.v3beta1.Environment|Environment}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The {@link google.cloud.dialogflow.cx.v3beta1.Environment|Environment} to list all environments for. + * Format: `projects//locations//agents//environments/`. + * @param {number} request.pageSize + * The maximum number of items to return in a single page. By default 20 and + * at most 100. + * @param {string} request.pageToken + * The next_page_token value returned from a previous list request. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [Experiment]{@link google.cloud.dialogflow.cx.v3beta1.Experiment}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listExperimentsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listExperiments( + request: protos.google.cloud.dialogflow.cx.v3beta1.IListExperimentsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.dialogflow.cx.v3beta1.IListExperimentsRequest, + | protos.google.cloud.dialogflow.cx.v3beta1.IListExperimentsResponse + | null + | undefined, + protos.google.cloud.dialogflow.cx.v3beta1.IExperiment + >, + callback?: PaginationCallback< + protos.google.cloud.dialogflow.cx.v3beta1.IListExperimentsRequest, + | protos.google.cloud.dialogflow.cx.v3beta1.IListExperimentsResponse + | null + | undefined, + protos.google.cloud.dialogflow.cx.v3beta1.IExperiment + > + ): Promise< + [ + protos.google.cloud.dialogflow.cx.v3beta1.IExperiment[], + protos.google.cloud.dialogflow.cx.v3beta1.IListExperimentsRequest | null, + protos.google.cloud.dialogflow.cx.v3beta1.IListExperimentsResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.listExperiments(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The {@link google.cloud.dialogflow.cx.v3beta1.Environment|Environment} to list all environments for. + * Format: `projects//locations//agents//environments/`. + * @param {number} request.pageSize + * The maximum number of items to return in a single page. By default 20 and + * at most 100. + * @param {string} request.pageToken + * The next_page_token value returned from a previous list request. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing [Experiment]{@link google.cloud.dialogflow.cx.v3beta1.Experiment} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listExperimentsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listExperimentsStream( + request?: protos.google.cloud.dialogflow.cx.v3beta1.IListExperimentsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const callSettings = new gax.CallSettings(options); + this.initialize(); + return this.descriptors.page.listExperiments.createStream( + this.innerApiCalls.listExperiments as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listExperiments`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The {@link google.cloud.dialogflow.cx.v3beta1.Environment|Environment} to list all environments for. + * Format: `projects//locations//agents//environments/`. + * @param {number} request.pageSize + * The maximum number of items to return in a single page. By default 20 and + * at most 100. + * @param {string} request.pageToken + * The next_page_token value returned from a previous list request. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [Experiment]{@link google.cloud.dialogflow.cx.v3beta1.Experiment}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example + * const iterable = client.listExperimentsAsync(request); + * for await (const response of iterable) { + * // process response + * } + */ + listExperimentsAsync( + request?: protos.google.cloud.dialogflow.cx.v3beta1.IListExperimentsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + options = options || {}; + const callSettings = new gax.CallSettings(options); + this.initialize(); + return this.descriptors.page.listExperiments.asyncIterate( + this.innerApiCalls['listExperiments'] as GaxCall, + (request as unknown) as RequestType, + callSettings + ) as AsyncIterable; + } + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified agent resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @returns {string} Resource name string. + */ + agentPath(project: string, location: string, agent: string) { + return this.pathTemplates.agentPathTemplate.render({ + project: project, + location: location, + agent: agent, + }); + } + + /** + * Parse the project from Agent resource. + * + * @param {string} agentName + * A fully-qualified path representing Agent resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAgentName(agentName: string) { + return this.pathTemplates.agentPathTemplate.match(agentName).project; + } + + /** + * Parse the location from Agent resource. + * + * @param {string} agentName + * A fully-qualified path representing Agent resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAgentName(agentName: string) { + return this.pathTemplates.agentPathTemplate.match(agentName).location; + } + + /** + * Parse the agent from Agent resource. + * + * @param {string} agentName + * A fully-qualified path representing Agent resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromAgentName(agentName: string) { + return this.pathTemplates.agentPathTemplate.match(agentName).agent; + } + + /** + * Return a fully-qualified entityType resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} entity_type + * @returns {string} Resource name string. + */ + entityTypePath( + project: string, + location: string, + agent: string, + entityType: string + ) { + return this.pathTemplates.entityTypePathTemplate.render({ + project: project, + location: location, + agent: agent, + entity_type: entityType, + }); + } + + /** + * Parse the project from EntityType resource. + * + * @param {string} entityTypeName + * A fully-qualified path representing EntityType resource. + * @returns {string} A string representing the project. + */ + matchProjectFromEntityTypeName(entityTypeName: string) { + return this.pathTemplates.entityTypePathTemplate.match(entityTypeName) + .project; + } + + /** + * Parse the location from EntityType resource. + * + * @param {string} entityTypeName + * A fully-qualified path representing EntityType resource. + * @returns {string} A string representing the location. + */ + matchLocationFromEntityTypeName(entityTypeName: string) { + return this.pathTemplates.entityTypePathTemplate.match(entityTypeName) + .location; + } + + /** + * Parse the agent from EntityType resource. + * + * @param {string} entityTypeName + * A fully-qualified path representing EntityType resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromEntityTypeName(entityTypeName: string) { + return this.pathTemplates.entityTypePathTemplate.match(entityTypeName) + .agent; + } + + /** + * Parse the entity_type from EntityType resource. + * + * @param {string} entityTypeName + * A fully-qualified path representing EntityType resource. + * @returns {string} A string representing the entity_type. + */ + matchEntityTypeFromEntityTypeName(entityTypeName: string) { + return this.pathTemplates.entityTypePathTemplate.match(entityTypeName) + .entity_type; + } + + /** + * Return a fully-qualified environment resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} environment + * @returns {string} Resource name string. + */ + environmentPath( + project: string, + location: string, + agent: string, + environment: string + ) { + return this.pathTemplates.environmentPathTemplate.render({ + project: project, + location: location, + agent: agent, + environment: environment, + }); + } + + /** + * Parse the project from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the project. + */ + matchProjectFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName) + .project; + } + + /** + * Parse the location from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the location. + */ + matchLocationFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName) + .location; + } + + /** + * Parse the agent from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName) + .agent; + } + + /** + * Parse the environment from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName) + .environment; + } + + /** + * Return a fully-qualified experiment resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} environment + * @param {string} experiment + * @returns {string} Resource name string. + */ + experimentPath( + project: string, + location: string, + agent: string, + environment: string, + experiment: string + ) { + return this.pathTemplates.experimentPathTemplate.render({ + project: project, + location: location, + agent: agent, + environment: environment, + experiment: experiment, + }); + } + + /** + * Parse the project from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the project. + */ + matchProjectFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .project; + } + + /** + * Parse the location from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the location. + */ + matchLocationFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .location; + } + + /** + * Parse the agent from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .agent; + } + + /** + * Parse the environment from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .environment; + } + + /** + * Parse the experiment from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the experiment. + */ + matchExperimentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .experiment; + } + + /** + * Return a fully-qualified flow resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} flow + * @returns {string} Resource name string. + */ + flowPath(project: string, location: string, agent: string, flow: string) { + return this.pathTemplates.flowPathTemplate.render({ + project: project, + location: location, + agent: agent, + flow: flow, + }); + } + + /** + * Parse the project from Flow resource. + * + * @param {string} flowName + * A fully-qualified path representing Flow resource. + * @returns {string} A string representing the project. + */ + matchProjectFromFlowName(flowName: string) { + return this.pathTemplates.flowPathTemplate.match(flowName).project; + } + + /** + * Parse the location from Flow resource. + * + * @param {string} flowName + * A fully-qualified path representing Flow resource. + * @returns {string} A string representing the location. + */ + matchLocationFromFlowName(flowName: string) { + return this.pathTemplates.flowPathTemplate.match(flowName).location; + } + + /** + * Parse the agent from Flow resource. + * + * @param {string} flowName + * A fully-qualified path representing Flow resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromFlowName(flowName: string) { + return this.pathTemplates.flowPathTemplate.match(flowName).agent; + } + + /** + * Parse the flow from Flow resource. + * + * @param {string} flowName + * A fully-qualified path representing Flow resource. + * @returns {string} A string representing the flow. + */ + matchFlowFromFlowName(flowName: string) { + return this.pathTemplates.flowPathTemplate.match(flowName).flow; + } + + /** + * Return a fully-qualified intent resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} intent + * @returns {string} Resource name string. + */ + intentPath(project: string, location: string, agent: string, intent: string) { + return this.pathTemplates.intentPathTemplate.render({ + project: project, + location: location, + agent: agent, + intent: intent, + }); + } + + /** + * Parse the project from Intent resource. + * + * @param {string} intentName + * A fully-qualified path representing Intent resource. + * @returns {string} A string representing the project. + */ + matchProjectFromIntentName(intentName: string) { + return this.pathTemplates.intentPathTemplate.match(intentName).project; + } + + /** + * Parse the location from Intent resource. + * + * @param {string} intentName + * A fully-qualified path representing Intent resource. + * @returns {string} A string representing the location. + */ + matchLocationFromIntentName(intentName: string) { + return this.pathTemplates.intentPathTemplate.match(intentName).location; + } + + /** + * Parse the agent from Intent resource. + * + * @param {string} intentName + * A fully-qualified path representing Intent resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromIntentName(intentName: string) { + return this.pathTemplates.intentPathTemplate.match(intentName).agent; + } + + /** + * Parse the intent from Intent resource. + * + * @param {string} intentName + * A fully-qualified path representing Intent resource. + * @returns {string} A string representing the intent. + */ + matchIntentFromIntentName(intentName: string) { + return this.pathTemplates.intentPathTemplate.match(intentName).intent; + } + + /** + * Return a fully-qualified location resource name string. + * + * @param {string} project + * @param {string} location + * @returns {string} Resource name string. + */ + locationPath(project: string, location: string) { + return this.pathTemplates.locationPathTemplate.render({ + project: project, + location: location, + }); + } + + /** + * Parse the project from Location resource. + * + * @param {string} locationName + * A fully-qualified path representing Location resource. + * @returns {string} A string representing the project. + */ + matchProjectFromLocationName(locationName: string) { + return this.pathTemplates.locationPathTemplate.match(locationName).project; + } + + /** + * Parse the location from Location resource. + * + * @param {string} locationName + * A fully-qualified path representing Location resource. + * @returns {string} A string representing the location. + */ + matchLocationFromLocationName(locationName: string) { + return this.pathTemplates.locationPathTemplate.match(locationName).location; + } + + /** + * Return a fully-qualified page resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} flow + * @param {string} page + * @returns {string} Resource name string. + */ + pagePath( + project: string, + location: string, + agent: string, + flow: string, + page: string + ) { + return this.pathTemplates.pagePathTemplate.render({ + project: project, + location: location, + agent: agent, + flow: flow, + page: page, + }); + } + + /** + * Parse the project from Page resource. + * + * @param {string} pageName + * A fully-qualified path representing Page resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPageName(pageName: string) { + return this.pathTemplates.pagePathTemplate.match(pageName).project; + } + + /** + * Parse the location from Page resource. + * + * @param {string} pageName + * A fully-qualified path representing Page resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPageName(pageName: string) { + return this.pathTemplates.pagePathTemplate.match(pageName).location; + } + + /** + * Parse the agent from Page resource. + * + * @param {string} pageName + * A fully-qualified path representing Page resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromPageName(pageName: string) { + return this.pathTemplates.pagePathTemplate.match(pageName).agent; + } + + /** + * Parse the flow from Page resource. + * + * @param {string} pageName + * A fully-qualified path representing Page resource. + * @returns {string} A string representing the flow. + */ + matchFlowFromPageName(pageName: string) { + return this.pathTemplates.pagePathTemplate.match(pageName).flow; + } + + /** + * Parse the page from Page resource. + * + * @param {string} pageName + * A fully-qualified path representing Page resource. + * @returns {string} A string representing the page. + */ + matchPageFromPageName(pageName: string) { + return this.pathTemplates.pagePathTemplate.match(pageName).page; + } + + /** + * Return a fully-qualified project resource name string. + * + * @param {string} project + * @returns {string} Resource name string. + */ + projectPath(project: string) { + return this.pathTemplates.projectPathTemplate.render({ + project: project, + }); + } + + /** + * Parse the project from Project resource. + * + * @param {string} projectName + * A fully-qualified path representing Project resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectName(projectName: string) { + return this.pathTemplates.projectPathTemplate.match(projectName).project; + } + + /** + * Return a fully-qualified projectLocationAgentEnvironmentSessionEntityType resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} environment + * @param {string} session + * @param {string} entity_type + * @returns {string} Resource name string. + */ + projectLocationAgentEnvironmentSessionEntityTypePath( + project: string, + location: string, + agent: string, + environment: string, + session: string, + entityType: string + ) { + return this.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.render( + { + project: project, + location: location, + agent: agent, + environment: environment, + session: session, + entity_type: entityType, + } + ); + } + + /** + * Parse the project from ProjectLocationAgentEnvironmentSessionEntityType resource. + * + * @param {string} projectLocationAgentEnvironmentSessionEntityTypeName + * A fully-qualified path representing project_location_agent_environment_session_entity_type resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationAgentEnvironmentSessionEntityTypeName( + projectLocationAgentEnvironmentSessionEntityTypeName: string + ) { + return this.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match( + projectLocationAgentEnvironmentSessionEntityTypeName + ).project; + } + + /** + * Parse the location from ProjectLocationAgentEnvironmentSessionEntityType resource. + * + * @param {string} projectLocationAgentEnvironmentSessionEntityTypeName + * A fully-qualified path representing project_location_agent_environment_session_entity_type resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationAgentEnvironmentSessionEntityTypeName( + projectLocationAgentEnvironmentSessionEntityTypeName: string + ) { + return this.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match( + projectLocationAgentEnvironmentSessionEntityTypeName + ).location; + } + + /** + * Parse the agent from ProjectLocationAgentEnvironmentSessionEntityType resource. + * + * @param {string} projectLocationAgentEnvironmentSessionEntityTypeName + * A fully-qualified path representing project_location_agent_environment_session_entity_type resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromProjectLocationAgentEnvironmentSessionEntityTypeName( + projectLocationAgentEnvironmentSessionEntityTypeName: string + ) { + return this.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match( + projectLocationAgentEnvironmentSessionEntityTypeName + ).agent; + } + + /** + * Parse the environment from ProjectLocationAgentEnvironmentSessionEntityType resource. + * + * @param {string} projectLocationAgentEnvironmentSessionEntityTypeName + * A fully-qualified path representing project_location_agent_environment_session_entity_type resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromProjectLocationAgentEnvironmentSessionEntityTypeName( + projectLocationAgentEnvironmentSessionEntityTypeName: string + ) { + return this.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match( + projectLocationAgentEnvironmentSessionEntityTypeName + ).environment; + } + + /** + * Parse the session from ProjectLocationAgentEnvironmentSessionEntityType resource. + * + * @param {string} projectLocationAgentEnvironmentSessionEntityTypeName + * A fully-qualified path representing project_location_agent_environment_session_entity_type resource. + * @returns {string} A string representing the session. + */ + matchSessionFromProjectLocationAgentEnvironmentSessionEntityTypeName( + projectLocationAgentEnvironmentSessionEntityTypeName: string + ) { + return this.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match( + projectLocationAgentEnvironmentSessionEntityTypeName + ).session; + } + + /** + * Parse the entity_type from ProjectLocationAgentEnvironmentSessionEntityType resource. + * + * @param {string} projectLocationAgentEnvironmentSessionEntityTypeName + * A fully-qualified path representing project_location_agent_environment_session_entity_type resource. + * @returns {string} A string representing the entity_type. + */ + matchEntityTypeFromProjectLocationAgentEnvironmentSessionEntityTypeName( + projectLocationAgentEnvironmentSessionEntityTypeName: string + ) { + return this.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match( + projectLocationAgentEnvironmentSessionEntityTypeName + ).entity_type; + } + + /** + * Return a fully-qualified projectLocationAgentSessionEntityType resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} session + * @param {string} entity_type + * @returns {string} Resource name string. + */ + projectLocationAgentSessionEntityTypePath( + project: string, + location: string, + agent: string, + session: string, + entityType: string + ) { + return this.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render( + { + project: project, + location: location, + agent: agent, + session: session, + entity_type: entityType, + } + ); + } + + /** + * Parse the project from ProjectLocationAgentSessionEntityType resource. + * + * @param {string} projectLocationAgentSessionEntityTypeName + * A fully-qualified path representing project_location_agent_session_entity_type resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationAgentSessionEntityTypeName( + projectLocationAgentSessionEntityTypeName: string + ) { + return this.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match( + projectLocationAgentSessionEntityTypeName + ).project; + } + + /** + * Parse the location from ProjectLocationAgentSessionEntityType resource. + * + * @param {string} projectLocationAgentSessionEntityTypeName + * A fully-qualified path representing project_location_agent_session_entity_type resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationAgentSessionEntityTypeName( + projectLocationAgentSessionEntityTypeName: string + ) { + return this.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match( + projectLocationAgentSessionEntityTypeName + ).location; + } + + /** + * Parse the agent from ProjectLocationAgentSessionEntityType resource. + * + * @param {string} projectLocationAgentSessionEntityTypeName + * A fully-qualified path representing project_location_agent_session_entity_type resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromProjectLocationAgentSessionEntityTypeName( + projectLocationAgentSessionEntityTypeName: string + ) { + return this.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match( + projectLocationAgentSessionEntityTypeName + ).agent; + } + + /** + * Parse the session from ProjectLocationAgentSessionEntityType resource. + * + * @param {string} projectLocationAgentSessionEntityTypeName + * A fully-qualified path representing project_location_agent_session_entity_type resource. + * @returns {string} A string representing the session. + */ + matchSessionFromProjectLocationAgentSessionEntityTypeName( + projectLocationAgentSessionEntityTypeName: string + ) { + return this.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match( + projectLocationAgentSessionEntityTypeName + ).session; + } + + /** + * Parse the entity_type from ProjectLocationAgentSessionEntityType resource. + * + * @param {string} projectLocationAgentSessionEntityTypeName + * A fully-qualified path representing project_location_agent_session_entity_type resource. + * @returns {string} A string representing the entity_type. + */ + matchEntityTypeFromProjectLocationAgentSessionEntityTypeName( + projectLocationAgentSessionEntityTypeName: string + ) { + return this.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match( + projectLocationAgentSessionEntityTypeName + ).entity_type; + } + + /** + * Return a fully-qualified securitySettings resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} security_settings + * @returns {string} Resource name string. + */ + securitySettingsPath( + project: string, + location: string, + securitySettings: string + ) { + return this.pathTemplates.securitySettingsPathTemplate.render({ + project: project, + location: location, + security_settings: securitySettings, + }); + } + + /** + * Parse the project from SecuritySettings resource. + * + * @param {string} securitySettingsName + * A fully-qualified path representing SecuritySettings resource. + * @returns {string} A string representing the project. + */ + matchProjectFromSecuritySettingsName(securitySettingsName: string) { + return this.pathTemplates.securitySettingsPathTemplate.match( + securitySettingsName + ).project; + } + + /** + * Parse the location from SecuritySettings resource. + * + * @param {string} securitySettingsName + * A fully-qualified path representing SecuritySettings resource. + * @returns {string} A string representing the location. + */ + matchLocationFromSecuritySettingsName(securitySettingsName: string) { + return this.pathTemplates.securitySettingsPathTemplate.match( + securitySettingsName + ).location; + } + + /** + * Parse the security_settings from SecuritySettings resource. + * + * @param {string} securitySettingsName + * A fully-qualified path representing SecuritySettings resource. + * @returns {string} A string representing the security_settings. + */ + matchSecuritySettingsFromSecuritySettingsName(securitySettingsName: string) { + return this.pathTemplates.securitySettingsPathTemplate.match( + securitySettingsName + ).security_settings; + } + + /** + * Return a fully-qualified transitionRouteGroup resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} flow + * @param {string} transition_route_group + * @returns {string} Resource name string. + */ + transitionRouteGroupPath( + project: string, + location: string, + agent: string, + flow: string, + transitionRouteGroup: string + ) { + return this.pathTemplates.transitionRouteGroupPathTemplate.render({ + project: project, + location: location, + agent: agent, + flow: flow, + transition_route_group: transitionRouteGroup, + }); + } + + /** + * Parse the project from TransitionRouteGroup resource. + * + * @param {string} transitionRouteGroupName + * A fully-qualified path representing TransitionRouteGroup resource. + * @returns {string} A string representing the project. + */ + matchProjectFromTransitionRouteGroupName(transitionRouteGroupName: string) { + return this.pathTemplates.transitionRouteGroupPathTemplate.match( + transitionRouteGroupName + ).project; + } + + /** + * Parse the location from TransitionRouteGroup resource. + * + * @param {string} transitionRouteGroupName + * A fully-qualified path representing TransitionRouteGroup resource. + * @returns {string} A string representing the location. + */ + matchLocationFromTransitionRouteGroupName(transitionRouteGroupName: string) { + return this.pathTemplates.transitionRouteGroupPathTemplate.match( + transitionRouteGroupName + ).location; + } + + /** + * Parse the agent from TransitionRouteGroup resource. + * + * @param {string} transitionRouteGroupName + * A fully-qualified path representing TransitionRouteGroup resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromTransitionRouteGroupName(transitionRouteGroupName: string) { + return this.pathTemplates.transitionRouteGroupPathTemplate.match( + transitionRouteGroupName + ).agent; + } + + /** + * Parse the flow from TransitionRouteGroup resource. + * + * @param {string} transitionRouteGroupName + * A fully-qualified path representing TransitionRouteGroup resource. + * @returns {string} A string representing the flow. + */ + matchFlowFromTransitionRouteGroupName(transitionRouteGroupName: string) { + return this.pathTemplates.transitionRouteGroupPathTemplate.match( + transitionRouteGroupName + ).flow; + } + + /** + * Parse the transition_route_group from TransitionRouteGroup resource. + * + * @param {string} transitionRouteGroupName + * A fully-qualified path representing TransitionRouteGroup resource. + * @returns {string} A string representing the transition_route_group. + */ + matchTransitionRouteGroupFromTransitionRouteGroupName( + transitionRouteGroupName: string + ) { + return this.pathTemplates.transitionRouteGroupPathTemplate.match( + transitionRouteGroupName + ).transition_route_group; + } + + /** + * Return a fully-qualified version resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} flow + * @param {string} version + * @returns {string} Resource name string. + */ + versionPath( + project: string, + location: string, + agent: string, + flow: string, + version: string + ) { + return this.pathTemplates.versionPathTemplate.render({ + project: project, + location: location, + agent: agent, + flow: flow, + version: version, + }); + } + + /** + * Parse the project from Version resource. + * + * @param {string} versionName + * A fully-qualified path representing Version resource. + * @returns {string} A string representing the project. + */ + matchProjectFromVersionName(versionName: string) { + return this.pathTemplates.versionPathTemplate.match(versionName).project; + } + + /** + * Parse the location from Version resource. + * + * @param {string} versionName + * A fully-qualified path representing Version resource. + * @returns {string} A string representing the location. + */ + matchLocationFromVersionName(versionName: string) { + return this.pathTemplates.versionPathTemplate.match(versionName).location; + } + + /** + * Parse the agent from Version resource. + * + * @param {string} versionName + * A fully-qualified path representing Version resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromVersionName(versionName: string) { + return this.pathTemplates.versionPathTemplate.match(versionName).agent; + } + + /** + * Parse the flow from Version resource. + * + * @param {string} versionName + * A fully-qualified path representing Version resource. + * @returns {string} A string representing the flow. + */ + matchFlowFromVersionName(versionName: string) { + return this.pathTemplates.versionPathTemplate.match(versionName).flow; + } + + /** + * Parse the version from Version resource. + * + * @param {string} versionName + * A fully-qualified path representing Version resource. + * @returns {string} A string representing the version. + */ + matchVersionFromVersionName(versionName: string) { + return this.pathTemplates.versionPathTemplate.match(versionName).version; + } + + /** + * Return a fully-qualified webhook resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} webhook + * @returns {string} Resource name string. + */ + webhookPath( + project: string, + location: string, + agent: string, + webhook: string + ) { + return this.pathTemplates.webhookPathTemplate.render({ + project: project, + location: location, + agent: agent, + webhook: webhook, + }); + } + + /** + * Parse the project from Webhook resource. + * + * @param {string} webhookName + * A fully-qualified path representing Webhook resource. + * @returns {string} A string representing the project. + */ + matchProjectFromWebhookName(webhookName: string) { + return this.pathTemplates.webhookPathTemplate.match(webhookName).project; + } + + /** + * Parse the location from Webhook resource. + * + * @param {string} webhookName + * A fully-qualified path representing Webhook resource. + * @returns {string} A string representing the location. + */ + matchLocationFromWebhookName(webhookName: string) { + return this.pathTemplates.webhookPathTemplate.match(webhookName).location; + } + + /** + * Parse the agent from Webhook resource. + * + * @param {string} webhookName + * A fully-qualified path representing Webhook resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromWebhookName(webhookName: string) { + return this.pathTemplates.webhookPathTemplate.match(webhookName).agent; + } + + /** + * Parse the webhook from Webhook resource. + * + * @param {string} webhookName + * A fully-qualified path representing Webhook resource. + * @returns {string} A string representing the webhook. + */ + matchWebhookFromWebhookName(webhookName: string) { + return this.pathTemplates.webhookPathTemplate.match(webhookName).webhook; + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + this.initialize(); + if (!this._terminated) { + return this.experimentsStub!.then(stub => { + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/src/v3beta1/experiments_client_config.json b/src/v3beta1/experiments_client_config.json new file mode 100644 index 00000000..c3480c4d --- /dev/null +++ b/src/v3beta1/experiments_client_config.json @@ -0,0 +1,64 @@ +{ + "interfaces": { + "google.cloud.dialogflow.cx.v3beta1.Experiments": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "unavailable": [ + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "ListExperiments": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "default" + }, + "GetExperiment": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "default" + }, + "CreateExperiment": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "default" + }, + "UpdateExperiment": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "default" + }, + "DeleteExperiment": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "default" + }, + "StartExperiment": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "default" + }, + "StopExperiment": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "default" + } + } + } + } +} diff --git a/src/v3beta1/experiments_proto_list.json b/src/v3beta1/experiments_proto_list.json new file mode 100644 index 00000000..9046de0b --- /dev/null +++ b/src/v3beta1/experiments_proto_list.json @@ -0,0 +1,18 @@ +[ + "../../protos/google/cloud/dialogflow/cx/v3beta1/agent.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/audio_config.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/entity_type.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/environment.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/experiment.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/flow.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/fulfillment.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/intent.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/page.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/response_message.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/security_settings.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/session.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/session_entity_type.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/transition_route_group.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/version.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/webhook.proto" +] diff --git a/src/v3beta1/flows_client.ts b/src/v3beta1/flows_client.ts index 2c410a19..eb3beb9b 100644 --- a/src/v3beta1/flows_client.ts +++ b/src/v3beta1/flows_client.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -177,6 +177,9 @@ export class FlowsClient { environmentPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}' ), + experimentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/experiments/{experiment}' + ), flowPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}' ), @@ -1390,6 +1393,92 @@ export class FlowsClient { .environment; } + /** + * Return a fully-qualified experiment resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} environment + * @param {string} experiment + * @returns {string} Resource name string. + */ + experimentPath( + project: string, + location: string, + agent: string, + environment: string, + experiment: string + ) { + return this.pathTemplates.experimentPathTemplate.render({ + project: project, + location: location, + agent: agent, + environment: environment, + experiment: experiment, + }); + } + + /** + * Parse the project from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the project. + */ + matchProjectFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .project; + } + + /** + * Parse the location from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the location. + */ + matchLocationFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .location; + } + + /** + * Parse the agent from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .agent; + } + + /** + * Parse the environment from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .environment; + } + + /** + * Parse the experiment from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the experiment. + */ + matchExperimentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .experiment; + } + /** * Return a fully-qualified flow resource name string. * diff --git a/src/v3beta1/flows_proto_list.json b/src/v3beta1/flows_proto_list.json index 6e6cffbd..9046de0b 100644 --- a/src/v3beta1/flows_proto_list.json +++ b/src/v3beta1/flows_proto_list.json @@ -3,6 +3,7 @@ "../../protos/google/cloud/dialogflow/cx/v3beta1/audio_config.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/entity_type.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/environment.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/experiment.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/flow.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/fulfillment.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/intent.proto", diff --git a/src/v3beta1/gapic_metadata.json b/src/v3beta1/gapic_metadata.json index bb299b29..ee02b72d 100644 --- a/src/v3beta1/gapic_metadata.json +++ b/src/v3beta1/gapic_metadata.json @@ -243,6 +243,94 @@ } } }, + "Experiments": { + "clients": { + "grpc": { + "libraryClient": "ExperimentsClient", + "rpcs": { + "GetExperiment": { + "methods": [ + "getExperiment" + ] + }, + "CreateExperiment": { + "methods": [ + "createExperiment" + ] + }, + "UpdateExperiment": { + "methods": [ + "updateExperiment" + ] + }, + "DeleteExperiment": { + "methods": [ + "deleteExperiment" + ] + }, + "StartExperiment": { + "methods": [ + "startExperiment" + ] + }, + "StopExperiment": { + "methods": [ + "stopExperiment" + ] + }, + "ListExperiments": { + "methods": [ + "listExperiments", + "listExperimentsStream", + "listExperimentsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "ExperimentsClient", + "rpcs": { + "GetExperiment": { + "methods": [ + "getExperiment" + ] + }, + "CreateExperiment": { + "methods": [ + "createExperiment" + ] + }, + "UpdateExperiment": { + "methods": [ + "updateExperiment" + ] + }, + "DeleteExperiment": { + "methods": [ + "deleteExperiment" + ] + }, + "StartExperiment": { + "methods": [ + "startExperiment" + ] + }, + "StopExperiment": { + "methods": [ + "stopExperiment" + ] + }, + "ListExperiments": { + "methods": [ + "listExperiments", + "listExperimentsStream", + "listExperimentsAsync" + ] + } + } + } + } + }, "Flows": { "clients": { "grpc": { diff --git a/src/v3beta1/index.ts b/src/v3beta1/index.ts index 4290247b..de12e524 100644 --- a/src/v3beta1/index.ts +++ b/src/v3beta1/index.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -19,6 +19,7 @@ export {AgentsClient} from './agents_client'; export {EntityTypesClient} from './entity_types_client'; export {EnvironmentsClient} from './environments_client'; +export {ExperimentsClient} from './experiments_client'; export {FlowsClient} from './flows_client'; export {IntentsClient} from './intents_client'; export {PagesClient} from './pages_client'; diff --git a/src/v3beta1/intents_client.ts b/src/v3beta1/intents_client.ts index b00032bf..fa682e6a 100644 --- a/src/v3beta1/intents_client.ts +++ b/src/v3beta1/intents_client.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -175,6 +175,9 @@ export class IntentsClient { environmentPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}' ), + experimentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/experiments/{experiment}' + ), flowPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}' ), @@ -1218,6 +1221,92 @@ export class IntentsClient { .environment; } + /** + * Return a fully-qualified experiment resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} environment + * @param {string} experiment + * @returns {string} Resource name string. + */ + experimentPath( + project: string, + location: string, + agent: string, + environment: string, + experiment: string + ) { + return this.pathTemplates.experimentPathTemplate.render({ + project: project, + location: location, + agent: agent, + environment: environment, + experiment: experiment, + }); + } + + /** + * Parse the project from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the project. + */ + matchProjectFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .project; + } + + /** + * Parse the location from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the location. + */ + matchLocationFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .location; + } + + /** + * Parse the agent from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .agent; + } + + /** + * Parse the environment from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .environment; + } + + /** + * Parse the experiment from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the experiment. + */ + matchExperimentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .experiment; + } + /** * Return a fully-qualified flow resource name string. * diff --git a/src/v3beta1/intents_proto_list.json b/src/v3beta1/intents_proto_list.json index 6e6cffbd..9046de0b 100644 --- a/src/v3beta1/intents_proto_list.json +++ b/src/v3beta1/intents_proto_list.json @@ -3,6 +3,7 @@ "../../protos/google/cloud/dialogflow/cx/v3beta1/audio_config.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/entity_type.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/environment.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/experiment.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/flow.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/fulfillment.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/intent.proto", diff --git a/src/v3beta1/pages_client.ts b/src/v3beta1/pages_client.ts index 62a0c4b4..fea8e023 100644 --- a/src/v3beta1/pages_client.ts +++ b/src/v3beta1/pages_client.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -175,6 +175,9 @@ export class PagesClient { environmentPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}' ), + experimentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/experiments/{experiment}' + ), flowPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}' ), @@ -1239,6 +1242,92 @@ export class PagesClient { .environment; } + /** + * Return a fully-qualified experiment resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} environment + * @param {string} experiment + * @returns {string} Resource name string. + */ + experimentPath( + project: string, + location: string, + agent: string, + environment: string, + experiment: string + ) { + return this.pathTemplates.experimentPathTemplate.render({ + project: project, + location: location, + agent: agent, + environment: environment, + experiment: experiment, + }); + } + + /** + * Parse the project from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the project. + */ + matchProjectFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .project; + } + + /** + * Parse the location from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the location. + */ + matchLocationFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .location; + } + + /** + * Parse the agent from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .agent; + } + + /** + * Parse the environment from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .environment; + } + + /** + * Parse the experiment from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the experiment. + */ + matchExperimentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .experiment; + } + /** * Return a fully-qualified flow resource name string. * diff --git a/src/v3beta1/pages_proto_list.json b/src/v3beta1/pages_proto_list.json index 6e6cffbd..9046de0b 100644 --- a/src/v3beta1/pages_proto_list.json +++ b/src/v3beta1/pages_proto_list.json @@ -3,6 +3,7 @@ "../../protos/google/cloud/dialogflow/cx/v3beta1/audio_config.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/entity_type.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/environment.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/experiment.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/flow.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/fulfillment.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/intent.proto", diff --git a/src/v3beta1/security_settings_service_client.ts b/src/v3beta1/security_settings_service_client.ts index 435098ed..9537fffe 100644 --- a/src/v3beta1/security_settings_service_client.ts +++ b/src/v3beta1/security_settings_service_client.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -176,6 +176,9 @@ export class SecuritySettingsServiceClient { environmentPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}' ), + experimentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/experiments/{experiment}' + ), flowPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}' ), @@ -1170,6 +1173,92 @@ export class SecuritySettingsServiceClient { .environment; } + /** + * Return a fully-qualified experiment resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} environment + * @param {string} experiment + * @returns {string} Resource name string. + */ + experimentPath( + project: string, + location: string, + agent: string, + environment: string, + experiment: string + ) { + return this.pathTemplates.experimentPathTemplate.render({ + project: project, + location: location, + agent: agent, + environment: environment, + experiment: experiment, + }); + } + + /** + * Parse the project from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the project. + */ + matchProjectFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .project; + } + + /** + * Parse the location from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the location. + */ + matchLocationFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .location; + } + + /** + * Parse the agent from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .agent; + } + + /** + * Parse the environment from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .environment; + } + + /** + * Parse the experiment from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the experiment. + */ + matchExperimentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .experiment; + } + /** * Return a fully-qualified flow resource name string. * diff --git a/src/v3beta1/security_settings_service_proto_list.json b/src/v3beta1/security_settings_service_proto_list.json index 6e6cffbd..9046de0b 100644 --- a/src/v3beta1/security_settings_service_proto_list.json +++ b/src/v3beta1/security_settings_service_proto_list.json @@ -3,6 +3,7 @@ "../../protos/google/cloud/dialogflow/cx/v3beta1/audio_config.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/entity_type.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/environment.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/experiment.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/flow.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/fulfillment.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/intent.proto", diff --git a/src/v3beta1/session_entity_types_client.ts b/src/v3beta1/session_entity_types_client.ts index 1eaa7109..6b9f5d34 100644 --- a/src/v3beta1/session_entity_types_client.ts +++ b/src/v3beta1/session_entity_types_client.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -175,6 +175,9 @@ export class SessionEntityTypesClient { environmentPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}' ), + experimentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/experiments/{experiment}' + ), flowPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}' ), @@ -1206,6 +1209,92 @@ export class SessionEntityTypesClient { .environment; } + /** + * Return a fully-qualified experiment resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} environment + * @param {string} experiment + * @returns {string} Resource name string. + */ + experimentPath( + project: string, + location: string, + agent: string, + environment: string, + experiment: string + ) { + return this.pathTemplates.experimentPathTemplate.render({ + project: project, + location: location, + agent: agent, + environment: environment, + experiment: experiment, + }); + } + + /** + * Parse the project from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the project. + */ + matchProjectFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .project; + } + + /** + * Parse the location from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the location. + */ + matchLocationFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .location; + } + + /** + * Parse the agent from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .agent; + } + + /** + * Parse the environment from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .environment; + } + + /** + * Parse the experiment from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the experiment. + */ + matchExperimentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .experiment; + } + /** * Return a fully-qualified flow resource name string. * diff --git a/src/v3beta1/session_entity_types_proto_list.json b/src/v3beta1/session_entity_types_proto_list.json index 6e6cffbd..9046de0b 100644 --- a/src/v3beta1/session_entity_types_proto_list.json +++ b/src/v3beta1/session_entity_types_proto_list.json @@ -3,6 +3,7 @@ "../../protos/google/cloud/dialogflow/cx/v3beta1/audio_config.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/entity_type.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/environment.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/experiment.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/flow.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/fulfillment.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/intent.proto", diff --git a/src/v3beta1/sessions_client.ts b/src/v3beta1/sessions_client.ts index 3dca6cfc..c52b2d60 100644 --- a/src/v3beta1/sessions_client.ts +++ b/src/v3beta1/sessions_client.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -168,6 +168,9 @@ export class SessionsClient { environmentPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}' ), + experimentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/experiments/{experiment}' + ), flowPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}' ), @@ -910,6 +913,92 @@ export class SessionsClient { .environment; } + /** + * Return a fully-qualified experiment resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} environment + * @param {string} experiment + * @returns {string} Resource name string. + */ + experimentPath( + project: string, + location: string, + agent: string, + environment: string, + experiment: string + ) { + return this.pathTemplates.experimentPathTemplate.render({ + project: project, + location: location, + agent: agent, + environment: environment, + experiment: experiment, + }); + } + + /** + * Parse the project from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the project. + */ + matchProjectFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .project; + } + + /** + * Parse the location from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the location. + */ + matchLocationFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .location; + } + + /** + * Parse the agent from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .agent; + } + + /** + * Parse the environment from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .environment; + } + + /** + * Parse the experiment from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the experiment. + */ + matchExperimentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .experiment; + } + /** * Return a fully-qualified flow resource name string. * diff --git a/src/v3beta1/sessions_proto_list.json b/src/v3beta1/sessions_proto_list.json index 6e6cffbd..9046de0b 100644 --- a/src/v3beta1/sessions_proto_list.json +++ b/src/v3beta1/sessions_proto_list.json @@ -3,6 +3,7 @@ "../../protos/google/cloud/dialogflow/cx/v3beta1/audio_config.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/entity_type.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/environment.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/experiment.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/flow.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/fulfillment.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/intent.proto", diff --git a/src/v3beta1/transition_route_groups_client.ts b/src/v3beta1/transition_route_groups_client.ts index df76f14d..41443500 100644 --- a/src/v3beta1/transition_route_groups_client.ts +++ b/src/v3beta1/transition_route_groups_client.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -176,6 +176,9 @@ export class TransitionRouteGroupsClient { environmentPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}' ), + experimentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/experiments/{experiment}' + ), flowPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}' ), @@ -1247,6 +1250,92 @@ export class TransitionRouteGroupsClient { .environment; } + /** + * Return a fully-qualified experiment resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} environment + * @param {string} experiment + * @returns {string} Resource name string. + */ + experimentPath( + project: string, + location: string, + agent: string, + environment: string, + experiment: string + ) { + return this.pathTemplates.experimentPathTemplate.render({ + project: project, + location: location, + agent: agent, + environment: environment, + experiment: experiment, + }); + } + + /** + * Parse the project from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the project. + */ + matchProjectFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .project; + } + + /** + * Parse the location from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the location. + */ + matchLocationFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .location; + } + + /** + * Parse the agent from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .agent; + } + + /** + * Parse the environment from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .environment; + } + + /** + * Parse the experiment from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the experiment. + */ + matchExperimentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .experiment; + } + /** * Return a fully-qualified flow resource name string. * diff --git a/src/v3beta1/transition_route_groups_proto_list.json b/src/v3beta1/transition_route_groups_proto_list.json index 6e6cffbd..9046de0b 100644 --- a/src/v3beta1/transition_route_groups_proto_list.json +++ b/src/v3beta1/transition_route_groups_proto_list.json @@ -3,6 +3,7 @@ "../../protos/google/cloud/dialogflow/cx/v3beta1/audio_config.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/entity_type.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/environment.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/experiment.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/flow.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/fulfillment.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/intent.proto", diff --git a/src/v3beta1/versions_client.ts b/src/v3beta1/versions_client.ts index 40b6420d..f4802afe 100644 --- a/src/v3beta1/versions_client.ts +++ b/src/v3beta1/versions_client.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -177,6 +177,9 @@ export class VersionsClient { environmentPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}' ), + experimentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/experiments/{experiment}' + ), flowPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}' ), @@ -1390,6 +1393,92 @@ export class VersionsClient { .environment; } + /** + * Return a fully-qualified experiment resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} environment + * @param {string} experiment + * @returns {string} Resource name string. + */ + experimentPath( + project: string, + location: string, + agent: string, + environment: string, + experiment: string + ) { + return this.pathTemplates.experimentPathTemplate.render({ + project: project, + location: location, + agent: agent, + environment: environment, + experiment: experiment, + }); + } + + /** + * Parse the project from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the project. + */ + matchProjectFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .project; + } + + /** + * Parse the location from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the location. + */ + matchLocationFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .location; + } + + /** + * Parse the agent from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .agent; + } + + /** + * Parse the environment from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .environment; + } + + /** + * Parse the experiment from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the experiment. + */ + matchExperimentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .experiment; + } + /** * Return a fully-qualified flow resource name string. * diff --git a/src/v3beta1/versions_proto_list.json b/src/v3beta1/versions_proto_list.json index 6e6cffbd..9046de0b 100644 --- a/src/v3beta1/versions_proto_list.json +++ b/src/v3beta1/versions_proto_list.json @@ -3,6 +3,7 @@ "../../protos/google/cloud/dialogflow/cx/v3beta1/audio_config.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/entity_type.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/environment.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/experiment.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/flow.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/fulfillment.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/intent.proto", diff --git a/src/v3beta1/webhooks_client.ts b/src/v3beta1/webhooks_client.ts index 9b5a3959..250a2cf3 100644 --- a/src/v3beta1/webhooks_client.ts +++ b/src/v3beta1/webhooks_client.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -175,6 +175,9 @@ export class WebhooksClient { environmentPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}' ), + experimentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/experiments/{experiment}' + ), flowPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}' ), @@ -1164,6 +1167,92 @@ export class WebhooksClient { .environment; } + /** + * Return a fully-qualified experiment resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} environment + * @param {string} experiment + * @returns {string} Resource name string. + */ + experimentPath( + project: string, + location: string, + agent: string, + environment: string, + experiment: string + ) { + return this.pathTemplates.experimentPathTemplate.render({ + project: project, + location: location, + agent: agent, + environment: environment, + experiment: experiment, + }); + } + + /** + * Parse the project from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the project. + */ + matchProjectFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .project; + } + + /** + * Parse the location from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the location. + */ + matchLocationFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .location; + } + + /** + * Parse the agent from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .agent; + } + + /** + * Parse the environment from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .environment; + } + + /** + * Parse the experiment from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the experiment. + */ + matchExperimentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName) + .experiment; + } + /** * Return a fully-qualified flow resource name string. * diff --git a/src/v3beta1/webhooks_proto_list.json b/src/v3beta1/webhooks_proto_list.json index 6e6cffbd..9046de0b 100644 --- a/src/v3beta1/webhooks_proto_list.json +++ b/src/v3beta1/webhooks_proto_list.json @@ -3,6 +3,7 @@ "../../protos/google/cloud/dialogflow/cx/v3beta1/audio_config.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/entity_type.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/environment.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/experiment.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/flow.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/fulfillment.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/intent.proto", diff --git a/synth.metadata b/synth.metadata index 03225460..9bb4fcf0 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,15 +4,15 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-dialogflow-cx.git", - "sha": "0ffd0b7a8a2f34c06062c9baf4f33b719b15ad9f" + "sha": "f6460cea16473d1f208eae4bfa3def7cf5583579" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "fb36278c9343b7933fed2f19de153797ac27d8f2", - "internalRef": "348481983" + "sha": "36536e21b8eece3e9ed100037c214da99324c957", + "internalRef": "348668666" } }, { diff --git a/system-test/fixtures/sample/src/index.js b/system-test/fixtures/sample/src/index.js index fba045ce..43405a2c 100644 --- a/system-test/fixtures/sample/src/index.js +++ b/system-test/fixtures/sample/src/index.js @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -23,6 +23,7 @@ function main() { const agentsClient = new cx.AgentsClient(); const entityTypesClient = new cx.EntityTypesClient(); const environmentsClient = new cx.EnvironmentsClient(); + const experimentsClient = new cx.ExperimentsClient(); const flowsClient = new cx.FlowsClient(); const intentsClient = new cx.IntentsClient(); const pagesClient = new cx.PagesClient(); diff --git a/system-test/fixtures/sample/src/index.ts b/system-test/fixtures/sample/src/index.ts index d22982ea..56fb64f1 100644 --- a/system-test/fixtures/sample/src/index.ts +++ b/system-test/fixtures/sample/src/index.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -20,6 +20,7 @@ import { AgentsClient, EntityTypesClient, EnvironmentsClient, + ExperimentsClient, FlowsClient, IntentsClient, PagesClient, @@ -41,6 +42,9 @@ function doStuffWithEntityTypesClient(client: EntityTypesClient) { function doStuffWithEnvironmentsClient(client: EnvironmentsClient) { client.close(); } +function doStuffWithExperimentsClient(client: ExperimentsClient) { + client.close(); +} function doStuffWithFlowsClient(client: FlowsClient) { client.close(); } @@ -84,6 +88,9 @@ function main() { const environmentsClient = new EnvironmentsClient(); doStuffWithEnvironmentsClient(environmentsClient); // check that the client instance can be created + const experimentsClient = new ExperimentsClient(); + doStuffWithExperimentsClient(experimentsClient); + // check that the client instance can be created const flowsClient = new FlowsClient(); doStuffWithFlowsClient(flowsClient); // check that the client instance can be created diff --git a/system-test/install.ts b/system-test/install.ts index 39d90f77..d2d61c03 100644 --- a/system-test/install.ts +++ b/system-test/install.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/test/gapic_agents_v3.ts b/test/gapic_agents_v3.ts index c8d24f6b..6048c64a 100644 --- a/test/gapic_agents_v3.ts +++ b/test/gapic_agents_v3.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -1561,6 +1561,94 @@ describe('v3.AgentsClient', () => { }); }); + describe('experiment', () => { + const fakePath = '/rendered/path/experiment'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + environment: 'environmentValue', + experiment: 'experimentValue', + }; + const client = new agentsModule.v3.AgentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.experimentPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.experimentPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('experimentPath', () => { + const result = client.experimentPath( + 'projectValue', + 'locationValue', + 'agentValue', + 'environmentValue', + 'experimentValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.experimentPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromExperimentName', () => { + const result = client.matchProjectFromExperimentName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromExperimentName', () => { + const result = client.matchLocationFromExperimentName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAgentFromExperimentName', () => { + const result = client.matchAgentFromExperimentName(fakePath); + assert.strictEqual(result, 'agentValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEnvironmentFromExperimentName', () => { + const result = client.matchEnvironmentFromExperimentName(fakePath); + assert.strictEqual(result, 'environmentValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchExperimentFromExperimentName', () => { + const result = client.matchExperimentFromExperimentName(fakePath); + assert.strictEqual(result, 'experimentValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('flow', () => { const fakePath = '/rendered/path/flow'; const expectedParameters = { diff --git a/test/gapic_agents_v3beta1.ts b/test/gapic_agents_v3beta1.ts index fc017f92..dbd3fafb 100644 --- a/test/gapic_agents_v3beta1.ts +++ b/test/gapic_agents_v3beta1.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -1585,6 +1585,94 @@ describe('v3beta1.AgentsClient', () => { }); }); + describe('experiment', () => { + const fakePath = '/rendered/path/experiment'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + environment: 'environmentValue', + experiment: 'experimentValue', + }; + const client = new agentsModule.v3beta1.AgentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.experimentPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.experimentPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('experimentPath', () => { + const result = client.experimentPath( + 'projectValue', + 'locationValue', + 'agentValue', + 'environmentValue', + 'experimentValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.experimentPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromExperimentName', () => { + const result = client.matchProjectFromExperimentName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromExperimentName', () => { + const result = client.matchLocationFromExperimentName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAgentFromExperimentName', () => { + const result = client.matchAgentFromExperimentName(fakePath); + assert.strictEqual(result, 'agentValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEnvironmentFromExperimentName', () => { + const result = client.matchEnvironmentFromExperimentName(fakePath); + assert.strictEqual(result, 'environmentValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchExperimentFromExperimentName', () => { + const result = client.matchExperimentFromExperimentName(fakePath); + assert.strictEqual(result, 'experimentValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('flow', () => { const fakePath = '/rendered/path/flow'; const expectedParameters = { diff --git a/test/gapic_entity_types_v3.ts b/test/gapic_entity_types_v3.ts index 35e3a8ef..26f78834 100644 --- a/test/gapic_entity_types_v3.ts +++ b/test/gapic_entity_types_v3.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -1176,6 +1176,94 @@ describe('v3.EntityTypesClient', () => { }); }); + describe('experiment', () => { + const fakePath = '/rendered/path/experiment'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + environment: 'environmentValue', + experiment: 'experimentValue', + }; + const client = new entitytypesModule.v3.EntityTypesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.experimentPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.experimentPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('experimentPath', () => { + const result = client.experimentPath( + 'projectValue', + 'locationValue', + 'agentValue', + 'environmentValue', + 'experimentValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.experimentPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromExperimentName', () => { + const result = client.matchProjectFromExperimentName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromExperimentName', () => { + const result = client.matchLocationFromExperimentName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAgentFromExperimentName', () => { + const result = client.matchAgentFromExperimentName(fakePath); + assert.strictEqual(result, 'agentValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEnvironmentFromExperimentName', () => { + const result = client.matchEnvironmentFromExperimentName(fakePath); + assert.strictEqual(result, 'environmentValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchExperimentFromExperimentName', () => { + const result = client.matchExperimentFromExperimentName(fakePath); + assert.strictEqual(result, 'experimentValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('flow', () => { const fakePath = '/rendered/path/flow'; const expectedParameters = { diff --git a/test/gapic_entity_types_v3beta1.ts b/test/gapic_entity_types_v3beta1.ts index f64ca73b..c6124f6e 100644 --- a/test/gapic_entity_types_v3beta1.ts +++ b/test/gapic_entity_types_v3beta1.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -1178,6 +1178,94 @@ describe('v3beta1.EntityTypesClient', () => { }); }); + describe('experiment', () => { + const fakePath = '/rendered/path/experiment'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + environment: 'environmentValue', + experiment: 'experimentValue', + }; + const client = new entitytypesModule.v3beta1.EntityTypesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.experimentPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.experimentPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('experimentPath', () => { + const result = client.experimentPath( + 'projectValue', + 'locationValue', + 'agentValue', + 'environmentValue', + 'experimentValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.experimentPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromExperimentName', () => { + const result = client.matchProjectFromExperimentName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromExperimentName', () => { + const result = client.matchLocationFromExperimentName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAgentFromExperimentName', () => { + const result = client.matchAgentFromExperimentName(fakePath); + assert.strictEqual(result, 'agentValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEnvironmentFromExperimentName', () => { + const result = client.matchEnvironmentFromExperimentName(fakePath); + assert.strictEqual(result, 'environmentValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchExperimentFromExperimentName', () => { + const result = client.matchExperimentFromExperimentName(fakePath); + assert.strictEqual(result, 'experimentValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('flow', () => { const fakePath = '/rendered/path/flow'; const expectedParameters = { diff --git a/test/gapic_environments_v3.ts b/test/gapic_environments_v3.ts index 283debeb..3c52bd7c 100644 --- a/test/gapic_environments_v3.ts +++ b/test/gapic_environments_v3.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -1698,6 +1698,94 @@ describe('v3.EnvironmentsClient', () => { }); }); + describe('experiment', () => { + const fakePath = '/rendered/path/experiment'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + environment: 'environmentValue', + experiment: 'experimentValue', + }; + const client = new environmentsModule.v3.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.experimentPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.experimentPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('experimentPath', () => { + const result = client.experimentPath( + 'projectValue', + 'locationValue', + 'agentValue', + 'environmentValue', + 'experimentValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.experimentPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromExperimentName', () => { + const result = client.matchProjectFromExperimentName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromExperimentName', () => { + const result = client.matchLocationFromExperimentName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAgentFromExperimentName', () => { + const result = client.matchAgentFromExperimentName(fakePath); + assert.strictEqual(result, 'agentValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEnvironmentFromExperimentName', () => { + const result = client.matchEnvironmentFromExperimentName(fakePath); + assert.strictEqual(result, 'environmentValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchExperimentFromExperimentName', () => { + const result = client.matchExperimentFromExperimentName(fakePath); + assert.strictEqual(result, 'experimentValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('flow', () => { const fakePath = '/rendered/path/flow'; const expectedParameters = { diff --git a/test/gapic_environments_v3beta1.ts b/test/gapic_environments_v3beta1.ts index 46124439..ed0a60fe 100644 --- a/test/gapic_environments_v3beta1.ts +++ b/test/gapic_environments_v3beta1.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -1704,6 +1704,94 @@ describe('v3beta1.EnvironmentsClient', () => { }); }); + describe('experiment', () => { + const fakePath = '/rendered/path/experiment'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + environment: 'environmentValue', + experiment: 'experimentValue', + }; + const client = new environmentsModule.v3beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.experimentPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.experimentPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('experimentPath', () => { + const result = client.experimentPath( + 'projectValue', + 'locationValue', + 'agentValue', + 'environmentValue', + 'experimentValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.experimentPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromExperimentName', () => { + const result = client.matchProjectFromExperimentName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromExperimentName', () => { + const result = client.matchLocationFromExperimentName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAgentFromExperimentName', () => { + const result = client.matchAgentFromExperimentName(fakePath); + assert.strictEqual(result, 'agentValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEnvironmentFromExperimentName', () => { + const result = client.matchEnvironmentFromExperimentName(fakePath); + assert.strictEqual(result, 'environmentValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchExperimentFromExperimentName', () => { + const result = client.matchExperimentFromExperimentName(fakePath); + assert.strictEqual(result, 'experimentValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('flow', () => { const fakePath = '/rendered/path/flow'; const expectedParameters = { diff --git a/test/gapic_experiments_v3.ts b/test/gapic_experiments_v3.ts new file mode 100644 index 00000000..842ccf05 --- /dev/null +++ b/test/gapic_experiments_v3.ts @@ -0,0 +1,2386 @@ +// Copyright 2021 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it} from 'mocha'; +import * as experimentsModule from '../src'; + +import {PassThrough} from 'stream'; + +import {protobuf} from 'google-gax'; + +function generateSampleMessage(instance: T) { + const filledObject = (instance.constructor as typeof protobuf.Message).toObject( + instance as protobuf.Message, + {defaults: true} + ); + return (instance.constructor as typeof protobuf.Message).fromObject( + filledObject + ) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error + ? sinon.stub().rejects(error) + : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback( + response?: ResponseType, + error?: Error +) { + return error + ? sinon.stub().callsArgWith(2, error) + : sinon.stub().callsArgWith(2, null, response); +} + +function stubPageStreamingCall( + responses?: ResponseType[], + error?: Error +) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error + ? sinon.stub().callsArgWith(2, error) + : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { + mockStream.write({}); + }); + } + setImmediate(() => { + mockStream.end(); + }); + } else { + setImmediate(() => { + mockStream.write({}); + }); + setImmediate(() => { + mockStream.end(); + }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall( + responses?: ResponseType[], + error?: Error +) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + }, + }; + }, + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v3.ExperimentsClient', () => { + it('has servicePath', () => { + const servicePath = experimentsModule.v3.ExperimentsClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = experimentsModule.v3.ExperimentsClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = experimentsModule.v3.ExperimentsClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new experimentsModule.v3.ExperimentsClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new experimentsModule.v3.ExperimentsClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new experimentsModule.v3.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.experimentsStub, undefined); + await client.initialize(); + assert(client.experimentsStub); + }); + + it('has close method', () => { + const client = new experimentsModule.v3.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.close(); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new experimentsModule.v3.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); + }); + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new experimentsModule.v3.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); + }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); + }); + + describe('getExperiment', () => { + it('invokes getExperiment without error', async () => { + const client = new experimentsModule.v3.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.GetExperimentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.Experiment() + ); + client.innerApiCalls.getExperiment = stubSimpleCall(expectedResponse); + const [response] = await client.getExperiment(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getExperiment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getExperiment without error using callback', async () => { + const client = new experimentsModule.v3.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.GetExperimentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.Experiment() + ); + client.innerApiCalls.getExperiment = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.getExperiment( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dialogflow.cx.v3.IExperiment | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getExperiment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getExperiment with error', async () => { + const client = new experimentsModule.v3.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.GetExperimentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getExperiment = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getExperiment(request), expectedError); + assert( + (client.innerApiCalls.getExperiment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('createExperiment', () => { + it('invokes createExperiment without error', async () => { + const client = new experimentsModule.v3.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.CreateExperimentRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.Experiment() + ); + client.innerApiCalls.createExperiment = stubSimpleCall(expectedResponse); + const [response] = await client.createExperiment(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createExperiment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createExperiment without error using callback', async () => { + const client = new experimentsModule.v3.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.CreateExperimentRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.Experiment() + ); + client.innerApiCalls.createExperiment = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.createExperiment( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dialogflow.cx.v3.IExperiment | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createExperiment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes createExperiment with error', async () => { + const client = new experimentsModule.v3.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.CreateExperimentRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createExperiment = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.createExperiment(request), expectedError); + assert( + (client.innerApiCalls.createExperiment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('updateExperiment', () => { + it('invokes updateExperiment without error', async () => { + const client = new experimentsModule.v3.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest() + ); + request.experiment = {}; + request.experiment.name = ''; + const expectedHeaderRequestParams = 'experiment.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.Experiment() + ); + client.innerApiCalls.updateExperiment = stubSimpleCall(expectedResponse); + const [response] = await client.updateExperiment(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateExperiment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateExperiment without error using callback', async () => { + const client = new experimentsModule.v3.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest() + ); + request.experiment = {}; + request.experiment.name = ''; + const expectedHeaderRequestParams = 'experiment.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.Experiment() + ); + client.innerApiCalls.updateExperiment = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.updateExperiment( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dialogflow.cx.v3.IExperiment | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateExperiment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes updateExperiment with error', async () => { + const client = new experimentsModule.v3.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest() + ); + request.experiment = {}; + request.experiment.name = ''; + const expectedHeaderRequestParams = 'experiment.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateExperiment = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.updateExperiment(request), expectedError); + assert( + (client.innerApiCalls.updateExperiment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('deleteExperiment', () => { + it('invokes deleteExperiment without error', async () => { + const client = new experimentsModule.v3.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteExperiment = stubSimpleCall(expectedResponse); + const [response] = await client.deleteExperiment(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteExperiment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteExperiment without error using callback', async () => { + const client = new experimentsModule.v3.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteExperiment = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.deleteExperiment( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteExperiment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes deleteExperiment with error', async () => { + const client = new experimentsModule.v3.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteExperiment = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteExperiment(request), expectedError); + assert( + (client.innerApiCalls.deleteExperiment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('startExperiment', () => { + it('invokes startExperiment without error', async () => { + const client = new experimentsModule.v3.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.StartExperimentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.Experiment() + ); + client.innerApiCalls.startExperiment = stubSimpleCall(expectedResponse); + const [response] = await client.startExperiment(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.startExperiment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes startExperiment without error using callback', async () => { + const client = new experimentsModule.v3.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.StartExperimentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.Experiment() + ); + client.innerApiCalls.startExperiment = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.startExperiment( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dialogflow.cx.v3.IExperiment | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.startExperiment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes startExperiment with error', async () => { + const client = new experimentsModule.v3.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.StartExperimentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.startExperiment = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.startExperiment(request), expectedError); + assert( + (client.innerApiCalls.startExperiment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('stopExperiment', () => { + it('invokes stopExperiment without error', async () => { + const client = new experimentsModule.v3.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.StopExperimentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.Experiment() + ); + client.innerApiCalls.stopExperiment = stubSimpleCall(expectedResponse); + const [response] = await client.stopExperiment(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.stopExperiment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes stopExperiment without error using callback', async () => { + const client = new experimentsModule.v3.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.StopExperimentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.Experiment() + ); + client.innerApiCalls.stopExperiment = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.stopExperiment( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dialogflow.cx.v3.IExperiment | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.stopExperiment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes stopExperiment with error', async () => { + const client = new experimentsModule.v3.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.StopExperimentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.stopExperiment = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.stopExperiment(request), expectedError); + assert( + (client.innerApiCalls.stopExperiment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('listExperiments', () => { + it('invokes listExperiments without error', async () => { + const client = new experimentsModule.v3.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.ListExperimentsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.Experiment() + ), + generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.Experiment() + ), + generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.Experiment() + ), + ]; + client.innerApiCalls.listExperiments = stubSimpleCall(expectedResponse); + const [response] = await client.listExperiments(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listExperiments as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listExperiments without error using callback', async () => { + const client = new experimentsModule.v3.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.ListExperimentsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.Experiment() + ), + generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.Experiment() + ), + generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.Experiment() + ), + ]; + client.innerApiCalls.listExperiments = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.listExperiments( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dialogflow.cx.v3.IExperiment[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listExperiments as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listExperiments with error', async () => { + const client = new experimentsModule.v3.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.ListExperimentsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listExperiments = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listExperiments(request), expectedError); + assert( + (client.innerApiCalls.listExperiments as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listExperimentsStream without error', async () => { + const client = new experimentsModule.v3.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.ListExperimentsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.Experiment() + ), + generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.Experiment() + ), + generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.Experiment() + ), + ]; + client.descriptors.page.listExperiments.createStream = stubPageStreamingCall( + expectedResponse + ); + const stream = client.listExperimentsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dialogflow.cx.v3.Experiment[] = []; + stream.on( + 'data', + (response: protos.google.cloud.dialogflow.cx.v3.Experiment) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + (client.descriptors.page.listExperiments.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listExperiments, request) + ); + assert.strictEqual( + (client.descriptors.page.listExperiments + .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('invokes listExperimentsStream with error', async () => { + const client = new experimentsModule.v3.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.ListExperimentsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listExperiments.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listExperimentsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dialogflow.cx.v3.Experiment[] = []; + stream.on( + 'data', + (response: protos.google.cloud.dialogflow.cx.v3.Experiment) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listExperiments.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listExperiments, request) + ); + assert.strictEqual( + (client.descriptors.page.listExperiments + .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listExperiments without error', async () => { + const client = new experimentsModule.v3.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.ListExperimentsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.Experiment() + ), + generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.Experiment() + ), + generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.Experiment() + ), + ]; + client.descriptors.page.listExperiments.asyncIterate = stubAsyncIterationCall( + expectedResponse + ); + const responses: protos.google.cloud.dialogflow.cx.v3.IExperiment[] = []; + const iterable = client.listExperimentsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listExperiments + .asyncIterate as SinonStub).getCall(0).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listExperiments + .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listExperiments with error', async () => { + const client = new experimentsModule.v3.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.ListExperimentsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listExperiments.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listExperimentsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dialogflow.cx.v3.IExperiment[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listExperiments + .asyncIterate as SinonStub).getCall(0).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listExperiments + .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + }); + + describe('Path templates', () => { + describe('agent', () => { + const fakePath = '/rendered/path/agent'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + }; + const client = new experimentsModule.v3.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.agentPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.agentPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('agentPath', () => { + const result = client.agentPath( + 'projectValue', + 'locationValue', + 'agentValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.agentPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromAgentName', () => { + const result = client.matchProjectFromAgentName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.agentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromAgentName', () => { + const result = client.matchLocationFromAgentName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.agentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAgentFromAgentName', () => { + const result = client.matchAgentFromAgentName(fakePath); + assert.strictEqual(result, 'agentValue'); + assert( + (client.pathTemplates.agentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('entityType', () => { + const fakePath = '/rendered/path/entityType'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + entity_type: 'entityTypeValue', + }; + const client = new experimentsModule.v3.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.entityTypePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.entityTypePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('entityTypePath', () => { + const result = client.entityTypePath( + 'projectValue', + 'locationValue', + 'agentValue', + 'entityTypeValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.entityTypePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromEntityTypeName', () => { + const result = client.matchProjectFromEntityTypeName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.entityTypePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromEntityTypeName', () => { + const result = client.matchLocationFromEntityTypeName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.entityTypePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAgentFromEntityTypeName', () => { + const result = client.matchAgentFromEntityTypeName(fakePath); + assert.strictEqual(result, 'agentValue'); + assert( + (client.pathTemplates.entityTypePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEntityTypeFromEntityTypeName', () => { + const result = client.matchEntityTypeFromEntityTypeName(fakePath); + assert.strictEqual(result, 'entityTypeValue'); + assert( + (client.pathTemplates.entityTypePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('environment', () => { + const fakePath = '/rendered/path/environment'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + environment: 'environmentValue', + }; + const client = new experimentsModule.v3.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.environmentPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.environmentPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('environmentPath', () => { + const result = client.environmentPath( + 'projectValue', + 'locationValue', + 'agentValue', + 'environmentValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.environmentPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromEnvironmentName', () => { + const result = client.matchProjectFromEnvironmentName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromEnvironmentName', () => { + const result = client.matchLocationFromEnvironmentName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAgentFromEnvironmentName', () => { + const result = client.matchAgentFromEnvironmentName(fakePath); + assert.strictEqual(result, 'agentValue'); + assert( + (client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEnvironmentFromEnvironmentName', () => { + const result = client.matchEnvironmentFromEnvironmentName(fakePath); + assert.strictEqual(result, 'environmentValue'); + assert( + (client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('experiment', () => { + const fakePath = '/rendered/path/experiment'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + environment: 'environmentValue', + experiment: 'experimentValue', + }; + const client = new experimentsModule.v3.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.experimentPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.experimentPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('experimentPath', () => { + const result = client.experimentPath( + 'projectValue', + 'locationValue', + 'agentValue', + 'environmentValue', + 'experimentValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.experimentPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromExperimentName', () => { + const result = client.matchProjectFromExperimentName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromExperimentName', () => { + const result = client.matchLocationFromExperimentName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAgentFromExperimentName', () => { + const result = client.matchAgentFromExperimentName(fakePath); + assert.strictEqual(result, 'agentValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEnvironmentFromExperimentName', () => { + const result = client.matchEnvironmentFromExperimentName(fakePath); + assert.strictEqual(result, 'environmentValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchExperimentFromExperimentName', () => { + const result = client.matchExperimentFromExperimentName(fakePath); + assert.strictEqual(result, 'experimentValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('flow', () => { + const fakePath = '/rendered/path/flow'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + flow: 'flowValue', + }; + const client = new experimentsModule.v3.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.flowPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.flowPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('flowPath', () => { + const result = client.flowPath( + 'projectValue', + 'locationValue', + 'agentValue', + 'flowValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.flowPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromFlowName', () => { + const result = client.matchProjectFromFlowName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.flowPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromFlowName', () => { + const result = client.matchLocationFromFlowName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.flowPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAgentFromFlowName', () => { + const result = client.matchAgentFromFlowName(fakePath); + assert.strictEqual(result, 'agentValue'); + assert( + (client.pathTemplates.flowPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchFlowFromFlowName', () => { + const result = client.matchFlowFromFlowName(fakePath); + assert.strictEqual(result, 'flowValue'); + assert( + (client.pathTemplates.flowPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('intent', () => { + const fakePath = '/rendered/path/intent'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + intent: 'intentValue', + }; + const client = new experimentsModule.v3.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.intentPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.intentPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('intentPath', () => { + const result = client.intentPath( + 'projectValue', + 'locationValue', + 'agentValue', + 'intentValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.intentPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromIntentName', () => { + const result = client.matchProjectFromIntentName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.intentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromIntentName', () => { + const result = client.matchLocationFromIntentName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.intentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAgentFromIntentName', () => { + const result = client.matchAgentFromIntentName(fakePath); + assert.strictEqual(result, 'agentValue'); + assert( + (client.pathTemplates.intentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchIntentFromIntentName', () => { + const result = client.matchIntentFromIntentName(fakePath); + assert.strictEqual(result, 'intentValue'); + assert( + (client.pathTemplates.intentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('location', () => { + const fakePath = '/rendered/path/location'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + }; + const client = new experimentsModule.v3.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.locationPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.locationPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('locationPath', () => { + const result = client.locationPath('projectValue', 'locationValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.locationPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromLocationName', () => { + const result = client.matchProjectFromLocationName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromLocationName', () => { + const result = client.matchLocationFromLocationName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('page', () => { + const fakePath = '/rendered/path/page'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + flow: 'flowValue', + page: 'pageValue', + }; + const client = new experimentsModule.v3.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.pagePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.pagePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('pagePath', () => { + const result = client.pagePath( + 'projectValue', + 'locationValue', + 'agentValue', + 'flowValue', + 'pageValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.pagePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromPageName', () => { + const result = client.matchProjectFromPageName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.pagePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromPageName', () => { + const result = client.matchLocationFromPageName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.pagePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAgentFromPageName', () => { + const result = client.matchAgentFromPageName(fakePath); + assert.strictEqual(result, 'agentValue'); + assert( + (client.pathTemplates.pagePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchFlowFromPageName', () => { + const result = client.matchFlowFromPageName(fakePath); + assert.strictEqual(result, 'flowValue'); + assert( + (client.pathTemplates.pagePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchPageFromPageName', () => { + const result = client.matchPageFromPageName(fakePath); + assert.strictEqual(result, 'pageValue'); + assert( + (client.pathTemplates.pagePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('project', () => { + const fakePath = '/rendered/path/project'; + const expectedParameters = { + project: 'projectValue', + }; + const client = new experimentsModule.v3.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectPath', () => { + const result = client.projectPath('projectValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectName', () => { + const result = client.matchProjectFromProjectName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationAgentEnvironmentSessionEntityType', () => { + const fakePath = + '/rendered/path/projectLocationAgentEnvironmentSessionEntityType'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + environment: 'environmentValue', + session: 'sessionValue', + entity_type: 'entityTypeValue', + }; + const client = new experimentsModule.v3.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectLocationAgentEnvironmentSessionEntityTypePath', () => { + const result = client.projectLocationAgentEnvironmentSessionEntityTypePath( + 'projectValue', + 'locationValue', + 'agentValue', + 'environmentValue', + 'sessionValue', + 'entityTypeValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates + .projectLocationAgentEnvironmentSessionEntityTypePathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationAgentEnvironmentSessionEntityTypeName', () => { + const result = client.matchProjectFromProjectLocationAgentEnvironmentSessionEntityTypeName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates + .projectLocationAgentEnvironmentSessionEntityTypePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationAgentEnvironmentSessionEntityTypeName', () => { + const result = client.matchLocationFromProjectLocationAgentEnvironmentSessionEntityTypeName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates + .projectLocationAgentEnvironmentSessionEntityTypePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAgentFromProjectLocationAgentEnvironmentSessionEntityTypeName', () => { + const result = client.matchAgentFromProjectLocationAgentEnvironmentSessionEntityTypeName( + fakePath + ); + assert.strictEqual(result, 'agentValue'); + assert( + (client.pathTemplates + .projectLocationAgentEnvironmentSessionEntityTypePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEnvironmentFromProjectLocationAgentEnvironmentSessionEntityTypeName', () => { + const result = client.matchEnvironmentFromProjectLocationAgentEnvironmentSessionEntityTypeName( + fakePath + ); + assert.strictEqual(result, 'environmentValue'); + assert( + (client.pathTemplates + .projectLocationAgentEnvironmentSessionEntityTypePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchSessionFromProjectLocationAgentEnvironmentSessionEntityTypeName', () => { + const result = client.matchSessionFromProjectLocationAgentEnvironmentSessionEntityTypeName( + fakePath + ); + assert.strictEqual(result, 'sessionValue'); + assert( + (client.pathTemplates + .projectLocationAgentEnvironmentSessionEntityTypePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEntityTypeFromProjectLocationAgentEnvironmentSessionEntityTypeName', () => { + const result = client.matchEntityTypeFromProjectLocationAgentEnvironmentSessionEntityTypeName( + fakePath + ); + assert.strictEqual(result, 'entityTypeValue'); + assert( + (client.pathTemplates + .projectLocationAgentEnvironmentSessionEntityTypePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationAgentSessionEntityType', () => { + const fakePath = '/rendered/path/projectLocationAgentSessionEntityType'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + session: 'sessionValue', + entity_type: 'entityTypeValue', + }; + const client = new experimentsModule.v3.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectLocationAgentSessionEntityTypePath', () => { + const result = client.projectLocationAgentSessionEntityTypePath( + 'projectValue', + 'locationValue', + 'agentValue', + 'sessionValue', + 'entityTypeValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates + .projectLocationAgentSessionEntityTypePathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationAgentSessionEntityTypeName', () => { + const result = client.matchProjectFromProjectLocationAgentSessionEntityTypeName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates + .projectLocationAgentSessionEntityTypePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationAgentSessionEntityTypeName', () => { + const result = client.matchLocationFromProjectLocationAgentSessionEntityTypeName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates + .projectLocationAgentSessionEntityTypePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAgentFromProjectLocationAgentSessionEntityTypeName', () => { + const result = client.matchAgentFromProjectLocationAgentSessionEntityTypeName( + fakePath + ); + assert.strictEqual(result, 'agentValue'); + assert( + (client.pathTemplates + .projectLocationAgentSessionEntityTypePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchSessionFromProjectLocationAgentSessionEntityTypeName', () => { + const result = client.matchSessionFromProjectLocationAgentSessionEntityTypeName( + fakePath + ); + assert.strictEqual(result, 'sessionValue'); + assert( + (client.pathTemplates + .projectLocationAgentSessionEntityTypePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEntityTypeFromProjectLocationAgentSessionEntityTypeName', () => { + const result = client.matchEntityTypeFromProjectLocationAgentSessionEntityTypeName( + fakePath + ); + assert.strictEqual(result, 'entityTypeValue'); + assert( + (client.pathTemplates + .projectLocationAgentSessionEntityTypePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('securitySettings', () => { + const fakePath = '/rendered/path/securitySettings'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + security_settings: 'securitySettingsValue', + }; + const client = new experimentsModule.v3.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.securitySettingsPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.securitySettingsPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('securitySettingsPath', () => { + const result = client.securitySettingsPath( + 'projectValue', + 'locationValue', + 'securitySettingsValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.securitySettingsPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromSecuritySettingsName', () => { + const result = client.matchProjectFromSecuritySettingsName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.securitySettingsPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromSecuritySettingsName', () => { + const result = client.matchLocationFromSecuritySettingsName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.securitySettingsPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchSecuritySettingsFromSecuritySettingsName', () => { + const result = client.matchSecuritySettingsFromSecuritySettingsName( + fakePath + ); + assert.strictEqual(result, 'securitySettingsValue'); + assert( + (client.pathTemplates.securitySettingsPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('transitionRouteGroup', () => { + const fakePath = '/rendered/path/transitionRouteGroup'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + flow: 'flowValue', + transition_route_group: 'transitionRouteGroupValue', + }; + const client = new experimentsModule.v3.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.transitionRouteGroupPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.transitionRouteGroupPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('transitionRouteGroupPath', () => { + const result = client.transitionRouteGroupPath( + 'projectValue', + 'locationValue', + 'agentValue', + 'flowValue', + 'transitionRouteGroupValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.transitionRouteGroupPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromTransitionRouteGroupName', () => { + const result = client.matchProjectFromTransitionRouteGroupName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.transitionRouteGroupPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromTransitionRouteGroupName', () => { + const result = client.matchLocationFromTransitionRouteGroupName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.transitionRouteGroupPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAgentFromTransitionRouteGroupName', () => { + const result = client.matchAgentFromTransitionRouteGroupName(fakePath); + assert.strictEqual(result, 'agentValue'); + assert( + (client.pathTemplates.transitionRouteGroupPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchFlowFromTransitionRouteGroupName', () => { + const result = client.matchFlowFromTransitionRouteGroupName(fakePath); + assert.strictEqual(result, 'flowValue'); + assert( + (client.pathTemplates.transitionRouteGroupPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchTransitionRouteGroupFromTransitionRouteGroupName', () => { + const result = client.matchTransitionRouteGroupFromTransitionRouteGroupName( + fakePath + ); + assert.strictEqual(result, 'transitionRouteGroupValue'); + assert( + (client.pathTemplates.transitionRouteGroupPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('version', () => { + const fakePath = '/rendered/path/version'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + flow: 'flowValue', + version: 'versionValue', + }; + const client = new experimentsModule.v3.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.versionPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.versionPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('versionPath', () => { + const result = client.versionPath( + 'projectValue', + 'locationValue', + 'agentValue', + 'flowValue', + 'versionValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.versionPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromVersionName', () => { + const result = client.matchProjectFromVersionName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.versionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromVersionName', () => { + const result = client.matchLocationFromVersionName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.versionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAgentFromVersionName', () => { + const result = client.matchAgentFromVersionName(fakePath); + assert.strictEqual(result, 'agentValue'); + assert( + (client.pathTemplates.versionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchFlowFromVersionName', () => { + const result = client.matchFlowFromVersionName(fakePath); + assert.strictEqual(result, 'flowValue'); + assert( + (client.pathTemplates.versionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchVersionFromVersionName', () => { + const result = client.matchVersionFromVersionName(fakePath); + assert.strictEqual(result, 'versionValue'); + assert( + (client.pathTemplates.versionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('webhook', () => { + const fakePath = '/rendered/path/webhook'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + webhook: 'webhookValue', + }; + const client = new experimentsModule.v3.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.webhookPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.webhookPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('webhookPath', () => { + const result = client.webhookPath( + 'projectValue', + 'locationValue', + 'agentValue', + 'webhookValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.webhookPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromWebhookName', () => { + const result = client.matchProjectFromWebhookName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.webhookPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromWebhookName', () => { + const result = client.matchLocationFromWebhookName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.webhookPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAgentFromWebhookName', () => { + const result = client.matchAgentFromWebhookName(fakePath); + assert.strictEqual(result, 'agentValue'); + assert( + (client.pathTemplates.webhookPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchWebhookFromWebhookName', () => { + const result = client.matchWebhookFromWebhookName(fakePath); + assert.strictEqual(result, 'webhookValue'); + assert( + (client.pathTemplates.webhookPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + }); +}); diff --git a/test/gapic_experiments_v3beta1.ts b/test/gapic_experiments_v3beta1.ts new file mode 100644 index 00000000..e371a859 --- /dev/null +++ b/test/gapic_experiments_v3beta1.ts @@ -0,0 +1,2388 @@ +// Copyright 2021 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it} from 'mocha'; +import * as experimentsModule from '../src'; + +import {PassThrough} from 'stream'; + +import {protobuf} from 'google-gax'; + +function generateSampleMessage(instance: T) { + const filledObject = (instance.constructor as typeof protobuf.Message).toObject( + instance as protobuf.Message, + {defaults: true} + ); + return (instance.constructor as typeof protobuf.Message).fromObject( + filledObject + ) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error + ? sinon.stub().rejects(error) + : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback( + response?: ResponseType, + error?: Error +) { + return error + ? sinon.stub().callsArgWith(2, error) + : sinon.stub().callsArgWith(2, null, response); +} + +function stubPageStreamingCall( + responses?: ResponseType[], + error?: Error +) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error + ? sinon.stub().callsArgWith(2, error) + : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { + mockStream.write({}); + }); + } + setImmediate(() => { + mockStream.end(); + }); + } else { + setImmediate(() => { + mockStream.write({}); + }); + setImmediate(() => { + mockStream.end(); + }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall( + responses?: ResponseType[], + error?: Error +) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + }, + }; + }, + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v3beta1.ExperimentsClient', () => { + it('has servicePath', () => { + const servicePath = experimentsModule.v3beta1.ExperimentsClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = experimentsModule.v3beta1.ExperimentsClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = experimentsModule.v3beta1.ExperimentsClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new experimentsModule.v3beta1.ExperimentsClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new experimentsModule.v3beta1.ExperimentsClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new experimentsModule.v3beta1.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.experimentsStub, undefined); + await client.initialize(); + assert(client.experimentsStub); + }); + + it('has close method', () => { + const client = new experimentsModule.v3beta1.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.close(); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new experimentsModule.v3beta1.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); + }); + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new experimentsModule.v3beta1.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); + }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); + }); + + describe('getExperiment', () => { + it('invokes getExperiment without error', async () => { + const client = new experimentsModule.v3beta1.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.Experiment() + ); + client.innerApiCalls.getExperiment = stubSimpleCall(expectedResponse); + const [response] = await client.getExperiment(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getExperiment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getExperiment without error using callback', async () => { + const client = new experimentsModule.v3beta1.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.Experiment() + ); + client.innerApiCalls.getExperiment = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.getExperiment( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dialogflow.cx.v3beta1.IExperiment | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getExperiment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getExperiment with error', async () => { + const client = new experimentsModule.v3beta1.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getExperiment = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getExperiment(request), expectedError); + assert( + (client.innerApiCalls.getExperiment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('createExperiment', () => { + it('invokes createExperiment without error', async () => { + const client = new experimentsModule.v3beta1.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.Experiment() + ); + client.innerApiCalls.createExperiment = stubSimpleCall(expectedResponse); + const [response] = await client.createExperiment(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createExperiment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createExperiment without error using callback', async () => { + const client = new experimentsModule.v3beta1.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.Experiment() + ); + client.innerApiCalls.createExperiment = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.createExperiment( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dialogflow.cx.v3beta1.IExperiment | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createExperiment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes createExperiment with error', async () => { + const client = new experimentsModule.v3beta1.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createExperiment = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.createExperiment(request), expectedError); + assert( + (client.innerApiCalls.createExperiment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('updateExperiment', () => { + it('invokes updateExperiment without error', async () => { + const client = new experimentsModule.v3beta1.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest() + ); + request.experiment = {}; + request.experiment.name = ''; + const expectedHeaderRequestParams = 'experiment.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.Experiment() + ); + client.innerApiCalls.updateExperiment = stubSimpleCall(expectedResponse); + const [response] = await client.updateExperiment(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateExperiment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateExperiment without error using callback', async () => { + const client = new experimentsModule.v3beta1.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest() + ); + request.experiment = {}; + request.experiment.name = ''; + const expectedHeaderRequestParams = 'experiment.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.Experiment() + ); + client.innerApiCalls.updateExperiment = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.updateExperiment( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dialogflow.cx.v3beta1.IExperiment | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateExperiment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes updateExperiment with error', async () => { + const client = new experimentsModule.v3beta1.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest() + ); + request.experiment = {}; + request.experiment.name = ''; + const expectedHeaderRequestParams = 'experiment.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateExperiment = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.updateExperiment(request), expectedError); + assert( + (client.innerApiCalls.updateExperiment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('deleteExperiment', () => { + it('invokes deleteExperiment without error', async () => { + const client = new experimentsModule.v3beta1.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteExperiment = stubSimpleCall(expectedResponse); + const [response] = await client.deleteExperiment(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteExperiment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteExperiment without error using callback', async () => { + const client = new experimentsModule.v3beta1.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteExperiment = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.deleteExperiment( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteExperiment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes deleteExperiment with error', async () => { + const client = new experimentsModule.v3beta1.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteExperiment = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteExperiment(request), expectedError); + assert( + (client.innerApiCalls.deleteExperiment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('startExperiment', () => { + it('invokes startExperiment without error', async () => { + const client = new experimentsModule.v3beta1.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.Experiment() + ); + client.innerApiCalls.startExperiment = stubSimpleCall(expectedResponse); + const [response] = await client.startExperiment(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.startExperiment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes startExperiment without error using callback', async () => { + const client = new experimentsModule.v3beta1.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.Experiment() + ); + client.innerApiCalls.startExperiment = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.startExperiment( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dialogflow.cx.v3beta1.IExperiment | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.startExperiment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes startExperiment with error', async () => { + const client = new experimentsModule.v3beta1.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.startExperiment = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.startExperiment(request), expectedError); + assert( + (client.innerApiCalls.startExperiment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('stopExperiment', () => { + it('invokes stopExperiment without error', async () => { + const client = new experimentsModule.v3beta1.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.Experiment() + ); + client.innerApiCalls.stopExperiment = stubSimpleCall(expectedResponse); + const [response] = await client.stopExperiment(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.stopExperiment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes stopExperiment without error using callback', async () => { + const client = new experimentsModule.v3beta1.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.Experiment() + ); + client.innerApiCalls.stopExperiment = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.stopExperiment( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dialogflow.cx.v3beta1.IExperiment | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.stopExperiment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes stopExperiment with error', async () => { + const client = new experimentsModule.v3beta1.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.stopExperiment = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.stopExperiment(request), expectedError); + assert( + (client.innerApiCalls.stopExperiment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('listExperiments', () => { + it('invokes listExperiments without error', async () => { + const client = new experimentsModule.v3beta1.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.Experiment() + ), + generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.Experiment() + ), + generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.Experiment() + ), + ]; + client.innerApiCalls.listExperiments = stubSimpleCall(expectedResponse); + const [response] = await client.listExperiments(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listExperiments as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listExperiments without error using callback', async () => { + const client = new experimentsModule.v3beta1.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.Experiment() + ), + generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.Experiment() + ), + generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.Experiment() + ), + ]; + client.innerApiCalls.listExperiments = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.listExperiments( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.dialogflow.cx.v3beta1.IExperiment[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listExperiments as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listExperiments with error', async () => { + const client = new experimentsModule.v3beta1.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listExperiments = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listExperiments(request), expectedError); + assert( + (client.innerApiCalls.listExperiments as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listExperimentsStream without error', async () => { + const client = new experimentsModule.v3beta1.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.Experiment() + ), + generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.Experiment() + ), + generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.Experiment() + ), + ]; + client.descriptors.page.listExperiments.createStream = stubPageStreamingCall( + expectedResponse + ); + const stream = client.listExperimentsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dialogflow.cx.v3beta1.Experiment[] = []; + stream.on( + 'data', + (response: protos.google.cloud.dialogflow.cx.v3beta1.Experiment) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + (client.descriptors.page.listExperiments.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listExperiments, request) + ); + assert.strictEqual( + (client.descriptors.page.listExperiments + .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('invokes listExperimentsStream with error', async () => { + const client = new experimentsModule.v3beta1.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listExperiments.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listExperimentsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dialogflow.cx.v3beta1.Experiment[] = []; + stream.on( + 'data', + (response: protos.google.cloud.dialogflow.cx.v3beta1.Experiment) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listExperiments.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listExperiments, request) + ); + assert.strictEqual( + (client.descriptors.page.listExperiments + .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listExperiments without error', async () => { + const client = new experimentsModule.v3beta1.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.Experiment() + ), + generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.Experiment() + ), + generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.Experiment() + ), + ]; + client.descriptors.page.listExperiments.asyncIterate = stubAsyncIterationCall( + expectedResponse + ); + const responses: protos.google.cloud.dialogflow.cx.v3beta1.IExperiment[] = []; + const iterable = client.listExperimentsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listExperiments + .asyncIterate as SinonStub).getCall(0).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listExperiments + .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listExperiments with error', async () => { + const client = new experimentsModule.v3beta1.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listExperiments.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listExperimentsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dialogflow.cx.v3beta1.IExperiment[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listExperiments + .asyncIterate as SinonStub).getCall(0).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listExperiments + .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + }); + + describe('Path templates', () => { + describe('agent', () => { + const fakePath = '/rendered/path/agent'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + }; + const client = new experimentsModule.v3beta1.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.agentPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.agentPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('agentPath', () => { + const result = client.agentPath( + 'projectValue', + 'locationValue', + 'agentValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.agentPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromAgentName', () => { + const result = client.matchProjectFromAgentName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.agentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromAgentName', () => { + const result = client.matchLocationFromAgentName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.agentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAgentFromAgentName', () => { + const result = client.matchAgentFromAgentName(fakePath); + assert.strictEqual(result, 'agentValue'); + assert( + (client.pathTemplates.agentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('entityType', () => { + const fakePath = '/rendered/path/entityType'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + entity_type: 'entityTypeValue', + }; + const client = new experimentsModule.v3beta1.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.entityTypePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.entityTypePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('entityTypePath', () => { + const result = client.entityTypePath( + 'projectValue', + 'locationValue', + 'agentValue', + 'entityTypeValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.entityTypePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromEntityTypeName', () => { + const result = client.matchProjectFromEntityTypeName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.entityTypePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromEntityTypeName', () => { + const result = client.matchLocationFromEntityTypeName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.entityTypePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAgentFromEntityTypeName', () => { + const result = client.matchAgentFromEntityTypeName(fakePath); + assert.strictEqual(result, 'agentValue'); + assert( + (client.pathTemplates.entityTypePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEntityTypeFromEntityTypeName', () => { + const result = client.matchEntityTypeFromEntityTypeName(fakePath); + assert.strictEqual(result, 'entityTypeValue'); + assert( + (client.pathTemplates.entityTypePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('environment', () => { + const fakePath = '/rendered/path/environment'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + environment: 'environmentValue', + }; + const client = new experimentsModule.v3beta1.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.environmentPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.environmentPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('environmentPath', () => { + const result = client.environmentPath( + 'projectValue', + 'locationValue', + 'agentValue', + 'environmentValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.environmentPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromEnvironmentName', () => { + const result = client.matchProjectFromEnvironmentName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromEnvironmentName', () => { + const result = client.matchLocationFromEnvironmentName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAgentFromEnvironmentName', () => { + const result = client.matchAgentFromEnvironmentName(fakePath); + assert.strictEqual(result, 'agentValue'); + assert( + (client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEnvironmentFromEnvironmentName', () => { + const result = client.matchEnvironmentFromEnvironmentName(fakePath); + assert.strictEqual(result, 'environmentValue'); + assert( + (client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('experiment', () => { + const fakePath = '/rendered/path/experiment'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + environment: 'environmentValue', + experiment: 'experimentValue', + }; + const client = new experimentsModule.v3beta1.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.experimentPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.experimentPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('experimentPath', () => { + const result = client.experimentPath( + 'projectValue', + 'locationValue', + 'agentValue', + 'environmentValue', + 'experimentValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.experimentPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromExperimentName', () => { + const result = client.matchProjectFromExperimentName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromExperimentName', () => { + const result = client.matchLocationFromExperimentName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAgentFromExperimentName', () => { + const result = client.matchAgentFromExperimentName(fakePath); + assert.strictEqual(result, 'agentValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEnvironmentFromExperimentName', () => { + const result = client.matchEnvironmentFromExperimentName(fakePath); + assert.strictEqual(result, 'environmentValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchExperimentFromExperimentName', () => { + const result = client.matchExperimentFromExperimentName(fakePath); + assert.strictEqual(result, 'experimentValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('flow', () => { + const fakePath = '/rendered/path/flow'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + flow: 'flowValue', + }; + const client = new experimentsModule.v3beta1.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.flowPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.flowPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('flowPath', () => { + const result = client.flowPath( + 'projectValue', + 'locationValue', + 'agentValue', + 'flowValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.flowPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromFlowName', () => { + const result = client.matchProjectFromFlowName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.flowPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromFlowName', () => { + const result = client.matchLocationFromFlowName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.flowPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAgentFromFlowName', () => { + const result = client.matchAgentFromFlowName(fakePath); + assert.strictEqual(result, 'agentValue'); + assert( + (client.pathTemplates.flowPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchFlowFromFlowName', () => { + const result = client.matchFlowFromFlowName(fakePath); + assert.strictEqual(result, 'flowValue'); + assert( + (client.pathTemplates.flowPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('intent', () => { + const fakePath = '/rendered/path/intent'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + intent: 'intentValue', + }; + const client = new experimentsModule.v3beta1.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.intentPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.intentPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('intentPath', () => { + const result = client.intentPath( + 'projectValue', + 'locationValue', + 'agentValue', + 'intentValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.intentPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromIntentName', () => { + const result = client.matchProjectFromIntentName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.intentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromIntentName', () => { + const result = client.matchLocationFromIntentName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.intentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAgentFromIntentName', () => { + const result = client.matchAgentFromIntentName(fakePath); + assert.strictEqual(result, 'agentValue'); + assert( + (client.pathTemplates.intentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchIntentFromIntentName', () => { + const result = client.matchIntentFromIntentName(fakePath); + assert.strictEqual(result, 'intentValue'); + assert( + (client.pathTemplates.intentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('location', () => { + const fakePath = '/rendered/path/location'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + }; + const client = new experimentsModule.v3beta1.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.locationPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.locationPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('locationPath', () => { + const result = client.locationPath('projectValue', 'locationValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.locationPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromLocationName', () => { + const result = client.matchProjectFromLocationName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromLocationName', () => { + const result = client.matchLocationFromLocationName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('page', () => { + const fakePath = '/rendered/path/page'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + flow: 'flowValue', + page: 'pageValue', + }; + const client = new experimentsModule.v3beta1.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.pagePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.pagePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('pagePath', () => { + const result = client.pagePath( + 'projectValue', + 'locationValue', + 'agentValue', + 'flowValue', + 'pageValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.pagePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromPageName', () => { + const result = client.matchProjectFromPageName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.pagePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromPageName', () => { + const result = client.matchLocationFromPageName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.pagePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAgentFromPageName', () => { + const result = client.matchAgentFromPageName(fakePath); + assert.strictEqual(result, 'agentValue'); + assert( + (client.pathTemplates.pagePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchFlowFromPageName', () => { + const result = client.matchFlowFromPageName(fakePath); + assert.strictEqual(result, 'flowValue'); + assert( + (client.pathTemplates.pagePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchPageFromPageName', () => { + const result = client.matchPageFromPageName(fakePath); + assert.strictEqual(result, 'pageValue'); + assert( + (client.pathTemplates.pagePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('project', () => { + const fakePath = '/rendered/path/project'; + const expectedParameters = { + project: 'projectValue', + }; + const client = new experimentsModule.v3beta1.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectPath', () => { + const result = client.projectPath('projectValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectName', () => { + const result = client.matchProjectFromProjectName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationAgentEnvironmentSessionEntityType', () => { + const fakePath = + '/rendered/path/projectLocationAgentEnvironmentSessionEntityType'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + environment: 'environmentValue', + session: 'sessionValue', + entity_type: 'entityTypeValue', + }; + const client = new experimentsModule.v3beta1.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectLocationAgentEnvironmentSessionEntityTypePath', () => { + const result = client.projectLocationAgentEnvironmentSessionEntityTypePath( + 'projectValue', + 'locationValue', + 'agentValue', + 'environmentValue', + 'sessionValue', + 'entityTypeValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates + .projectLocationAgentEnvironmentSessionEntityTypePathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationAgentEnvironmentSessionEntityTypeName', () => { + const result = client.matchProjectFromProjectLocationAgentEnvironmentSessionEntityTypeName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates + .projectLocationAgentEnvironmentSessionEntityTypePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationAgentEnvironmentSessionEntityTypeName', () => { + const result = client.matchLocationFromProjectLocationAgentEnvironmentSessionEntityTypeName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates + .projectLocationAgentEnvironmentSessionEntityTypePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAgentFromProjectLocationAgentEnvironmentSessionEntityTypeName', () => { + const result = client.matchAgentFromProjectLocationAgentEnvironmentSessionEntityTypeName( + fakePath + ); + assert.strictEqual(result, 'agentValue'); + assert( + (client.pathTemplates + .projectLocationAgentEnvironmentSessionEntityTypePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEnvironmentFromProjectLocationAgentEnvironmentSessionEntityTypeName', () => { + const result = client.matchEnvironmentFromProjectLocationAgentEnvironmentSessionEntityTypeName( + fakePath + ); + assert.strictEqual(result, 'environmentValue'); + assert( + (client.pathTemplates + .projectLocationAgentEnvironmentSessionEntityTypePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchSessionFromProjectLocationAgentEnvironmentSessionEntityTypeName', () => { + const result = client.matchSessionFromProjectLocationAgentEnvironmentSessionEntityTypeName( + fakePath + ); + assert.strictEqual(result, 'sessionValue'); + assert( + (client.pathTemplates + .projectLocationAgentEnvironmentSessionEntityTypePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEntityTypeFromProjectLocationAgentEnvironmentSessionEntityTypeName', () => { + const result = client.matchEntityTypeFromProjectLocationAgentEnvironmentSessionEntityTypeName( + fakePath + ); + assert.strictEqual(result, 'entityTypeValue'); + assert( + (client.pathTemplates + .projectLocationAgentEnvironmentSessionEntityTypePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationAgentSessionEntityType', () => { + const fakePath = '/rendered/path/projectLocationAgentSessionEntityType'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + session: 'sessionValue', + entity_type: 'entityTypeValue', + }; + const client = new experimentsModule.v3beta1.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectLocationAgentSessionEntityTypePath', () => { + const result = client.projectLocationAgentSessionEntityTypePath( + 'projectValue', + 'locationValue', + 'agentValue', + 'sessionValue', + 'entityTypeValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates + .projectLocationAgentSessionEntityTypePathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationAgentSessionEntityTypeName', () => { + const result = client.matchProjectFromProjectLocationAgentSessionEntityTypeName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates + .projectLocationAgentSessionEntityTypePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationAgentSessionEntityTypeName', () => { + const result = client.matchLocationFromProjectLocationAgentSessionEntityTypeName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates + .projectLocationAgentSessionEntityTypePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAgentFromProjectLocationAgentSessionEntityTypeName', () => { + const result = client.matchAgentFromProjectLocationAgentSessionEntityTypeName( + fakePath + ); + assert.strictEqual(result, 'agentValue'); + assert( + (client.pathTemplates + .projectLocationAgentSessionEntityTypePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchSessionFromProjectLocationAgentSessionEntityTypeName', () => { + const result = client.matchSessionFromProjectLocationAgentSessionEntityTypeName( + fakePath + ); + assert.strictEqual(result, 'sessionValue'); + assert( + (client.pathTemplates + .projectLocationAgentSessionEntityTypePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEntityTypeFromProjectLocationAgentSessionEntityTypeName', () => { + const result = client.matchEntityTypeFromProjectLocationAgentSessionEntityTypeName( + fakePath + ); + assert.strictEqual(result, 'entityTypeValue'); + assert( + (client.pathTemplates + .projectLocationAgentSessionEntityTypePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('securitySettings', () => { + const fakePath = '/rendered/path/securitySettings'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + security_settings: 'securitySettingsValue', + }; + const client = new experimentsModule.v3beta1.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.securitySettingsPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.securitySettingsPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('securitySettingsPath', () => { + const result = client.securitySettingsPath( + 'projectValue', + 'locationValue', + 'securitySettingsValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.securitySettingsPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromSecuritySettingsName', () => { + const result = client.matchProjectFromSecuritySettingsName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.securitySettingsPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromSecuritySettingsName', () => { + const result = client.matchLocationFromSecuritySettingsName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.securitySettingsPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchSecuritySettingsFromSecuritySettingsName', () => { + const result = client.matchSecuritySettingsFromSecuritySettingsName( + fakePath + ); + assert.strictEqual(result, 'securitySettingsValue'); + assert( + (client.pathTemplates.securitySettingsPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('transitionRouteGroup', () => { + const fakePath = '/rendered/path/transitionRouteGroup'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + flow: 'flowValue', + transition_route_group: 'transitionRouteGroupValue', + }; + const client = new experimentsModule.v3beta1.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.transitionRouteGroupPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.transitionRouteGroupPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('transitionRouteGroupPath', () => { + const result = client.transitionRouteGroupPath( + 'projectValue', + 'locationValue', + 'agentValue', + 'flowValue', + 'transitionRouteGroupValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.transitionRouteGroupPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromTransitionRouteGroupName', () => { + const result = client.matchProjectFromTransitionRouteGroupName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.transitionRouteGroupPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromTransitionRouteGroupName', () => { + const result = client.matchLocationFromTransitionRouteGroupName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.transitionRouteGroupPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAgentFromTransitionRouteGroupName', () => { + const result = client.matchAgentFromTransitionRouteGroupName(fakePath); + assert.strictEqual(result, 'agentValue'); + assert( + (client.pathTemplates.transitionRouteGroupPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchFlowFromTransitionRouteGroupName', () => { + const result = client.matchFlowFromTransitionRouteGroupName(fakePath); + assert.strictEqual(result, 'flowValue'); + assert( + (client.pathTemplates.transitionRouteGroupPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchTransitionRouteGroupFromTransitionRouteGroupName', () => { + const result = client.matchTransitionRouteGroupFromTransitionRouteGroupName( + fakePath + ); + assert.strictEqual(result, 'transitionRouteGroupValue'); + assert( + (client.pathTemplates.transitionRouteGroupPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('version', () => { + const fakePath = '/rendered/path/version'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + flow: 'flowValue', + version: 'versionValue', + }; + const client = new experimentsModule.v3beta1.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.versionPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.versionPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('versionPath', () => { + const result = client.versionPath( + 'projectValue', + 'locationValue', + 'agentValue', + 'flowValue', + 'versionValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.versionPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromVersionName', () => { + const result = client.matchProjectFromVersionName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.versionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromVersionName', () => { + const result = client.matchLocationFromVersionName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.versionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAgentFromVersionName', () => { + const result = client.matchAgentFromVersionName(fakePath); + assert.strictEqual(result, 'agentValue'); + assert( + (client.pathTemplates.versionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchFlowFromVersionName', () => { + const result = client.matchFlowFromVersionName(fakePath); + assert.strictEqual(result, 'flowValue'); + assert( + (client.pathTemplates.versionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchVersionFromVersionName', () => { + const result = client.matchVersionFromVersionName(fakePath); + assert.strictEqual(result, 'versionValue'); + assert( + (client.pathTemplates.versionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('webhook', () => { + const fakePath = '/rendered/path/webhook'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + webhook: 'webhookValue', + }; + const client = new experimentsModule.v3beta1.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.webhookPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.webhookPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('webhookPath', () => { + const result = client.webhookPath( + 'projectValue', + 'locationValue', + 'agentValue', + 'webhookValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.webhookPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromWebhookName', () => { + const result = client.matchProjectFromWebhookName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.webhookPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromWebhookName', () => { + const result = client.matchLocationFromWebhookName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.webhookPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAgentFromWebhookName', () => { + const result = client.matchAgentFromWebhookName(fakePath); + assert.strictEqual(result, 'agentValue'); + assert( + (client.pathTemplates.webhookPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchWebhookFromWebhookName', () => { + const result = client.matchWebhookFromWebhookName(fakePath); + assert.strictEqual(result, 'webhookValue'); + assert( + (client.pathTemplates.webhookPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + }); +}); diff --git a/test/gapic_flows_v3.ts b/test/gapic_flows_v3.ts index 14c81c9d..266500c0 100644 --- a/test/gapic_flows_v3.ts +++ b/test/gapic_flows_v3.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -1361,6 +1361,94 @@ describe('v3.FlowsClient', () => { }); }); + describe('experiment', () => { + const fakePath = '/rendered/path/experiment'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + environment: 'environmentValue', + experiment: 'experimentValue', + }; + const client = new flowsModule.v3.FlowsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.experimentPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.experimentPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('experimentPath', () => { + const result = client.experimentPath( + 'projectValue', + 'locationValue', + 'agentValue', + 'environmentValue', + 'experimentValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.experimentPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromExperimentName', () => { + const result = client.matchProjectFromExperimentName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromExperimentName', () => { + const result = client.matchLocationFromExperimentName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAgentFromExperimentName', () => { + const result = client.matchAgentFromExperimentName(fakePath); + assert.strictEqual(result, 'agentValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEnvironmentFromExperimentName', () => { + const result = client.matchEnvironmentFromExperimentName(fakePath); + assert.strictEqual(result, 'environmentValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchExperimentFromExperimentName', () => { + const result = client.matchExperimentFromExperimentName(fakePath); + assert.strictEqual(result, 'experimentValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('flow', () => { const fakePath = '/rendered/path/flow'; const expectedParameters = { diff --git a/test/gapic_flows_v3beta1.ts b/test/gapic_flows_v3beta1.ts index 410d5a49..87a13d56 100644 --- a/test/gapic_flows_v3beta1.ts +++ b/test/gapic_flows_v3beta1.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -1385,6 +1385,94 @@ describe('v3beta1.FlowsClient', () => { }); }); + describe('experiment', () => { + const fakePath = '/rendered/path/experiment'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + environment: 'environmentValue', + experiment: 'experimentValue', + }; + const client = new flowsModule.v3beta1.FlowsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.experimentPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.experimentPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('experimentPath', () => { + const result = client.experimentPath( + 'projectValue', + 'locationValue', + 'agentValue', + 'environmentValue', + 'experimentValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.experimentPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromExperimentName', () => { + const result = client.matchProjectFromExperimentName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromExperimentName', () => { + const result = client.matchLocationFromExperimentName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAgentFromExperimentName', () => { + const result = client.matchAgentFromExperimentName(fakePath); + assert.strictEqual(result, 'agentValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEnvironmentFromExperimentName', () => { + const result = client.matchEnvironmentFromExperimentName(fakePath); + assert.strictEqual(result, 'environmentValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchExperimentFromExperimentName', () => { + const result = client.matchExperimentFromExperimentName(fakePath); + assert.strictEqual(result, 'experimentValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('flow', () => { const fakePath = '/rendered/path/flow'; const expectedParameters = { diff --git a/test/gapic_intents_v3.ts b/test/gapic_intents_v3.ts index 4ff53b56..71df2525 100644 --- a/test/gapic_intents_v3.ts +++ b/test/gapic_intents_v3.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -1171,6 +1171,94 @@ describe('v3.IntentsClient', () => { }); }); + describe('experiment', () => { + const fakePath = '/rendered/path/experiment'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + environment: 'environmentValue', + experiment: 'experimentValue', + }; + const client = new intentsModule.v3.IntentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.experimentPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.experimentPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('experimentPath', () => { + const result = client.experimentPath( + 'projectValue', + 'locationValue', + 'agentValue', + 'environmentValue', + 'experimentValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.experimentPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromExperimentName', () => { + const result = client.matchProjectFromExperimentName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromExperimentName', () => { + const result = client.matchLocationFromExperimentName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAgentFromExperimentName', () => { + const result = client.matchAgentFromExperimentName(fakePath); + assert.strictEqual(result, 'agentValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEnvironmentFromExperimentName', () => { + const result = client.matchEnvironmentFromExperimentName(fakePath); + assert.strictEqual(result, 'environmentValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchExperimentFromExperimentName', () => { + const result = client.matchExperimentFromExperimentName(fakePath); + assert.strictEqual(result, 'experimentValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('flow', () => { const fakePath = '/rendered/path/flow'; const expectedParameters = { diff --git a/test/gapic_intents_v3beta1.ts b/test/gapic_intents_v3beta1.ts index 1b860050..664f3c57 100644 --- a/test/gapic_intents_v3beta1.ts +++ b/test/gapic_intents_v3beta1.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -1171,6 +1171,94 @@ describe('v3beta1.IntentsClient', () => { }); }); + describe('experiment', () => { + const fakePath = '/rendered/path/experiment'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + environment: 'environmentValue', + experiment: 'experimentValue', + }; + const client = new intentsModule.v3beta1.IntentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.experimentPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.experimentPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('experimentPath', () => { + const result = client.experimentPath( + 'projectValue', + 'locationValue', + 'agentValue', + 'environmentValue', + 'experimentValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.experimentPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromExperimentName', () => { + const result = client.matchProjectFromExperimentName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromExperimentName', () => { + const result = client.matchLocationFromExperimentName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAgentFromExperimentName', () => { + const result = client.matchAgentFromExperimentName(fakePath); + assert.strictEqual(result, 'agentValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEnvironmentFromExperimentName', () => { + const result = client.matchEnvironmentFromExperimentName(fakePath); + assert.strictEqual(result, 'environmentValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchExperimentFromExperimentName', () => { + const result = client.matchExperimentFromExperimentName(fakePath); + assert.strictEqual(result, 'experimentValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('flow', () => { const fakePath = '/rendered/path/flow'; const expectedParameters = { diff --git a/test/gapic_pages_v3.ts b/test/gapic_pages_v3.ts index e55a08e8..adf7a889 100644 --- a/test/gapic_pages_v3.ts +++ b/test/gapic_pages_v3.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -1138,6 +1138,94 @@ describe('v3.PagesClient', () => { }); }); + describe('experiment', () => { + const fakePath = '/rendered/path/experiment'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + environment: 'environmentValue', + experiment: 'experimentValue', + }; + const client = new pagesModule.v3.PagesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.experimentPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.experimentPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('experimentPath', () => { + const result = client.experimentPath( + 'projectValue', + 'locationValue', + 'agentValue', + 'environmentValue', + 'experimentValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.experimentPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromExperimentName', () => { + const result = client.matchProjectFromExperimentName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromExperimentName', () => { + const result = client.matchLocationFromExperimentName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAgentFromExperimentName', () => { + const result = client.matchAgentFromExperimentName(fakePath); + assert.strictEqual(result, 'agentValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEnvironmentFromExperimentName', () => { + const result = client.matchEnvironmentFromExperimentName(fakePath); + assert.strictEqual(result, 'environmentValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchExperimentFromExperimentName', () => { + const result = client.matchExperimentFromExperimentName(fakePath); + assert.strictEqual(result, 'experimentValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('flow', () => { const fakePath = '/rendered/path/flow'; const expectedParameters = { diff --git a/test/gapic_pages_v3beta1.ts b/test/gapic_pages_v3beta1.ts index 2194b371..499d8770 100644 --- a/test/gapic_pages_v3beta1.ts +++ b/test/gapic_pages_v3beta1.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -1162,6 +1162,94 @@ describe('v3beta1.PagesClient', () => { }); }); + describe('experiment', () => { + const fakePath = '/rendered/path/experiment'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + environment: 'environmentValue', + experiment: 'experimentValue', + }; + const client = new pagesModule.v3beta1.PagesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.experimentPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.experimentPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('experimentPath', () => { + const result = client.experimentPath( + 'projectValue', + 'locationValue', + 'agentValue', + 'environmentValue', + 'experimentValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.experimentPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromExperimentName', () => { + const result = client.matchProjectFromExperimentName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromExperimentName', () => { + const result = client.matchLocationFromExperimentName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAgentFromExperimentName', () => { + const result = client.matchAgentFromExperimentName(fakePath); + assert.strictEqual(result, 'agentValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEnvironmentFromExperimentName', () => { + const result = client.matchEnvironmentFromExperimentName(fakePath); + assert.strictEqual(result, 'environmentValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchExperimentFromExperimentName', () => { + const result = client.matchExperimentFromExperimentName(fakePath); + assert.strictEqual(result, 'experimentValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('flow', () => { const fakePath = '/rendered/path/flow'; const expectedParameters = { diff --git a/test/gapic_security_settings_service_v3.ts b/test/gapic_security_settings_service_v3.ts index e4fae236..0c337bbf 100644 --- a/test/gapic_security_settings_service_v3.ts +++ b/test/gapic_security_settings_service_v3.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -1256,6 +1256,96 @@ describe('v3.SecuritySettingsServiceClient', () => { }); }); + describe('experiment', () => { + const fakePath = '/rendered/path/experiment'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + environment: 'environmentValue', + experiment: 'experimentValue', + }; + const client = new securitysettingsserviceModule.v3.SecuritySettingsServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.experimentPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.experimentPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('experimentPath', () => { + const result = client.experimentPath( + 'projectValue', + 'locationValue', + 'agentValue', + 'environmentValue', + 'experimentValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.experimentPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromExperimentName', () => { + const result = client.matchProjectFromExperimentName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromExperimentName', () => { + const result = client.matchLocationFromExperimentName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAgentFromExperimentName', () => { + const result = client.matchAgentFromExperimentName(fakePath); + assert.strictEqual(result, 'agentValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEnvironmentFromExperimentName', () => { + const result = client.matchEnvironmentFromExperimentName(fakePath); + assert.strictEqual(result, 'environmentValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchExperimentFromExperimentName', () => { + const result = client.matchExperimentFromExperimentName(fakePath); + assert.strictEqual(result, 'experimentValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('flow', () => { const fakePath = '/rendered/path/flow'; const expectedParameters = { diff --git a/test/gapic_security_settings_service_v3beta1.ts b/test/gapic_security_settings_service_v3beta1.ts index b5b4dd80..e8767aba 100644 --- a/test/gapic_security_settings_service_v3beta1.ts +++ b/test/gapic_security_settings_service_v3beta1.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -1260,6 +1260,96 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { }); }); + describe('experiment', () => { + const fakePath = '/rendered/path/experiment'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + environment: 'environmentValue', + experiment: 'experimentValue', + }; + const client = new securitysettingsserviceModule.v3beta1.SecuritySettingsServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.experimentPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.experimentPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('experimentPath', () => { + const result = client.experimentPath( + 'projectValue', + 'locationValue', + 'agentValue', + 'environmentValue', + 'experimentValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.experimentPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromExperimentName', () => { + const result = client.matchProjectFromExperimentName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromExperimentName', () => { + const result = client.matchLocationFromExperimentName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAgentFromExperimentName', () => { + const result = client.matchAgentFromExperimentName(fakePath); + assert.strictEqual(result, 'agentValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEnvironmentFromExperimentName', () => { + const result = client.matchEnvironmentFromExperimentName(fakePath); + assert.strictEqual(result, 'environmentValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchExperimentFromExperimentName', () => { + const result = client.matchExperimentFromExperimentName(fakePath); + assert.strictEqual(result, 'experimentValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('flow', () => { const fakePath = '/rendered/path/flow'; const expectedParameters = { diff --git a/test/gapic_session_entity_types_v3.ts b/test/gapic_session_entity_types_v3.ts index 31d575af..f34715eb 100644 --- a/test/gapic_session_entity_types_v3.ts +++ b/test/gapic_session_entity_types_v3.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -1208,6 +1208,94 @@ describe('v3.SessionEntityTypesClient', () => { }); }); + describe('experiment', () => { + const fakePath = '/rendered/path/experiment'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + environment: 'environmentValue', + experiment: 'experimentValue', + }; + const client = new sessionentitytypesModule.v3.SessionEntityTypesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.experimentPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.experimentPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('experimentPath', () => { + const result = client.experimentPath( + 'projectValue', + 'locationValue', + 'agentValue', + 'environmentValue', + 'experimentValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.experimentPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromExperimentName', () => { + const result = client.matchProjectFromExperimentName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromExperimentName', () => { + const result = client.matchLocationFromExperimentName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAgentFromExperimentName', () => { + const result = client.matchAgentFromExperimentName(fakePath); + assert.strictEqual(result, 'agentValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEnvironmentFromExperimentName', () => { + const result = client.matchEnvironmentFromExperimentName(fakePath); + assert.strictEqual(result, 'environmentValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchExperimentFromExperimentName', () => { + const result = client.matchExperimentFromExperimentName(fakePath); + assert.strictEqual(result, 'experimentValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('flow', () => { const fakePath = '/rendered/path/flow'; const expectedParameters = { diff --git a/test/gapic_session_entity_types_v3beta1.ts b/test/gapic_session_entity_types_v3beta1.ts index 5673bede..d0110521 100644 --- a/test/gapic_session_entity_types_v3beta1.ts +++ b/test/gapic_session_entity_types_v3beta1.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -1262,6 +1262,96 @@ describe('v3beta1.SessionEntityTypesClient', () => { }); }); + describe('experiment', () => { + const fakePath = '/rendered/path/experiment'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + environment: 'environmentValue', + experiment: 'experimentValue', + }; + const client = new sessionentitytypesModule.v3beta1.SessionEntityTypesClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.experimentPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.experimentPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('experimentPath', () => { + const result = client.experimentPath( + 'projectValue', + 'locationValue', + 'agentValue', + 'environmentValue', + 'experimentValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.experimentPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromExperimentName', () => { + const result = client.matchProjectFromExperimentName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromExperimentName', () => { + const result = client.matchLocationFromExperimentName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAgentFromExperimentName', () => { + const result = client.matchAgentFromExperimentName(fakePath); + assert.strictEqual(result, 'agentValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEnvironmentFromExperimentName', () => { + const result = client.matchEnvironmentFromExperimentName(fakePath); + assert.strictEqual(result, 'environmentValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchExperimentFromExperimentName', () => { + const result = client.matchExperimentFromExperimentName(fakePath); + assert.strictEqual(result, 'experimentValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('flow', () => { const fakePath = '/rendered/path/flow'; const expectedParameters = { diff --git a/test/gapic_sessions_v3.ts b/test/gapic_sessions_v3.ts index a52a05c2..17d8d19f 100644 --- a/test/gapic_sessions_v3.ts +++ b/test/gapic_sessions_v3.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -795,6 +795,94 @@ describe('v3.SessionsClient', () => { }); }); + describe('experiment', () => { + const fakePath = '/rendered/path/experiment'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + environment: 'environmentValue', + experiment: 'experimentValue', + }; + const client = new sessionsModule.v3.SessionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.experimentPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.experimentPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('experimentPath', () => { + const result = client.experimentPath( + 'projectValue', + 'locationValue', + 'agentValue', + 'environmentValue', + 'experimentValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.experimentPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromExperimentName', () => { + const result = client.matchProjectFromExperimentName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromExperimentName', () => { + const result = client.matchLocationFromExperimentName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAgentFromExperimentName', () => { + const result = client.matchAgentFromExperimentName(fakePath); + assert.strictEqual(result, 'agentValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEnvironmentFromExperimentName', () => { + const result = client.matchEnvironmentFromExperimentName(fakePath); + assert.strictEqual(result, 'environmentValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchExperimentFromExperimentName', () => { + const result = client.matchExperimentFromExperimentName(fakePath); + assert.strictEqual(result, 'experimentValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('flow', () => { const fakePath = '/rendered/path/flow'; const expectedParameters = { diff --git a/test/gapic_sessions_v3beta1.ts b/test/gapic_sessions_v3beta1.ts index a3b89a7e..703c4b2b 100644 --- a/test/gapic_sessions_v3beta1.ts +++ b/test/gapic_sessions_v3beta1.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -795,6 +795,94 @@ describe('v3beta1.SessionsClient', () => { }); }); + describe('experiment', () => { + const fakePath = '/rendered/path/experiment'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + environment: 'environmentValue', + experiment: 'experimentValue', + }; + const client = new sessionsModule.v3beta1.SessionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.experimentPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.experimentPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('experimentPath', () => { + const result = client.experimentPath( + 'projectValue', + 'locationValue', + 'agentValue', + 'environmentValue', + 'experimentValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.experimentPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromExperimentName', () => { + const result = client.matchProjectFromExperimentName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromExperimentName', () => { + const result = client.matchLocationFromExperimentName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAgentFromExperimentName', () => { + const result = client.matchAgentFromExperimentName(fakePath); + assert.strictEqual(result, 'agentValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEnvironmentFromExperimentName', () => { + const result = client.matchEnvironmentFromExperimentName(fakePath); + assert.strictEqual(result, 'environmentValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchExperimentFromExperimentName', () => { + const result = client.matchExperimentFromExperimentName(fakePath); + assert.strictEqual(result, 'experimentValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('flow', () => { const fakePath = '/rendered/path/flow'; const expectedParameters = { diff --git a/test/gapic_transition_route_groups_v3.ts b/test/gapic_transition_route_groups_v3.ts index 18d903fd..c42b3a66 100644 --- a/test/gapic_transition_route_groups_v3.ts +++ b/test/gapic_transition_route_groups_v3.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -1266,6 +1266,96 @@ describe('v3.TransitionRouteGroupsClient', () => { }); }); + describe('experiment', () => { + const fakePath = '/rendered/path/experiment'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + environment: 'environmentValue', + experiment: 'experimentValue', + }; + const client = new transitionroutegroupsModule.v3.TransitionRouteGroupsClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.experimentPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.experimentPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('experimentPath', () => { + const result = client.experimentPath( + 'projectValue', + 'locationValue', + 'agentValue', + 'environmentValue', + 'experimentValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.experimentPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromExperimentName', () => { + const result = client.matchProjectFromExperimentName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromExperimentName', () => { + const result = client.matchLocationFromExperimentName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAgentFromExperimentName', () => { + const result = client.matchAgentFromExperimentName(fakePath); + assert.strictEqual(result, 'agentValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEnvironmentFromExperimentName', () => { + const result = client.matchEnvironmentFromExperimentName(fakePath); + assert.strictEqual(result, 'environmentValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchExperimentFromExperimentName', () => { + const result = client.matchExperimentFromExperimentName(fakePath); + assert.strictEqual(result, 'experimentValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('flow', () => { const fakePath = '/rendered/path/flow'; const expectedParameters = { diff --git a/test/gapic_transition_route_groups_v3beta1.ts b/test/gapic_transition_route_groups_v3beta1.ts index fc74682c..767e9dc0 100644 --- a/test/gapic_transition_route_groups_v3beta1.ts +++ b/test/gapic_transition_route_groups_v3beta1.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -1268,6 +1268,96 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { }); }); + describe('experiment', () => { + const fakePath = '/rendered/path/experiment'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + environment: 'environmentValue', + experiment: 'experimentValue', + }; + const client = new transitionroutegroupsModule.v3beta1.TransitionRouteGroupsClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.experimentPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.experimentPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('experimentPath', () => { + const result = client.experimentPath( + 'projectValue', + 'locationValue', + 'agentValue', + 'environmentValue', + 'experimentValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.experimentPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromExperimentName', () => { + const result = client.matchProjectFromExperimentName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromExperimentName', () => { + const result = client.matchLocationFromExperimentName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAgentFromExperimentName', () => { + const result = client.matchAgentFromExperimentName(fakePath); + assert.strictEqual(result, 'agentValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEnvironmentFromExperimentName', () => { + const result = client.matchEnvironmentFromExperimentName(fakePath); + assert.strictEqual(result, 'environmentValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchExperimentFromExperimentName', () => { + const result = client.matchExperimentFromExperimentName(fakePath); + assert.strictEqual(result, 'experimentValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('flow', () => { const fakePath = '/rendered/path/flow'; const expectedParameters = { diff --git a/test/gapic_versions_v3.ts b/test/gapic_versions_v3.ts index 1bea4e57..08da9b34 100644 --- a/test/gapic_versions_v3.ts +++ b/test/gapic_versions_v3.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -1483,6 +1483,94 @@ describe('v3.VersionsClient', () => { }); }); + describe('experiment', () => { + const fakePath = '/rendered/path/experiment'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + environment: 'environmentValue', + experiment: 'experimentValue', + }; + const client = new versionsModule.v3.VersionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.experimentPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.experimentPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('experimentPath', () => { + const result = client.experimentPath( + 'projectValue', + 'locationValue', + 'agentValue', + 'environmentValue', + 'experimentValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.experimentPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromExperimentName', () => { + const result = client.matchProjectFromExperimentName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromExperimentName', () => { + const result = client.matchLocationFromExperimentName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAgentFromExperimentName', () => { + const result = client.matchAgentFromExperimentName(fakePath); + assert.strictEqual(result, 'agentValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEnvironmentFromExperimentName', () => { + const result = client.matchEnvironmentFromExperimentName(fakePath); + assert.strictEqual(result, 'environmentValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchExperimentFromExperimentName', () => { + const result = client.matchExperimentFromExperimentName(fakePath); + assert.strictEqual(result, 'experimentValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('flow', () => { const fakePath = '/rendered/path/flow'; const expectedParameters = { diff --git a/test/gapic_versions_v3beta1.ts b/test/gapic_versions_v3beta1.ts index c14662af..82a987de 100644 --- a/test/gapic_versions_v3beta1.ts +++ b/test/gapic_versions_v3beta1.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -1483,6 +1483,94 @@ describe('v3beta1.VersionsClient', () => { }); }); + describe('experiment', () => { + const fakePath = '/rendered/path/experiment'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + environment: 'environmentValue', + experiment: 'experimentValue', + }; + const client = new versionsModule.v3beta1.VersionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.experimentPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.experimentPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('experimentPath', () => { + const result = client.experimentPath( + 'projectValue', + 'locationValue', + 'agentValue', + 'environmentValue', + 'experimentValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.experimentPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromExperimentName', () => { + const result = client.matchProjectFromExperimentName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromExperimentName', () => { + const result = client.matchLocationFromExperimentName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAgentFromExperimentName', () => { + const result = client.matchAgentFromExperimentName(fakePath); + assert.strictEqual(result, 'agentValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEnvironmentFromExperimentName', () => { + const result = client.matchEnvironmentFromExperimentName(fakePath); + assert.strictEqual(result, 'environmentValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchExperimentFromExperimentName', () => { + const result = client.matchExperimentFromExperimentName(fakePath); + assert.strictEqual(result, 'experimentValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('flow', () => { const fakePath = '/rendered/path/flow'; const expectedParameters = { diff --git a/test/gapic_webhooks_v3.ts b/test/gapic_webhooks_v3.ts index d081544b..7162ab41 100644 --- a/test/gapic_webhooks_v3.ts +++ b/test/gapic_webhooks_v3.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -1176,6 +1176,94 @@ describe('v3.WebhooksClient', () => { }); }); + describe('experiment', () => { + const fakePath = '/rendered/path/experiment'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + environment: 'environmentValue', + experiment: 'experimentValue', + }; + const client = new webhooksModule.v3.WebhooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.experimentPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.experimentPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('experimentPath', () => { + const result = client.experimentPath( + 'projectValue', + 'locationValue', + 'agentValue', + 'environmentValue', + 'experimentValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.experimentPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromExperimentName', () => { + const result = client.matchProjectFromExperimentName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromExperimentName', () => { + const result = client.matchLocationFromExperimentName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAgentFromExperimentName', () => { + const result = client.matchAgentFromExperimentName(fakePath); + assert.strictEqual(result, 'agentValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEnvironmentFromExperimentName', () => { + const result = client.matchEnvironmentFromExperimentName(fakePath); + assert.strictEqual(result, 'environmentValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchExperimentFromExperimentName', () => { + const result = client.matchExperimentFromExperimentName(fakePath); + assert.strictEqual(result, 'experimentValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('flow', () => { const fakePath = '/rendered/path/flow'; const expectedParameters = { diff --git a/test/gapic_webhooks_v3beta1.ts b/test/gapic_webhooks_v3beta1.ts index 61b02b6a..f91fe002 100644 --- a/test/gapic_webhooks_v3beta1.ts +++ b/test/gapic_webhooks_v3beta1.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -1176,6 +1176,94 @@ describe('v3beta1.WebhooksClient', () => { }); }); + describe('experiment', () => { + const fakePath = '/rendered/path/experiment'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + environment: 'environmentValue', + experiment: 'experimentValue', + }; + const client = new webhooksModule.v3beta1.WebhooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.experimentPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.experimentPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('experimentPath', () => { + const result = client.experimentPath( + 'projectValue', + 'locationValue', + 'agentValue', + 'environmentValue', + 'experimentValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.experimentPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromExperimentName', () => { + const result = client.matchProjectFromExperimentName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromExperimentName', () => { + const result = client.matchLocationFromExperimentName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAgentFromExperimentName', () => { + const result = client.matchAgentFromExperimentName(fakePath); + assert.strictEqual(result, 'agentValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEnvironmentFromExperimentName', () => { + const result = client.matchEnvironmentFromExperimentName(fakePath); + assert.strictEqual(result, 'environmentValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchExperimentFromExperimentName', () => { + const result = client.matchExperimentFromExperimentName(fakePath); + assert.strictEqual(result, 'experimentValue'); + assert( + (client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('flow', () => { const fakePath = '/rendered/path/flow'; const expectedParameters = {